Change language
Get Started

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/stats

Endpoints

Everything is an endpoint

Sessions

POST/api/v1/sessionsStart a research session (query, profile, model, budget)
GET/api/v1/sessionsList sessions with status and progress
GET/api/v1/sessions/:idSession state, agent tree, token usage
GET/api/v1/sessions/:id/resultsFindings, contacts, exports
DELETE/api/v1/sessions/:idCancel a running session

Agents

GET/api/v1/agentsAll agents across sessions (tree view)
GET/api/v1/agents/:idAgent details, messages, tool calls

Control plane

POST/api/v1/sessions/:id/steerMid-run steering — redirect a running session
POST/api/v1/sessions/:id/answerAnswer an agent `question` tool call
POST/api/v1/sessions/:id/approveApprove/deny a side-effect tool (approval flow)

Events

GET/api/v1/eventsGlobal SSE stream of all agent events
GET/api/v1/sessions/:id/eventsPer-session SSE stream (deltas, tool calls, findings)

Memory

GET/api/v1/memoriesSearch the semantic memory store
POST/api/v1/memories/absorbIngest a fact (dedup + supersedes chains)
GET/api/v1/memories/statsStore size, scopes, graph stats
POST/api/v1/memories/distillDistill run-facts into durable knowledge
POST/api/v1/memories/gcArchive stale facts, compact scope groups
GET / DELETE/api/v1/memories/:idInspect / tombstone a single memory

Jobs

POST/api/v1/jobsSubmit a durable background job (task, attempts)
GET/api/v1/jobsList jobs
GET/api/v1/jobs/:idJob status
GET/api/v1/jobs/:id/logstdout + stderr of all attempts
DELETE/api/v1/jobs/:idCancel an active job
POST/api/v1/jobs/:id/rerunRe-run a finished/stuck job

System

GET/healthLiveness probe
GET/metricsPrometheus metrics
GET/dashboardSingle-file web dashboard: sessions, agent tree, memory, jobs, live SSE feed

Example

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.

MetricTypeWhat it counts
pr_http_requests_totalcounterrequests by route and status
pr_request_duration_secondshistogramlatency distribution
pr_sessions_totalcountersessions started
pr_sessions_activegaugesessions running right now
pr_agents_spawned_totalcountersub-agents across all trees
pr_tool_calls_totalcountertool executions by name
pr_tokens_used_totalcounterLLM tokens consumed
Prometheus

/metrics exposes request counts, latencies, session and tool gauges for Grafana dashboards.

SSE streaming

Token deltas, tool calls, agent spawn/finish and findings arrive as server-sent events — no polling.

Web dashboard

GET /dashboard serves a single-file HTML dashboard: sessions, agent tree, memory, jobs, live event feed.

CORS

Cross-origin access configurable via [server] config — restrict origins in production.