Skip to main content
Business knowledge (RAG) lets an agent answer from documents you provide. Indexing is delegated to the RAG service (th2rag), reachable at RAG_BASE_URL.

Use Case: FAQ Automation

Automatically answering common customer or internal questions based on your support knowledge base.

Sources

Following progress

  • Poll GET /api/rag/status/{knowledge_id}
  • Or stream GET /api/rag/stream/{agent_id}?session_id=xxx — events connected, status, complete
GET /api/rag/knowledge/{agent_id} lists what an agent currently has indexed.

Security

  • Path traversal is blocked on session and agent identifiers
  • URL indexing refuses localhost and private address ranges (SSRF protection)
  • Session ownership is validated on every call
  • Completion callbacks from th2rag are verified with an HMAC-SHA256 signature (RAG_WEBHOOK_SECRET)