# Missions and tasks

Read mission trees, per-job execution detail and finished-mission outcomes. The task routes are not part of the programmatic API.

A mission is one piece of agent work: the run job you start and every job it delegates to sub-agents. A delegated job runs as the same agent, with limits no wider than its parent's. Only an agent that is set up for delegation creates delegated jobs; otherwise a mission is a single job. The mission endpoints are a read-only view of that work. They show what is in progress, what each job did and under which limits, and what finished missions delivered and cost.

Reading missions needs an API key with the `read` scope or a signed-in session; see [Authentication](https://centerofagentic.com/docs/authentication). Visibility follows who started the work: an API key sees the missions started with that same key, a workspace member sees their own, and a workspace admin signed in to the web workspace sees every mission in the workspace. These endpoints never start or change work; missions are started and advanced through the run job endpoint, `POST /api/run/job`.

The routes that record a review or a redirect on a mission accept only people signed in to the web workspace and refuse API keys. The task routes under `/api/tasks` refuse API keys too, so neither set is part of the programmatic API.

## Missions

Each mission is returned as its jobs (nodes): one root job plus every job it delegated. A job's `status` says where it stands. Values include `running`, `claimed`, `blocked_on_child` (waiting for a delegated job) and `pending_approval` (held until a person approves or denies an action) while work is in progress, and `done` or `error` once it has finished. On an `error` job, `terminalReason` can say why, for example `cancelled` when the mission was stopped, `approval_expired` when nobody decided in time, or `reconciliation_required` when the outcome could not be established.

### GET /api/missions

List missions that are in progress or changed in the last 7 days

Returns the jobs of every visible mission that still has a job in progress, or that had a job change in the last 7 days. At most 60 missions are included, in-progress missions first and then the most recently changed. `nodes` is a flat list ordered by `depth`, then `createdAt`; group it by `rootId` to rebuild each mission. Text is shortened: `objective` and `output` to 600 characters, `error` to 240, and the latest review note to 280.

**Access:** API key with the `read` scope, or a signed-in workspace member. A workspace admin signed in to the web workspace sees every mission in the workspace. Any other member sees only the missions they started, and an API key sees only the missions started with that same key.

**Returns:** An object `{ nodes, reviews, windowDays, generatedAt }`. Each entry of `nodes` is one job: `id`, `rootId` (the mission's root job; equal to `id` on the root), `parentId`, `depth`, `status`, `agentId`, `agentName`, `objective`, `output`, `error`, `rounds` (model rounds the job has run), `createdAt`, `updatedAt`, `holdExpiresAt` (while `status` is `pending_approval`, when the wait for a decision lapses), `terminalReason`, `receiptId` (the id of the job's run receipt when `deep` is `true`, otherwise `null`) and `deep` (`true` for a job that can delegate work to sub-agents or was itself delegated). `parentId`, `agentId`, `agentName`, `objective`, `output`, `error`, `holdExpiresAt` and `terminalReason` can be `null`. `reviews` maps the root id of a delivered mission (its root job is `done`) to its latest review `{ verdict, at }`, where `verdict` is `accepted` or `changes_requested`; a delivered mission without an entry has not been reviewed. `windowDays` is `7`. The response is sent with `Cache-Control: no-store`.

```bash
curl https://centerofagentic.com/api/missions \
  -H "Authorization: Bearer $COA_API_KEY"
```

```json
{
  "nodes": [
    {
      "id": "3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11",
      "rootId": "3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11",
      "parentId": null,
      "depth": 0,
      "status": "done",
      "agentId": "7a2e4c10-5b3f-4d8a-8c66-1e9d0a4b2f37",
      "agentName": "Research lead",
      "objective": "Summarize the supplier contracts that renew next quarter.",
      "output": "Three contracts renew next quarter. The largest is the logistics agreement.",
      "error": null,
      "rounds": 4,
      "createdAt": "2026-11-20T09:14:02.000Z",
      "updatedAt": "2026-11-20T09:21:47.000Z",
      "holdExpiresAt": null,
      "terminalReason": null,
      "receiptId": "b84d1f02-6c3a-4e19-a7d5-2f0c9e3b6a48",
      "deep": true
    },
    {
      "id": "c5d09a77-1e42-4b6f-9d03-8a7b6c5d4e21",
      "rootId": "3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11",
      "parentId": "3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11",
      "depth": 1,
      "status": "done",
      "agentId": "7a2e4c10-5b3f-4d8a-8c66-1e9d0a4b2f37",
      "agentName": "Research lead",
      "objective": "List renewal dates for the logistics agreement.",
      "output": "The logistics agreement renews on 1 February.",
      "error": null,
      "rounds": 2,
      "createdAt": "2026-11-20T09:15:10.000Z",
      "updatedAt": "2026-11-20T09:18:33.000Z",
      "holdExpiresAt": null,
      "terminalReason": null,
      "receiptId": "d17a5c3e-8b40-4f92-a6c1-9e0f2b4d7a85",
      "deep": true
    }
  ],
  "reviews": {
    "3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11": {
      "verdict": "accepted",
      "at": "2026-11-20T10:02:11.000Z"
    }
  },
  "windowDays": 7,
  "generatedAt": "2026-11-21T08:00:00.000Z"
}
```

## Mission detail

One mission with the execution record of each job: the limits it ran under, the tools it called and how each call was decided, what is waiting for a person, and recorded usage. Tool arguments and tool results are never returned here.

### GET /api/missions/{id}

Get one mission with per-job execution detail

Returns the whole mission that the job `id` belongs to; `id` can be the root job or any delegated job. At most 100 jobs and 50 tool calls per job are returned. `objective` and `output` are shortened to 4,000 characters and `error` to 600. A mission the caller is not allowed to see is reported as not found.

**Access:** API key with the `read` scope, or a signed-in workspace member. A workspace admin signed in to the web workspace can open any mission in the workspace. Any other member can open only missions they started, and an API key only missions started with that same key.

**Path parameters**

| Name | Type | Description |
| --- | --- | --- |
| `id` required | `uuid` | The id of any job in the mission. The response always covers the whole mission. |

**Returns:** An object `{ nodes, links, reviews, generatedAt }`. Each node has the fields of the mission list plus `ceiling` (the limits the job ran under: `{ authority, actions, dataClasses, placements, tools, depth }`, with `tools` as a list of tool names, or `null` when none was recorded), `tools` (the job's recorded tool calls as `{ tool, connection, ok, outcome }`: `connection` names the connection the tool belongs to, `ok` is `true` when the call ran and succeeded, and `outcome` is `authorized` (allowed to run), `pending` (held for a person), `denied` (refused) or `null` when no decision was recorded), `heldActions` (names of tool calls waiting for a person while the job is `pending_approval`) and `usage` (`{ promptTokens, completionTokens, costUsd, computeMs }`; `costUsd` is `null` when no cost was recorded). `links` is `{ redirectedTo, redirectedFrom }`: arrays of `{ jobId, at, note }` naming missions this one was redirected into or from, at most 20 in total and limited to missions the caller can see. `reviews` lists up to 50 recorded reviews, oldest first, as `{ verdict, note, at, byYou }`; the most recent one is the current verdict, and `byYou` is `true` only when the caller recorded it. The response is sent with `Cache-Control: no-store`.

**Errors**

| Status | Code | When |
| --- | --- | --- |
| 400 | `invalid_id` | `id` is not a UUID. |
| 404 | `not_found` | No job with this id exists in the workspace, or the caller is not allowed to see its mission. |

```bash
curl https://centerofagentic.com/api/missions/3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11 \
  -H "Authorization: Bearer $COA_API_KEY"
```

```json
{
  "nodes": [
    {
      "id": "3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11",
      "rootId": "3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11",
      "parentId": null,
      "depth": 0,
      "status": "done",
      "agentId": "7a2e4c10-5b3f-4d8a-8c66-1e9d0a4b2f37",
      "agentName": "Research lead",
      "objective": "Summarize the supplier contracts that renew next quarter.",
      "output": "Three contracts renew next quarter. The largest is the logistics agreement.",
      "error": null,
      "rounds": 4,
      "createdAt": "2026-11-20T09:14:02.000Z",
      "updatedAt": "2026-11-20T09:21:47.000Z",
      "holdExpiresAt": null,
      "terminalReason": null,
      "receiptId": "b84d1f02-6c3a-4e19-a7d5-2f0c9e3b6a48",
      "deep": true,
      "ceiling": {
        "authority": "recommend",
        "actions": ["summarize", "draft", "recommend", "connector_read", "spawn_subagent"],
        "dataClasses": ["internal"],
        "placements": ["cloud_model", "cloud_connector", "cloud_connector_write"],
        "tools": ["search_documents"],
        "depth": 0
      },
      "tools": [
        { "tool": "search_documents", "connection": "Contracts library", "ok": true, "outcome": "authorized" },
        { "tool": "spawn_subagent", "connection": "CoA", "ok": true, "outcome": "authorized" }
      ],
      "heldActions": [],
      "usage": {
        "promptTokens": 9120,
        "completionTokens": 1630,
        "costUsd": 0.0124,
        "computeMs": 18450
      }
    },
    {
      "id": "c5d09a77-1e42-4b6f-9d03-8a7b6c5d4e21",
      "rootId": "3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11",
      "parentId": "3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11",
      "depth": 1,
      "status": "done",
      "agentId": "7a2e4c10-5b3f-4d8a-8c66-1e9d0a4b2f37",
      "agentName": "Research lead",
      "objective": "List renewal dates for the logistics agreement.",
      "output": "The logistics agreement renews on 1 February.",
      "error": null,
      "rounds": 2,
      "createdAt": "2026-11-20T09:15:10.000Z",
      "updatedAt": "2026-11-20T09:18:33.000Z",
      "holdExpiresAt": null,
      "terminalReason": null,
      "receiptId": "d17a5c3e-8b40-4f92-a6c1-9e0f2b4d7a85",
      "deep": true,
      "ceiling": {
        "authority": "answer",
        "actions": ["summarize", "connector_read"],
        "dataClasses": ["internal"],
        "placements": ["cloud_model", "cloud_connector"],
        "tools": ["search_documents"],
        "depth": 1
      },
      "tools": [
        { "tool": "search_documents", "connection": "Contracts library", "ok": true, "outcome": "authorized" }
      ],
      "heldActions": [],
      "usage": {
        "promptTokens": 2720,
        "completionTokens": 445,
        "costUsd": 0.0037,
        "computeMs": 6120
      }
    }
  ],
  "links": {
    "redirectedTo": [],
    "redirectedFrom": []
  },
  "reviews": [
    {
      "verdict": "accepted",
      "note": null,
      "at": "2026-11-20T10:02:11.000Z",
      "byYou": false
    }
  ],
  "generatedAt": "2026-11-21T08:00:00.000Z"
}
```

## Outcomes

The record of finished missions over a chosen window, one row per mission, for reporting on delivery, cost and review results. Rates and averages are not computed by the API; derive them from the rows.

### GET /api/missions/outcomes

List missions that finished in the last 7, 30 or 90 days

Returns one row per mission whose root job finished (`done` or `error`) inside the window, newest first, with the job count, delegation depth, token usage and recorded cost summed across the mission's jobs. At most 500 rows are returned; `truncated` is `true` when 500 rows came back, so the window may hold more. A job with no recorded cost is counted in `unpricedJobs` and is never added to `knownCostUsd` as zero. Text is shortened: `objective` to 300 characters, `output` to 600, `error` to 240, and the latest review note to 280.

**Access:** API key with the `read` scope, or a signed-in workspace member. A workspace admin signed in to the web workspace gets every finished mission in the workspace (`scope` is `workspace`). Any other member gets only missions they started, and an API key only missions started with that same key (`scope` is `own`).

**Query parameters**

| Name | Type | Description |
| --- | --- | --- |
| `window` | `7 \| 30 \| 90` | Window in days, counted back from now. Defaults to `7`. |

**Returns:** An object `{ missions, windowDays, scope, limit, truncated, generatedAt }`. Each mission has `id`, `agentId`, `agentName`, `objective`, `output`, `error`, `status`, `terminalReason`, `createdAt`, `finishedAt`, `receiptId`, `deep`, `jobs` (the root plus every delegated job), `maxDepth`, `knownCostUsd`, `unpricedJobs`, `promptTokens`, `completionTokens` and `review` (the latest review `{ verdict, at, note }`, or `null` when none was recorded). `scope` is `workspace` or `own`, and `limit` is `500`. The response is sent with `Cache-Control: no-store`.

**Errors**

| Status | Code | When |
| --- | --- | --- |
| 400 | `invalid_window` | `window` is present but is not `7`, `30` or `90`. |

```bash
curl "https://centerofagentic.com/api/missions/outcomes?window=30" \
  -H "Authorization: Bearer $COA_API_KEY"
```

```json
{
  "missions": [
    {
      "id": "3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11",
      "agentId": "7a2e4c10-5b3f-4d8a-8c66-1e9d0a4b2f37",
      "agentName": "Research lead",
      "objective": "Summarize the supplier contracts that renew next quarter.",
      "output": "Three contracts renew next quarter. The largest is the logistics agreement.",
      "error": null,
      "status": "done",
      "terminalReason": null,
      "createdAt": "2026-11-20T09:14:02.000Z",
      "finishedAt": "2026-11-20T09:21:47.000Z",
      "receiptId": "b84d1f02-6c3a-4e19-a7d5-2f0c9e3b6a48",
      "deep": true,
      "jobs": 2,
      "maxDepth": 1,
      "knownCostUsd": 0.0161,
      "unpricedJobs": 0,
      "promptTokens": 11840,
      "completionTokens": 2075,
      "review": {
        "verdict": "accepted",
        "at": "2026-11-20T10:02:11.000Z",
        "note": null
      }
    }
  ],
  "windowDays": 30,
  "scope": "own",
  "limit": 500,
  "truncated": false,
  "generatedAt": "2026-11-21T08:00:00.000Z"
}
```

Source: https://centerofagentic.com/docs/api/missions-tasks

## Related pages

- [Authentication](https://centerofagentic.com/docs/authentication)
