The R2R Agent endpoint provides a conversational RAG interface for retrieval, reasoning, and research. It supports multi-turn context, tool integration, streaming output, and both RAG and Research modes for dynamic AI-driven analysis.
The RAG-powered Conversational Agent enables interactive, multi-turn communication with an intelligent agent built on R2R’s Retrieval-Augmented Generation (RAG) system. This endpoint allows users to engage in real-time dialogue with an AI capable of retrieving information from internal and external sources, reasoning through complex problems, executing computations, and maintaining context across multiple conversation turns. It operates in two distinct modes: RAG Mode for knowledge-based responses and Research Mode for deep analytical reasoning.Documentation Index
Fetch the complete documentation index at: https://io.net/docs/llms.txt
Use this file to discover all available pages before exploring further.
search_file_knowledge — Perform semantic or hybrid search across ingested documents.search_file_descriptions — Search file-level metadata and descriptions.content — Retrieve full documents or chunk structures.web_search — Query external search engines for up-to-date information.web_scrape — Extract content directly from specified web pages.rag — Invoke the underlying RAG agent for information retrieval.reasoning — Use a dedicated reasoning model for deep analysis and logical inference.critique — Analyze the conversation for potential biases or reasoning flaws.python_executor — Execute Python code for computation, simulation, or data processing."stream": true), the API emits Server-Sent Events (SSE) to deliver updates in real time.
Each event corresponds to a stage in the agent’s reasoning and response generation process.
| Event Type | Description |
|---|---|
thinking | Displays the model’s intermediate reasoning steps (enabled by extended_thinking=true). |
tool_call | Indicates when the agent invokes a tool. |
tool_result | Contains the output from an executed tool. |
citation | Signals that a citation has been added to the response. |
message | Streams partial tokens of the generated message. |
final_answer | Provides the complete generated response with structured citations. |
conversation_id field.
How it works:
conversation_id.The access token received from the authorization server in the OAuth 2.0 flow.
Current message to process
Pre-configured search modes: basic, advanced, or custom.
basic, advanced, 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
web_search, web_scrape, search_file_descriptions, search_file_knowledge, get_file_content 200