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

string
required
Lab this agent belongs to.
string
required
Display name (e.g., “Research Lead”, “Figure Worker”).
string
required
Agent role: orchestrator, lead, or worker.
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).
string
Convex ID of the agent this one reports to. Workers report to leads; leads report to the orchestrator.
string
Custom system prompt. Overrides the default for this role.
string[]
List of capabilities (e.g., ["code", "figures", "latex", "data-analysis"]).
object

List Agents

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

Get an Agent

Update an Agent

string
Updated display name.
string
Change the model (e.g., upgrade from Sonnet to Opus).
string
Updated system prompt.
string[]
Updated capabilities list.
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.
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

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

Agent Metrics

object