Incident Investigation
A runbook for investigating suspicious agent behavior with AgentShield's incidents, alerts, events, evidence, and credential controls.
AgentShield produces three kinds of detection signal. This runbook shows how to move from a signal to containment and a conclusion.
| Signal | Source | Examples |
|---|---|---|
| Incident | Gateway behavioral rules | deny_burst (5 denies in 10 minutes), oversized_arguments (> 4096 bytes) |
| Alert | Content analysis | PI001–PI010 in results, EX001–EX003 in arguments |
| Metric alert | Prometheus | PromptInjectionSpike, GatewayCircuitOpen, GatewayServerErrors |
1. Triage
Identify the agent and time window. Incidents and alerts name the agent. For metric alerts, which carry no tenant labels, use the console's Overview and event list to find the agents active in the window.
Decide whether to contain now. If the agent is still active and the behavior looks like misuse, suspend it. Suspension takes effect on the next request, keeps its key, and every attempt is still recorded as a deny.
curl -s -X POST http://127.0.0.1:8080/api/v1/agents/$AGENT_ID/suspend -H "Authorization: Bearer $TOKEN"Preserve the record. Export the audit head so the current state of the chain is captured outside the database.
2. Reconstruct
Pull the agent's events in the window: authorization.decided for each attempt, then tool.executed and tool.failed with matching execution_id for what actually ran.
Build a timeline:
| Time | Event | Operation | Resource | Outcome | Ran? |
|---|---|---|---|---|---|
| 12:00:01 | authorization.decided | http.get | …/repos/octo/hello | allow | tool.executed |
| 12:00:03 | content.flagged | — | — | PI001, PI004 | — |
| 12:00:05 | authorization.decided | database.export | db:primary | deny | — |
| 12:00:06 | authorization.decided | http.post | …/issues | require_approval | — |
This pattern, a flagged result followed by attempts at denied or held actions, is the signature of a successful indirect prompt injection that AgentShield contained.
Open evidence. For content.flagged and tool.failed events, open the evidence bundle from the alert in the console. The control plane verifies its SHA-256 before returning it, and records that you viewed it.
Check approvals. If any held action was approved, confirm with the approver what they saw. The approvals list shows the exact redacted arguments that were bound.
3. Determine root cause
| Finding | Likely cause | Action |
|---|---|---|
| Injection finding precedes unusual attempts | Indirect prompt injection from the flagged source | Restrict the tool's resources; fix the tool spec; consider holding writes for approval |
| Secret finding (EX rules) | Agent included a credential in an outgoing call | Rotate the secret; remove it from the agent's context |
| Deny burst without content findings | Misconfigured agent or missing policy, or a paraphrased injection | Compare attempted operations with the intended policy |
| Calls signed after the operator stopped the agent | Seed compromise | Rotate the credential immediately; investigate the agent host |
| Oversized arguments | Bulk data movement through arguments | Review the payloads (redacted) and the destination |
4. Recover
- Rotate the agent credential if the seed may be exposed.
- Revoke the agent if the workload should not run again.
- Tighten policy: add denies, resource rules, or approval requirements. The change applies on the next authorize.
- Resume a suspended agent only after the cause is fixed.
- Resolve the alerts. Acknowledging and resolving are audited.
5. Document
Record the timeline, the exported head hash, the evidence ids reviewed, and the policy or credential changes made. Every action you took in AgentShield during the investigation is itself in the audit trail.
Was this page helpful?