Endpoint
text/event-stream).
Request body
| Field | Type | Required | Description |
|---|---|---|---|
question | string | ✅ | The user’s prompt; empty is rejected |
agent | string | Fixed at App on the China cluster | |
provider | string | LLM selection, see Providers | |
session_id | string | Maintain context across turns. If absent, the server generates one and emits it via the first id event | |
prompt_name | string | Activate a system prompt saved via /api/user/prompt/set | |
query_user_id | string | Ask about a family member’s data; requires sharing permission | |
file_list | array | Attach files; see Files attached to chat | |
language | string | zh-CN / en; defaults to X-Language → user profile | |
timezone | string | e.g. Asia/Shanghai |
Providers
China cluster offers 5 providers, all supporting multi-turn context, streaming, and tool calls:provider | Underlying model | Use case |
|---|---|---|
DeepSeekFlash | DeepSeek v4 Flash | Default — fast, low cost |
DeepSeekPro | DeepSeek v4 Pro | Complex reasoning |
kimi | Kimi K2.6 | Long context |
minimax | MiniMax M2.7 | Natural Chinese expression |
豆包 | Doubao Seed 2.0 Lite | Chinese, via Volcengine |
GET /api/providers returns the current list at runtime.
Files attached to chat
file_list requires all five fields — file_url, file_name, file_key, file_type, file_size. The easiest path is to use POST /files/upload and feed its data array straight into file_list:
Thefile_urlmust be the full signed URL returned by/files/upload— the LLM downstream will fetch it, and stripping the signature causes a 403.
SSE event types
Each event:type | When | content |
|---|---|---|
id | First event | web_<uuid> — message id for this turn |
queryTitle | Tool call / phase header | Tool name or phase description |
queryDetail | Tool call result | String (often JSON-stringified) |
reply | Streaming model reply | Text fragment — clients must concatenate |
thinking | Internal thinking | Text fragment |
costStatistics | Near end | { model, input_tokens, output_tokens, total_tokens, total_cost } |
error | Exception | Error description |
end | Stream end | Empty |
tool_id lets you pair queryTitle / queryDetail for the same tool call.
Tools the Agent calls
The Agent uses health/file/chart tools on demand. Examples:user-get_profile,user-search_health_indicators,user-fetch_health_data,user-get_genetic_data,user-get_journal_entriesfile-list_global_files,file-ls,file-fetch_remote_files,file-read_file- chart tools: line / column / pie / radar / dual-axes / scatter / boxplot / sankey / etc.
data-search_medical_literature,data-get_fda_drugs,data-search_clinical_trials, etc.
Disabled on China cluster
The following tools are not called by the Agent on the China cluster:tool-*(alltool-prefixed tools — Apple Watch, doctor recommendation)user-get_events,user-get_food_records,user-list_medications,user-get_medication_details