Skip to Content
AgentShield
Operations

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.

SignalSourceExamples
IncidentGateway behavioral rulesdeny_burst (5 denies in 10 minutes), oversized_arguments (> 4096 bytes)
AlertContent analysisPI001–PI010 in results, EX001–EX003 in arguments
Metric alertPrometheusPromptInjectionSpike, 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:

TimeEventOperationResourceOutcomeRan?
12:00:01authorization.decidedhttp.get…/repos/octo/helloallowtool.executed
12:00:03content.flagged——PI001, PI004—
12:00:05authorization.decideddatabase.exportdb:primarydeny—
12:00:06authorization.decidedhttp.post…/issuesrequire_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

FindingLikely causeAction
Injection finding precedes unusual attemptsIndirect prompt injection from the flagged sourceRestrict the tool's resources; fix the tool spec; consider holding writes for approval
Secret finding (EX rules)Agent included a credential in an outgoing callRotate the secret; remove it from the agent's context
Deny burst without content findingsMisconfigured agent or missing policy, or a paraphrased injectionCompare attempted operations with the intended policy
Calls signed after the operator stopped the agentSeed compromiseRotate the credential immediately; investigate the agent host
Oversized argumentsBulk data movement through argumentsReview 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?

On this page