Documentation Index
Fetch the complete documentation index at: https://docs.mirobody.ai/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
Overview
Interact with AI health assistants by sending messages and receiving intelligent, streaming responses. The API supports two agent types: DeepAgent (LangChain-based, for complex tasks) and BaselineAgent (native Gemini, for simple conversations).The chat API uses Server-Sent Events (SSE) for streaming responses and supports file uploads, MCP tool calls, and multi-language conversations.
Request Parameters
The user’s message or question
Agent type to use:
deep (DeepAgent) or baseline (BaselineAgent)Unique identifier for the authenticated user
User ID to query data for (defaults to
user_id). Used for help-ask feature.Session ID to maintain conversation context. Auto-generated if not provided.
LLM provider override:
google, openai, openrouter. Uses agent’s default if not specified.Enable MCP tools (1 = enabled, 0 = disabled)
Array of file objects to include in the conversation
Name of custom prompt template to use
Language for responses:
en, zh, etc.User’s timezone for time-based queries
JWT authentication token
Response Format
The API returns Server-Sent Events (SSE) with JSON chunks. Each chunk has atype and content:
Chunk Types
| Type | Description |
|---|---|
reply | AI response content token |
thinking | Reasoning/thinking token (for models with reasoning) |
queryTitle | Name of tool being called |
queryArguments | Arguments for tool call |
queryDetail | Results from tool execution |
costStatistics | Token usage and cost information |
end | Stream completion signal |
error | Error message |
The chat service automatically persists conversation history and integrates with MCP tools to access health data, perform calculations, and more.
Agent Types
- DeepAgent
- BaselineAgent
LangChain-based agent for complex tasks:
- File processing (PDFs, images, audio)
- Multi-step planning and reasoning
- Advanced MCP tool orchestration
- Memory and context management
"agent": "deep" in your request.