---
title: "Complete Agent Run"
method: POST
path: "/agent/runs/{agent_run_id}/complete"
tags: ["agent"]
---

# Complete Agent Run

`POST /agent/runs/{agent_run_id}/complete`

Handle sandbox completion callbacks for autonomous agent runs.

Args:
    agent_run_id: Agent run identifier from the path.
    payload: Completion payload from the sandbox.
    callback_token: One-time callback authentication token.
    execution_service: Agent execution service.

Returns:
    Callback acceptance response including resulting run status.

Raises:
    HTTPException: When callback auth fails or run is missing.

## Path parameters

- `agent_run_id` string, required

## Headers

- `X-Agent-Callback-Token` string, required

## Request body

- AgentRunCallbackRequest — Request payload for sandbox run-completion callbacks.
  - `status` 'completed' | 'failed', required
  - `deliverables` object, nullable
  - `data_curation_report` string, nullable
  - `final_report` string, nullable
  - `system_deficiencies` string, nullable
  - `error_message` string, nullable
  - `llm_token_usage` object[], nullable

## Response `200`

Successful Response

- AgentRunCallbackResponse — Response payload for sandbox run-completion callbacks.
  - `agent_run_id` string, required
  - `status` string, required
  - `accepted` boolean, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/pioneer/apis/brain-api.md) · [All operations](https://skmtc.net/pioneer/apis/brain-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pioneer/brain-api/versions/31dfe831e079/schema)
