agent
Chat With Agent
Chat endpoint using ReAct agent for autonomous source selection.
The agent autonomously selects appropriate tools (PubMed, Scopus, clinical trials, etc.) based on the user's query and patient context. No manual connector selection.
Supports per-session conversation memory:
- If session_id provided, loads prior conversation history
- Saves user message and agent response after invocation
- Returns session_id for frontend to continue conversation
Returns: AgentsetChatResponse with agent's response, evidence sources, and session_id.
post/agent/chat
Request
- Base URLhttps://api.alpha-grid.ai (the document declares no server; this is the origin it was published from)
- AuthHTTP bearer
Request body
Response
Successful Response
Example response
{
"agent_steps": [
{
"action_type": "thinking",
"step_num": 1,
"thinking_text": "Searching medical literature for treatment options..."
},
{
"action_type": "tool_call",
"step_num": 2,
"tool_name": "pubmed_search",
"tool_query": "{\"query\": \"NSCLC immunotherapy\"}"
},
{
"action_type": "result",
"result_summary": "Found 15 papers on combination immunotherapy for NSCLC",
"step_num": 3,
"tool_name": "pubmed_search"
}
],
"content": "Based on the literature, checkpoint inhibitor combinations are effective...",
"session_id": "session-uuid-123",
"status": "success"
}Changes
No recorded changes to this operation across all 1 revision of this API.