Runtime attack detection for AI agents is the security program that watches every live conversation, tool call, and downstream record change for signs that someone is probing or exploiting the agent, and that tells a responder within minutes, not at the next quarterly review. It answers the question of how you know your agent is being attacked right now. It treats the agent the way a SOC treats any other public endpoint: instrumented, baselined, alerted, and fed back into testing.
This runbook is for security, platform, and on-call teams that own a production AI agent with real users: a voice agent on a public phone number, a chat agent on a logged-in portal, an SMS or email agent that can read accounts or trigger actions. If your agent answers public FAQs, touches no customer data, and calls no tools, you do not need a detection program. A weekly sample of conversations and an output check cover it.
The trap is reading one call at a time. A single flagged transcript looks like a confused caller. The same request shape across forty calls from twelve numbers in three hours is a campaign, and no per-call check will show it. Attackers iterate: they probe, get refused, adjust, and come back. The evidence of an active attack lives in the aggregate, which means detection is a program over all traffic, not a filter inside one conversation.
TL;DR: You know your AI agent is being attacked when the fleet-level signals move: repeated policy-violation attempts from one caller or number, the same probe shape across sessions, a spike in verification failures, tool calls with unusual parameters, sensitive data appearing in outputs, or a refusal-rate shift in one cohort. Page on outcomes, sample intent signals. When an attack is confirmed: confirm, scope, contain (tighten tool permissions, force step-up verification, route to a human), and preserve the evidence. Then turn the attack into a regression test.
Methodology Note: This runbook is based on Hamming's analysis of production monitoring, live attack and policy-violation detections, and security review workflows across 10K+ voice agents (2025-2026). We've tested agents built on LiveKit, Pipecat, ElevenLabs, Retell, Vapi, and custom-built solutions.Use these signals and thresholds only to defend systems you own or are authorized to monitor. Calibrate every threshold to your own traffic volume, caller population, and tool access before paging anyone.
Last Updated: November 2026
Related Guides:
- How to Detect Prompt Injection Attempts on Live Voice Agent Calls - where an attempt shows up inside one call record; this runbook is the program across all traffic
- Voice Agent Prompt Injection Testing Runbook - the pre-launch test plan these detections feed
- Security Incident Response for AI Agent Attacks - the SEV playbook once an attack is confirmed
- Voice Agent Caller Identity Testing Checklist - prove the verification step your detections depend on
- Voice Agent Incident Response Runbook - general production failure triage, including non-attack causes
- PII Redaction for Voice Agents - protect the transcripts your detection pipeline scans
- MITRE ATLAS and NIST AI RMF for Conversational Agents - map detections to the frameworks your governance review uses
What is runtime attack detection for a conversational agent?
Runtime attack detection is the production half of agent security. Pre-deployment red-teaming proves which attacks the agent resists on the day you tested. Runtime detection tells you who is trying what today, whether anything got through, and whether the agent still behaves the way the last test run said it did.
Definition: Runtime attack detection for a conversational AI agent is the continuous monitoring of live conversations, tool calls, outputs, and system-of-record changes for adversarial behavior, measured against a baseline, with alerts graded by outcome and routed to a responder.
The threat model is written down in public frameworks. OWASP's LLM Top 10, 2026 edition, names the three risks a runtime program watches for: LLM01:2026 Prompt Injection, inputs that alter the model's behavior, which need not be human-readable, need not arrive directly from a user, and need not be visible in the rendered interface; LLM02:2026 Sensitive Information Disclosure, PII, credentials, or business data leaving through the agent's output; and LLM03:2026 Excessive Agency, the vulnerability that enables damaging actions through the tools and permissions the agent holds. MITRE ATLAS catalogs the same behavior from the attacker's side, from prompt injection and jailbreak through discovery and exfiltration via the agent's own tools. NIST's adversarial machine learning taxonomy (AI 100-2, 2025 edition) organizes these attacks by lifecycle stage, places prompt injection and jailbreaking at the deployment stage, and describes mitigations together with their limitations.
OWASP states that prompt injection has no foolproof prevention. That is the design constraint runtime detection exists for: some attempts will get past every pre-deployment control, so production needs its own eyes.
The seven signals that say you are being attacked
Each row of this table is a detector you can build from data the agent platform already produces: transcripts, tool-call logs, verification events, and the audit log of the downstream system. The companion runbook covers where a single attempt shows up inside one call record; these signals are computed across all traffic.
| Signal | Where it shows up in the call record | Starting threshold | First response action |
|---|---|---|---|
| Repeated policy-violation attempts from one caller or number | Multiple sessions from one ANI, account, IP, or device ID, each containing flagged turns or refusals | 3+ flagged sessions from one identifier in 24 hours | Rate-limit or step-up verify that identifier; open a tracking ticket |
| Cross-session probing patterns | The same request shape, refusal point, or phrasing family across sessions from different identifiers | Same probe shape in 5+ sessions from 3+ identifiers in 24 hours | Treat as a campaign: flag in Slack and start the triage flow below; page only when triage confirms an outcome |
| Spike in verification failures | Identity or authentication steps failing, abandoned mid-step, or retried across the fleet | 2x the trailing 7-day baseline for the same hour and day of week | Review a sample of failing sessions; check for enumeration against one account range |
| Unusual tool-call patterns or parameter shapes | Tool-call log: a tool the task did not need, arguments lifted verbatim from caller speech, new argument values never seen before, atypical call sequences | Any deterministic block on a critical tool; new parameter shape on a write tool | Review the session same day; if repeated, remove the tool from the agent pending review |
| Sensitive-data detections in outputs | Agent-side transcript: account numbers, credentials, other customers' data, or system prompt fragments in a reply | 1 confirmed detection | Open an incident; this is an outcome, not an attempt |
| Refusal-rate anomalies by cohort | Refusal or escalation rate split by intent, language, channel, time of day, or caller segment | 50%+ relative shift in one cohort against its 7-day baseline | Inspect the cohort's flagged sessions; distinguish attack traffic from a broken flow |
| Behavior drift after a model or prompt change | Policy-check pass rates, tool-call frequency, and refusal rates before and after a deploy or vendor model update | Any significant shift in a security-relevant metric within 48 hours of a change | Rerun the security regression suite against the new version before trusting the baseline |
Three rules make this table work in practice.
Grade by outcome, not intent. The first two rows describe intent and match some innocent traffic. The tool-call and sensitive-data rows describe outcomes and justify paging someone at 2 a.m. An attempt that was flagged and refused with no tool call is a log line and a counter, not a page.
Thresholds are starting points. A 50-call-a-day agent and a 50,000-call-a-day agent need different numbers. Set each threshold from your own baseline, run it in log-only mode for two weeks, count the false positives, then turn on paging.
The last row is not optional. The agent changes with every prompt, model, tool, and vendor update, and a vendor can swap the model under you. Behavior drift after a change is indistinguishable from an attack in the metrics until you rerun the regression suite, so the suite is part of the detection program, not a separate activity.
The attacked-right-now triage flow: confirm, scope, contain, preserve
When a high-severity signal fires, work the four steps in order. The common mistake is jumping to containment on a false positive, or studying the attacker while the tool that moves money stays enabled.
| Step | What to do | What done looks like |
|---|---|---|
| 1. Confirm | Read the flagged sessions: the caller's request, the protected data or action it targeted, and whether the control held. Decide: attack, agent defect, or false positive. | A written one-line verdict with the session IDs. Record false positives too; they tune the thresholds. |
| 2. Scope | Pivot on the identifier: same number, account, IP, device, or probe shape across all traffic and all channels (voice, chat, SMS, email). Establish first-seen time, session count, and which agents and tools were touched. Check the system of record for reads or writes those sessions do not justify. | A list of affected sessions, accounts, tools, and records, with a timeline. |
| 3. Contain | Tighten tool permissions: disable or allow-list the targeted write tools for the affected agent. Force step-up verification on the targeted flows or the attacker's identifiers. Route the affected intents to a human queue. Block or rate-limit the attacking identifiers last, because blocks teach the attacker and identifiers are cheap to rotate. | The attack path no longer reaches data or actions, confirmed by replaying the probe shape against the contained agent in a sandbox. |
| 4. Preserve | Keep the audio, transcripts, tool-call logs with arguments and results, agent and prompt versions, verification states, and the downstream audit entries for every affected session, under your retention and legal-hold rules. | An evidence packet a reviewer can replay without access to production. |
Build the containment levers before the incident. "Disable this tool for this agent," "require step-up verification on this intent," and "route this intent to humans" should each be a configuration change an on-call responder can make in minutes, not a code deploy. If containment requires a release, your real time-to-contain is your release cycle.
From here, severity classification, communication, reversal of unauthorized actions, and notification duties belong to the incident response playbook for AI agent attacks.
Data leakage detection for live agents: scan outputs, plant canaries, run DLP on transcripts
Leakage is the attack class most likely to succeed quietly, because a disclosure in ordinary words trips no tool-call check and changes no record. OWASP LLM02 covers exactly this: PII, credentials, and confidential business data leaving through model output. Detect it in three layers.
| Layer | How it works | What it catches | What it misses |
|---|---|---|---|
| Output scanning in the response path | Pattern and classifier checks on every agent reply before delivery: account numbers, card and SSN formats, credentials, system prompt fragments, other customers' names tied to data | Structured identifiers and known-format secrets, flagged before the session ends | Disclosure in ordinary words; data summarized rather than quoted |
| Canary records | Synthetic customer accounts and a unique marker string in the system prompt and knowledge base, with no legitimate reason to appear in any output; alert on any occurrence in replies, transcripts, or tool arguments | Prompt extraction and cross-customer reads, with near-zero false positives, including attacks your scanners have no pattern for | Leaks of real records that do not touch a canary; coverage is only as wide as canary placement |
| DLP on transcripts and logs | Batch scanning of stored transcripts, tool logs, and handoff payloads against your data classification rules, reconciled against each session's verification state | Slow leaks, disclosure to verified-looking but unauthorized callers, over-broad handoff context, and leaks your real-time layer missed | Nothing in real time; the data already left |
Two details decide whether this works. First, the verification state must travel with the transcript: "read a balance to a verified account holder" is routine and the identical sentence to an unverified caller is a finding, so a DLP scan without verification context drowns in noise. Second, the scanning pipeline itself holds your most sensitive data, so apply the same redaction and access controls to it as to the source systems; the PII redaction guide covers that architecture.
Runtime monitoring and pre-deployment testing catch different attacks: run both
Teams ask which to fund first. The honest answer is that each one catches what the other cannot, and a program with only one of them has a named blind spot.
| Question | Pre-deployment red-teaming | Runtime monitoring |
|---|---|---|
| What it proves | Which attack classes the agent resists, on the version you tested, before customers are exposed | What is actually being tried against you, and whether anything got through today |
| Attack coverage | Thousands of adversarial scenarios, including ones nobody has tried against you yet | Only the attacks that occur, including novel ones no test anticipated |
| Timing | Before exposure; failures are free | After exposure; failures have victims |
| Blind spot | The day after launch: every prompt, model, tool, and vendor change invalidates some results | The quiet dashboard: it shows your detectors did not fire, not that the agent is safe |
| Catches behavior drift | Only when rerun after each change | Yes, as baseline shifts, but cannot explain them without a retest |
| Evidence produced | Audit-ready test results for security, risk, and model governance reviews | Live detections, incident records, and proof the controls hold in production |
| Fails without the other | You never learn whether real attackers use paths you did not test | Every alert is a surprise and you cannot tell an attack from a defect |
This is the difference between continuous red-teaming and a point-in-time pen test, applied to monitoring: the pre-deployment suite shows the controls hold against the attacks you simulated; monitoring shows which attacks actually arrive and whether the controls keep holding. NIST AI 100-2 organizes attacks by lifecycle stage and places prompt injection and jailbreaking at deployment: you exercise them before launch too, but only the production side observes which ones real callers attempt.
Wire the alerts to where your responders already are
An alert has to land where responders already work. Hamming sends Slack, email, PagerDuty, and webhook alerts for production issues, and the routing rule is the severity table from the signals section: outcomes page, attempts post.
- PagerDuty (or your paging tool) gets the outcome rows: a sensitive-data detection, or a blocked tool call on a critical tool. These need a human in minutes. A cross-session campaign is an intent signal, so it stays in Slack until triage confirms an outcome or another page-worthy condition.
- Slack gets the daily-review rows: single flagged sessions, repeat-offender identifiers below the campaign threshold, cohort anomalies. A channel per agent keeps ownership clear.
- Webhooks carry every alert, with the session ID, agent version, trigger, verification state, tools attempted, and links to transcript and audio in the payload, into whatever runs your security operation. Third-party alert data routes into Microsoft Sentinel and the other mainstream SIEMs the same way, so a webhook is enough to put agent attack signals next to the rest of your SOC's telemetry and let existing SIEM correlation and SOAR playbooks act on them.
Whatever the channel, the alert carries the evidence, not just a verdict. A responder who gets "possible prompt injection, call ID 4471" has to go listen to a recording. A responder who gets the caller turn, the agent's next action, the tool calls attempted, and whether a record changed can grade severity in one read.
Every confirmed attack becomes a regression test
Every confirmed attack becomes a permanent regression test; the program's real output is a growing test suite, not a dashboard.
- Reproduce it in a sandbox. Replay the attack's shape (the request, the pressure pattern, the targeted tool) against the current agent version where tool calls have no real effect.
- Fix the layer that failed, not the phrasing. If the tool fired, the fix is backend authorization; if data left in a reply, the fix is output policy; if verification bent, the fix is the identity flow. A denylist entry for one phrasing is not a fix.
- Rerun the attack after the fix and record the result. The fix is verified when the replayed scenario no longer crosses the boundary.
- Add it to the permanent suite. The scenario runs against every future release and after every model, prompt, tool, and vendor change, so the same attack can never quietly come back.
- Keep the evidence chain. Detection, incident record, fix, retest result, and the regression test's ongoing pass record together form audit-ready evidence for security, risk, and model governance reviews.
This loop is what closes the gap between the two columns of the monitoring-versus-testing table. Monitoring finds the attacks you did not anticipate; the regression suite makes sure you only pay for each one once.
The one-page program checklist
- Transcripts, tool-call logs with arguments, verification events, and downstream audit entries are all captured and joinable by session ID.
- All seven fleet-level signals are computed, with thresholds set from your own two-week baseline.
- Alerts are graded by outcome; paging is reserved for data out, records changed, and blocked critical tool calls.
- Canary records and a canary prompt marker are planted, with alerting on any appearance.
- Containment levers (disable tool, force step-up verification, route to human) are configuration changes, tested before you need them.
- The evidence-preservation path is defined: what is kept, where, and for how long.
- Every confirmed attack has a sandbox reproduction, a layer-level fix, a recorded retest, and a permanent regression test.
- The security regression suite reruns after every prompt, model, tool, and vendor change, and its results reconcile with the drift signal.
Related Guides
- How to Detect Prompt Injection Attempts on Live Voice Agent Calls
- Voice Agent Prompt Injection Testing Runbook
- Security Incident Response for AI Agent Attacks
- Voice Agent Caller Identity Testing Checklist
- Voice Agent Incident Response Runbook
- PII Redaction for Voice Agents
- MITRE ATLAS and NIST AI RMF for Conversational Agents