API & Server
Run it headless.
Watch it live.
An Axum HTTP server with auth, rate limiting, SSE event streaming, mid-run steering and a built-in web dashboard — all in one binary.
Authentication
API keys + rate limiting
Set PARALLEL_RESEARCH_API_KEYS (comma-separated) and every /api/v1/* request requires a key — Bearer token or X-Api-Key header. Sliding-window rate limiting returns 429 when exceeded. Unset = open access for development.
curl -H "Authorization: Bearer $KEY" \
http://localhost:8080/api/v1/sessions
curl -H "X-Api-Key: $KEY" \
http://localhost:8080/api/v1/memories/statsEndpoints
Everything is an endpoint
Sessions
/api/v1/sessionsStart a research session (query, profile, model, budget)/api/v1/sessionsList sessions with status and progress/api/v1/sessions/:idSession state, agent tree, token usage/api/v1/sessions/:id/resultsFindings, contacts, exports/api/v1/sessions/:idCancel a running sessionAgents
/api/v1/agentsAll agents across sessions (tree view)/api/v1/agents/:idAgent details, messages, tool callsControl plane
/api/v1/sessions/:id/steerMid-run steering — redirect a running session/api/v1/sessions/:id/answerAnswer an agent `question` tool call/api/v1/sessions/:id/approveApprove/deny a side-effect tool (approval flow)Events
/api/v1/eventsGlobal SSE stream of all agent events/api/v1/sessions/:id/eventsPer-session SSE stream (deltas, tool calls, findings)Memory
/api/v1/memoriesSearch the semantic memory store/api/v1/memories/absorbIngest a fact (dedup + supersedes chains)/api/v1/memories/statsStore size, scopes, graph stats/api/v1/memories/distillDistill run-facts into durable knowledge/api/v1/memories/gcArchive stale facts, compact scope groups/api/v1/memories/:idInspect / tombstone a single memoryJobs
/api/v1/jobsSubmit a durable background job (task, attempts)/api/v1/jobsList jobs/api/v1/jobs/:idJob status/api/v1/jobs/:id/logstdout + stderr of all attempts/api/v1/jobs/:idCancel an active job/api/v1/jobs/:id/rerunRe-run a finished/stuck jobSystem
/healthLiveness probe/metricsPrometheus metrics/dashboardSingle-file web dashboard: sessions, agent tree, memory, jobs, live SSE feedExample
Start a session, steer it mid-run
Sessions start asynchronously. Follow progress on the SSE stream, then steer or answer questions while agents are still running.
curl -X POST localhost:8080/api/v1/sessions \
-H "Content-Type: application/json" \
-d '{"query":"Find VPs of Engineering
at Series B fintech startups in SF"}'
# follow the live event stream
curl -N localhost:8080/api/v1/sessions/abc/events
# redirect mid-run
curl -X POST localhost:8080/api/v1/sessions/abc/steer \
-d '{"instruction":"Focus on Berlin instead"}'Observability
Prometheus metrics
Scrape /metrics and graph the whole fleet. Seven native metrics, no exporter needed.
| Metric | Type | What it counts |
|---|---|---|
| pr_http_requests_total | counter | requests by route and status |
| pr_request_duration_seconds | histogram | latency distribution |
| pr_sessions_total | counter | sessions started |
| pr_sessions_active | gauge | sessions running right now |
| pr_agents_spawned_total | counter | sub-agents across all trees |
| pr_tool_calls_total | counter | tool executions by name |
| pr_tokens_used_total | counter | LLM tokens consumed |
/metrics exposes request counts, latencies, session and tool gauges for Grafana dashboards.
Token deltas, tool calls, agent spawn/finish and findings arrive as server-sent events — no polling.
GET /dashboard serves a single-file HTML dashboard: sessions, agent tree, memory, jobs, live event feed.
Cross-origin access configurable via [server] config — restrict origins in production.