Skip to main content

Agents API

Today only GET /v1/agents (list agents in a lab) is shipped. The per-agent sub-routes described below (GET /v1/agents/{id}, /messages, /metrics, /start, /stop) are planned, not yet live. Drive individual agents from the web app or via Convex actions; this page documents the target REST shape so SDKs can build against it.
Every lab runs a hierarchical multi-agent system: an orchestrator directs lead agents who dispatch workers. The Agents API lets you configure the roster, start/stop agents, query status, and route messages.

Agent Roles

Agent Status

Create an Agent

labId
string
required
Lab this agent belongs to.
name
string
required
Display name (e.g., “Research Lead”, “Figure Worker”).
role
string
required
Agent role: orchestrator, lead, or worker.
model
string
required
Model identifier (e.g., claude-opus-4-8, claude-sonnet-5, claude-haiku-4-5, gpt-5.5, gemini-3.1-pro, grok-4, sonar-pro).
reportsTo
string
Convex ID of the agent this one reports to. Workers report to leads; leads report to the orchestrator.
systemPrompt
string
Custom system prompt. Overrides the default for this role.
capabilities
string[]
List of capabilities (e.g., ["code", "figures", "latex", "data-analysis"]).
data
object

List Agents

labId
string
required
Lab ID to list agents for.
role
string
Filter by role: orchestrator, lead, worker.
status
string
Filter by status: active, idle, busy, retired.

Get an Agent

Update an Agent

name
string
Updated display name.
model
string
Change the model (e.g., upgrade from Sonnet to Opus).
systemPrompt
string
Updated system prompt.
capabilities
string[]
Updated capabilities list.
reportsTo
string
Change the supervising agent.

Start an Agent

Activate a retired or newly created agent so it begins receiving tasks.

Stop an Agent

Set an agent to retired status. It finishes any in-progress task, then stops accepting new work.
force
boolean
default:false
If true, immediately stop the agent and reassign its current task.

Delete an Agent

Remove an agent from the lab. The agent must be in retired status.

Message Routing

When you send a message to the orchestrator, it routes the request through the agent hierarchy based on reasoning level.

Send a Message to an Agent

agentId
string
required
Target agent ID. Use the orchestrator ID for automatic routing.
content
string
required
Message content.
context
object
Optional context (e.g., which experiment or paper is being discussed).

Agent Metrics

data
object