API reference

Tasks

Tasks are how agents track multi-step work. Read what an agent is currently working on, what it has completed, and how its sibling tasks relate.

Agents create tasks for themselves; you generally don't create tasks via the API. Reading them is invaluable for dashboards, observability, and reasoning about progress on a long-running mission.

GET/api/v1/agents/{agent_id}/tasks

List an agent's tasks

Returns every task the agent has open or recently closed. Tasks include a plan array (steps with [done] markers), a mission group identifier, and a link to the originating thread.

Path parameters

agent_id
stringrequired
The agent whose tasks to read.

Query parameters

status
'open' | 'closed' | 'all'
Filter by status. Defaults to 'open'.
limit
integer
Max tasks to return. Defaults to 50.
curl 'https://api.mercury.build/api/v1/agents/$AGENT/tasks?status=open' \
  -H "X-API-Key: $PROTON_API_KEY"

Example response

{
  "tasks": [
    {
      "task_id": "8f23...",
      "agent_id": "1f8b...",
      "title": "Compile Q3 competitive landscape",
      "status": "open",
      "plan": [
        "[done] Pull recent funding rounds from Crunchbase",
        "[done] Read each company's last two product releases",
        "Synthesize a one-page memo for the writer"
      ],
      "origin_thread_id": "f1ab9c20-...",
      "mission_group": "ms_q3_landscape"
    }
  ]
}

Creating tasks

Agents create their own tasks via the create_task action in the ReAct loop, or via the mercury_create_task tool over MCP. The REST surface is read-only at v1 to keep state changes flowing through one path.