RAG-powered Conversational Agent
Engage with an intelligent agent for information retrieval, analysis, and research.
This endpoint offers two operating modes:
- RAG mode: Standard retrieval-augmented generation for answering questions based on knowledge base
- Research mode: Advanced capabilities for deep analysis, reasoning, and computation
RAG Mode (Default)
The RAG mode provides fast, knowledge-based responses using:
- Semantic and hybrid search capabilities
- Document-level and chunk-level content retrieval
- Optional web search integration
- Source citation and evidence-based responses
Research Mode
The Research mode builds on RAG capabilities and adds:
- A dedicated reasoning system for complex problem-solving
- Critique capabilities to identify potential biases or logical fallacies
- Python execution for computational analysis
- Multi-step reasoning for deeper exploration of topics
Available Tools
RAG Tools:
search_file_knowledge
: Semantic/hybrid search on your ingested documentssearch_file_descriptions
: Search over file-level metadatacontent
: Fetch entire documents or chunk structuresweb_search
: Query external search APIs for up-to-date informationweb_scrape
: Scrape and extract content from specific web pages
Research Tools:
rag
: Leverage the underlying RAG agent for information retrievalreasoning
: Call a dedicated model for complex analytical thinkingcritique
: Analyze conversation history to identify flaws and biasespython_executor
: Execute Python code for complex calculations and analysis
Streaming Output
When streaming is enabled, the agent produces different event types:
thinking
: Shows the model’s step-by-step reasoning (when extended_thinking=true)tool_call
: Shows when the agent invokes a tooltool_result
: Shows the result of a tool callcitation
: Indicates when a citation is added to the responsemessage
: Streams partial tokens of the responsefinal_answer
: Contains the complete generated answer and structured citations
Conversations
Maintain context across multiple turns by including conversation_id
in each request.
After your first call, store the returned conversation_id
and include it in subsequent calls.
If no conversation name has already been set for the conversation, the system will automatically assign one.
Headers
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
Current message to process
Pre-configured search modes: basic, advanced, or custom.
The search configuration object for retrieving context.
Configuration for RAG generation in ‘rag’ mode
Configuration for generation in ‘research’ mode. If not provided but mode=‘research’, rag_generation_config will be used with appropriate model overrides.
List of tools to enable for RAG mode. Available tools: search_file_knowledge, get_file_content, web_search, web_scrape, search_file_descriptions
List of tools to enable for Research mode. Available tools: rag, reasoning, critique, python_executor
Optional custom prompt to override default
Pass document titles from search results into the LLM context window.
ID of the conversation
Maximum length of returned tool context
Use extended prompt for generation
Mode to use for generation: ‘rag’ for standard retrieval or ‘research’ for deep analysis with reasoning capabilities
If true, the system will automatically assign a conversation name if not already specified previously.
List of messages (deprecated, use message instead)
List of tools to execute (deprecated, use rag_tools or research_tools instead)
Optional custom prompt to override default
Response
Successful Response