Quickstart: add approvals to an AI agent in minutes
Create your first Contro1 request, route it to the right operator, and return a signed callback to your agent.
Core API
A practical walkthrough of the Contro1 runtime API: which endpoint an agent calls, when to call it, what to send, and how approvals, audit records, traces, and evidence fit together.
Start here if you are wiring an AI agent, workflow, or tool into Contro1. This guide explains the runtime API as a developer story: create a key, preview control, create approval requests, log autonomous actions, trace runs, read state, and export signed evidence.
Contro1 sits at the boundary where an agent is about to do something that needs accountability. The agent can ask for approval before the action, record an autonomous action after it happens, or fetch the state and evidence attached to a previous decision.
The runtime API is intentionally small. You use one bearer API key, one v1 base URL, and a handful of endpoints that cover control, approvals, audit, traceability, and proof.
| Need | Call | Why |
|---|---|---|
| Check whether a request can be routed | POST /requests/control-map | Optionally preview reviewers, role mappings, on-shift coverage, and policy satisfiability for complex routing. |
| Pause for a human decision | POST /requests | Create the approval, review, yes/no, free-text, or decision request. |
| Read request state | GET /requests/:id | Poll or inspect the current state if you are not only relying on webhook callbacks. |
| Cancel a pending request | DELETE /requests/:id | Stop a request before an operator completes it. |
| Log an action without pausing | POST /audit-records | Record autonomous activity, tool calls, workflow steps, or policy events. |
| Rebuild one conversation or case | GET /threads/:thread_id | Read requests and audit records that share the same thread. |
| Rebuild one agent run | GET /traces/:trace_id | Read the execution span across requests, tool calls, and sub-agents. |
| Inspect agent identity and scope | GET /agents/:agent_id | See the runtime view of one agent: verification, status, scopes, and activity. |
| Export proof | GET /requests/:id/evidence or /agents/:id/evidence | Return signed evidence packets for one decision or one agent. |
Every runtime call uses the same base URL and bearer key. For a pilot, one API key is enough: it creates a verified base agent and lets Contro1 discover caller-declared agents as claimed children. For production, use separate keys by agent, tool, department, or environment when you want cleaner ownership and isolation.
Use a request when the agent must wait before continuing. This is the normal path for refunds, discounts, data exports, production changes, customer messages, access changes, and other actions where a human decision should exist before the agent acts.
The request should explain the action, who or what is asking, what the risk is, and how the agent should continue after the decision. If your workflow can resume from a webhook, include callback_url and verify the signed callback before continuing.
Build the context at the gate, not in the prompt. Copy the exact tool input your code intercepted (machine-observed fact), attach the message or event that triggered the run, and carry the agent's justification by making reason a required parameter of the risky tool. Keep agent-written text labeled as agent-reported: it informs the reviewer but must never change routing or risk_level, because a prompt-injected agent writes very persuasive reasons.
Use control-map when the agent or operator needs a routing preview for role-based approvals, separation of duties, manual routing targets, on-shift coverage, or quorum.
The approval request is still the source of truth. If routing is not ready, treat the preview as context, not a denial; create or keep the approval request when the action still needs review and wait for the final signed decision.
Not every event needs human approval. Use audit records when the agent did something that should be searchable later: a tool call, a policy warning, a low-risk automated action, a model-generated recommendation, or a retrieval step that explains why a later approval was requested.
Audit records are also how you make trace views richer. They can share trace_id, thread_id, correlation_id, actor, tool_calls, and metadata with approval requests.
The smallest request can work without trace fields, but the operating value comes from sending enough context to reconstruct what happened. actor.agent_id tells Contro1 which agent claims the action. trace_id links all events from one run. parent_trace_id links sub-agent runs to parent runs. tool_calls and retrieved_context explain what the agent used.
A caller-declared actor.agent_id is treated as claimed until the organization verifies it. That keeps onboarding easy without trusting a runtime string as a verified identity.
The same claimed-versus-verified thinking applies inside each request: tool_calls, retrieved_context, and the triggering event are machine-observed when your gate recorded them; a justification or summary the model wrote is agent-reported. Both belong in the record, but label them so reviewers and auditors know which is fact and which is the agent's claim.
| Field | Send when | What it unlocks |
|---|---|---|
| actor.agent_id | Every agent request or audit record | Agent Inventory, per-agent history, claimed vs verified identity. |
| actor.agent_name | When available | Readable inventory names instead of raw ids. |
| trace_id | Every step in one run | Trace reconstruction across requests, records, tools, and callbacks. |
| parent_trace_id | Sub-agent or delegated run | Tree view of parent and child agent work. |
| thread_id | Conversation or case timeline | Combined timeline of related requests and audit records. |
| correlation_id | Business object id exists | Search by order, customer, incident, ticket, or workflow id. |
| tool_calls[] | A tool was called | Reviewer context and later evidence about what the agent actually did. |
| retrieved_context[] | RAG/search/DB context was used | Proof of the data behind the agent decision. |
Most production integrations continue from a signed webhook callback. Polling is still useful for development, retries, dashboards, and systems that cannot receive callbacks.
GET /requests/:id returns the request state, operator response, protocol response, routing details, timestamps, and decision context. Your agent should continue only after the request reaches a completed decision state that your workflow accepts.
Use thread timelines when you want the story of a case or conversation. Use trace timelines when you want the story of one agent execution. Use agent trail when you want the history of one specific agent.
| Question | Call |
|---|---|
| What happened in this customer case? | GET /threads/:thread_id |
| What happened in this agent run? | GET /traces/:trace_id |
| What did this agent do over time? | GET /agents/:agent_id/trail |
| What agents has this key/org discovered? | GET /agents |
| What is this agent allowed to do? | GET /agents/:agent_id |
Evidence endpoints return signed packets that include agent identity, trace context, tool calls, retrieved context, decisions, timestamps, and an integrity signature.
Use request evidence when you need proof for one decision. Use agent evidence when you need proof of the activity attached to one agent. Add ?format=csv to the agent evidence endpoint when you need a spreadsheet-friendly export.
A useful rule: if the agent has not acted yet and needs permission, create a request. If the agent already acted or the event is informational, create an audit record. If you need to understand or prove what happened, read request state, trace, trail, or evidence.
| Situation | Call |
|---|---|
| Agent wants to send an offer, discount, refund, export, deploy, or message | POST /requests |
| Agent wants to know whether the right reviewers exist before asking | POST /requests/control-map |
| Agent performed a low-risk step and you want a record | POST /audit-records |
| Agent called a tool and you want it visible in the run history | POST /audit-records with action=tool.call |
| Workflow needs the decision result without waiting for a webhook | GET /requests/:id |
| Workflow should stop a pending approval | DELETE /requests/:id |
| Developer wants the entire run tree | GET /traces/:trace_id |
| Developer wants everything tied to a case or conversation | GET /threads/:thread_id |
| Security wants to inspect agent inventory through the runtime API | GET /agents |
| Compliance wants proof for one decision or agent | GET /requests/:id/evidence or GET /agents/:id/evidence |
The signed webhook is cryptographic proof of a human decision. Verify it inside the system that executes the action - not inside the agent. Any tool that must never run without human sign-off (payments, deploys, data deletion) should refuse to act without a verified approval; that way no agent, including shadow agents nobody registered, can trigger it by skipping Contro1.
Use https://api.contro1.com/api/centcom/v1 for runtime calls from agents, workflows, tools, and connectors.
No. Use it for higher-risk or policy-sensitive actions where a routing preview is useful. The approval request itself remains the workflow gate.
Usually yes. Requests pause the workflow for a human decision. Audit records capture context, autonomous steps, tool calls, and events that make the final decision easier to understand later.
Yes. One key is fine for quick-start discovery. As you move to production, split keys by agent, tool, department, or environment for clearer ownership, scopes, and evidence.
Create your first Contro1 request, route it to the right operator, and return a signed callback to your agent.
A compact map of the public Contro1 runtime API: request creation, Control Map preview, audit records, and thread timelines.
Learn how to create, inspect, and cancel Contro1 requests for approvals, clarifications, and escalations.
Use Contro1 audit records to log actions that agents are authorized to run autonomously, and correlation_id to connect requests and logs into one case timeline.
Give every agent a verified identity, scope its authority (least agency), reconstruct any run end-to-end (tools, sub-agents, retrieved context), and export HMAC-signed evidence.
Validate signed Contro1 callbacks and safely resume AI workflows after approvals, rejections, expirations, or escalations.