Create a new research session. The API spawns a coordinator agent that orchestrates sub-agents based on the query.
Request Body
{
"query": "Find SaaS companies in Berlin with 10-50 employees",
"output_dir": "./results/session-001"
}
querystringResearch query or task description
output_dirstringDirectory to store results (optional)
Response — 201 Created
{
"id": "sess_a1b2c3d4",
"query": "Find SaaS companies in Berlin...",
"status": "running",
"created_at": "2026-08-07T10:30:00Z",
"agents": [],
"output_dir": "./results/session-001"
}
List all research sessions. Returns an array sorted by creation date (newest first).
Response — 200 OK
[
{
"id": "sess_a1b2c3d4",
"query": "Find SaaS companies in Berlin...",
"status": "completed",
"created_at": "2026-08-07T10:30:00Z"
},
{
"id": "sess_e5f6g7h8",
"query": "Analyze competitor pricing...",
"status": "running",
"created_at": "2026-08-07T11:00:00Z"
}
]
Retrieve detailed status of a specific session, including all spawned agents and their current states.
Path Parameters
idstringSession identifier (e.g., sess_a1b2c3d4)
Response — 200 OK
{
"id": "sess_a1b2c3d4",
"query": "Find SaaS companies in Berlin...",
"status": "running",
"created_at": "2026-08-07T10:30:00Z",
"agents": [
{
"id": "agent_x1y2z3",
"role": "web-researcher",
"status": "running",
"findings_count": 12
},
{
"id": "agent_k4l5m6",
"role": "data-analyst",
"status": "idle"
}
]
}
Send a mid-run instruction to adjust the research direction without stopping the session.
Request Body
{
"instruction": "Focus only on companies with Series A funding"
}
Response — 200 OK
{
"success": true,
"message": "Instruction delivered to session sess_a1b2c3d4"
}
Retrieve completed research results for a session. Returns 404 if the session is still running.
Response — 200 OK
{
"session_id": "sess_a1b2c3d4",
"status": "completed",
"findings": [
{
"title": "TechCorp GmbH",
"url": "https://techcorp.de",
"summary": "B2B SaaS, 25 employees, Series A 2025",
"confidence": 0.92
}
],
"output_files": [
"./results/session-001/report.md",
"./results/session-001/data.json"
]
}
Open an SSE stream for real-time events from a specific session. Each event is a JSON object with event and data fields.
Response — 200 OK (text/event-stream)
event: AgentSpawned
data: {"agent_id":"agent_x1y2z3","role":"web-researcher"}
event: Finding
data: {"agent_id":"agent_x1y2z3","title":"TechCorp GmbH","confidence":0.92}
event: SessionCompleted
data: {"session_id":"sess_a1b2c3d4","duration_ms":45200}
List all active and recently completed agents across all sessions.
Response — 200 OK
[
{
"id": "agent_x1y2z3",
"session_id": "sess_a1b2c3d4",
"role": "web-researcher",
"status": "completed",
"findings_count": 12
}
]
Get detailed status and metadata for a specific agent, including tool calls and LLM interaction log.
Response — 200 OK
{
"id": "agent_x1y2z3",
"session_id": "sess_a1b2c3d4",
"role": "web-researcher",
"status": "completed",
"findings_count": 12,
"tool_calls": 34,
"llm_tokens_used": 18420,
"started_at": "2026-08-07T10:30:01Z",
"completed_at": "2026-08-07T10:30:42Z"
}
Health check endpoint. No authentication required. Returns server status and version.
Response — 200 OK
{
"status": "healthy",
"version": "0.1.0",
"uptime_seconds": 86400
}
Prometheus-compatible metrics endpoint. No authentication required. Scrape with any Prometheus-compatible collector.
Response — 200 OK (text/plain)
# HELP parallel_sessions_total Total number of sessions
# TYPE parallel_sessions_total counter
parallel_sessions_total 42
# HELP parallel_agents_active Currently active agents
# TYPE parallel_agents_active gauge
parallel_agents_active 3
# HELP parallel_request_duration_seconds Request latency
# TYPE parallel_request_duration_seconds histogram
parallel_request_duration_seconds_bucket{le="0.1"} 120