Contain an agent that went wrong
Not in the plan. Needs ID agent tokens accepted everywhere (LDG-2264, Planned).
Use case
Contain an agent that went wrong: a workflow across PromptCompute, RepoOps, CommitOps, ContextFile that starts from a person, an alert, or a PromptCompute deny pattern.
Who would use it
Security and platform leads when an agent key leaks or an agent starts doing harm.
What value it provides
One run revokes the agent version everywhere, lists what it touched, opens an incident and files a lesson.
Why it matters to the user
Agents now hold more credentials than people. Containment needs to take minutes, not an afternoon of tabs.
The problem
When an agent misbehaves, teams cannot see what it touched, and they rotate keys in each tool by hand while it keeps running.
Expected outcomes
- Minutes from trigger to revoked in every product
- Products that confirmed revocation: target all
- Actions found in the blast radius
Each run records its outcome as met, not met or not measured.
How it runs
Products and connections
| Product | Role in this workflow | Docs |
|---|---|---|
| PromptCompute | Revoke the agent version and its grants; Revoke its tokens in every other product | Reference · PromptCompute docs |
| RepoOps | List what it touched (get_agent_blast_radius); Open an incident and a lesson | Reference · RepoOps docs |
| CommitOps | Revoke its CommitOps credential | Reference · CommitOps docs |
| ContextFile | Reference · ContextFile docs |
Outside the family: GitHub, Your cloud provider (optional).
What a person approves
| Action | Default risk |
|---|---|
access.revoke | critical |
repoops.request_key_rotation | high |
commitops.credential.revoke | high |
Action keys are from the PromptCompute catalog.
How to access it from an agent
An agent will run this workflow through the PromptReports MCP server or API, with an ID agent token. The runner will then call each product for it. Proposed
// MCP: https://mcp.promptreports.ai/mcp (Proposed)
start_run({
workflow: "contain-an-agent",
inputs: { "agent": "agt_...", "version": "agv_... or all versions" },
dry_run: false
})
// returns { run_id, status: "running", approvals_url }
get_run({ run_id }) // poll, or subscribe to run eventscurl -X POST https://api.promptreports.ai/v1/runs \
-H "Authorization: Bearer $PROMPTREPORTS_AGENT_TOKEN" \
-d '{"workflow":"contain-an-agent"}'Or call the products yourself, step by step:
| Product | Endpoint | Tools |
|---|---|---|
| PromptCompute | https://mcp.promptcompute.ai/mcp | request_approval get_approval cancel_approval answer_approver |
| RepoOps | https://mcp.repoops.ai/mcp | search_brain get_pre_edit_context propose_brain_entry get_incident_attribution |
| CommitOps | https://commitops.ai/api/mcp | whoami list_assertions get_assertion promised_not_started |
| ContextFile | Built | to confirm |
Set it up
- Sign in at app.promptreports.ai with PromptReports ID, and pick your org.
- Connect PromptCompute, RepoOps, CommitOps, ContextFile on the Connections page. Link GitHub, Your cloud provider (optional) through the product that uses it.
- Register the agent that will run it on the Agents page, and give it a version manifest.
- Set the approval policy for access.revoke, repoops.request_key_rotation, commitops.credential.revoke. Start with Require approval; critical actions are never auto.
- Fill in the inputs (Agent, Version) and choose the trigger: a person, an alert, or a PromptCompute deny pattern.
- Start a dry run. It will count no workflow request, and it shows which steps would record missing evidence.
- Start the run. Approve each gate in the approvals inbox, then read the signed record when it ends.