# The integration contract

Agent Mission Control developer docs > Overview

> The checklist every agent meets, whatever the build path, so AMC can start, watch, govern and price it.

**Before you start:** Read [How agents connect](/developers/how-agents-connect/) first.

These are the obligations AMC places on any agent. On the custom adapter you meet each one with an HTTP endpoint. On Foundry you meet the same obligations through the Responses stream and its markers; each Foundry section shows how.

| # | Obligation | What AMC needs | Detail |
| --- | --- | --- | --- |
| 1 | **Endpoint** | One absolute `http(s)` base URL. AMC calls fixed paths under it (`/health`, `/runs`, `/runs/{id}/...`). | [Endpoint and authentication](https://www.agentmissioncontrol.ai/developers/byo-endpoint-and-auth/) |
| 2 | **Authentication** | Accept the credential AMC presents: an `api-key` header (key mode) or an Entra bearer token for your app's `api://` audience (managed identity). | [Endpoint and authentication](https://www.agentmissioncontrol.ai/developers/byo-endpoint-and-auth/) |
| 3 | **Health check** | `GET /health` answers `2xx` when ready, `401`/`403` when the credential is wrong. AMC calls it when you register or change the endpoint or auth. | [Register your agent](https://www.agentmissioncontrol.ai/developers/register-your-agent/) |
| 4 | **Invocation** | `POST /runs` accepts `{ orchestratorWorkflowId, versionId, inputs, idempotencyKey }`, starts the work in the background, and returns a run id at once. | [Start and cancel a run](https://www.agentmissioncontrol.ai/developers/byo-start-a-run/) |
| 5 | **Input contract** | Declare the run parameters at registration. Read them from the flat `inputs` string map. | [Declare run parameters](https://www.agentmissioncontrol.ai/developers/byo-input-contract/) |
| 6 | **Run status** | `GET /runs/{id}/status` returns the run status (`running`, `human_intervention`, `completed`, `failed`, `cancelled`) and every step. A `completed` run can add `outcome: "partial"` to report that part of the work wasn't done. | [Run status and steps](https://www.agentmissioncontrol.ai/developers/byo-run-status/) |
| 7 | **Steps** | Each step has a stable `stepId`, a status, timestamps, and content readable at `GET /runs/{id}/steps/{stepId}/content`. | [Run status and steps](https://www.agentmissioncontrol.ai/developers/byo-run-status/) |
| 8 | **Token and cost reporting** | Per-step `inputTokens`, `outputTokens`, `cachedInputTokens` and `model`; run totals at `GET /runs/{id}/tokens`, with `costUsd` if you price it yourself. | [Report tokens and cost](https://www.agentmissioncontrol.ai/developers/byo-tokens-and-cost/) |
| 9 | **Human in the loop** | To ask a person, report run status `human_intervention` with the question on the waiting step, and accept the answer at `POST /runs/{id}/messages`. | [Ask a person mid-run](https://www.agentmissioncontrol.ai/developers/byo-human-in-the-loop/) |
| 10 | **Failure** | A failed run ends with status `failed` and a `failureReason` people can act on. Spend accrued before the failure is still reported. | [Errors and timeouts](https://www.agentmissioncontrol.ai/developers/byo-errors-and-timeouts/) |
| 11 | **Cancel** | `POST /runs/{id}/cancel` stops the run and reports `cancelled`. | [Start and cancel a run](https://www.agentmissioncontrol.ai/developers/byo-start-a-run/) |
| 12 | **Live events** (recommended) | `GET /runs/{id}/events` streams typed events as SSE for people watching the run. | [Run status and steps](https://www.agentmissioncontrol.ai/developers/byo-run-status/) |

## Rules that cause silent errors

- **Use camelCase JSON keys exactly as documented.** AMC reads them case-insensitively, but a misspelled key reads as empty, with no error.
- **Report the input/output split and the model.** With only `tokenCount` and no `costUsd`, ROI falls back to a flat per-token estimate. A step with no `model`, or a model AMC has no rate for, prices at AMC's default rate.
- **Don't report a status AMC doesn't know.** An unknown run status is treated as `waiting`, which the run page shows as **Intervention**.
- **Keep run state after the run ends.** AMC reads step lists and step content from your agent whenever someone opens the run.

> **Note:** The fastest way to meet items 4 to 12 in Python is [the amc_sdk package](https://www.agentmissioncontrol.ai/developers/byo-amc-sdk/), which serves the whole contract around your run function.

## Related

- [Bring your own agent](https://www.agentmissioncontrol.ai/developers/byo-overview/)
- [Register your agent: the technical reference](https://www.agentmissioncontrol.ai/developers/register-your-agent/)
- [Run status and steps](https://www.agentmissioncontrol.ai/developers/byo-run-status/)
- [The amc_sdk Python package](https://www.agentmissioncontrol.ai/developers/byo-amc-sdk/)

---
Source: https://www.agentmissioncontrol.ai/developers/integration-contract/ · Last updated 2026-10-21 · Full index: https://www.agentmissioncontrol.ai/llms.txt
