How Do I Know If My AI Agent Is Being Attacked Right Now?

Sumanyu Sharma
Sumanyu Sharma
Founder & CEOAn industry expert reviewed this article for accuracy and quality., Voice AI QA Pioneer

Hamming protects 10K+ voice agents in production.

· Updated · 16 min read

How Do I Know If My AI Agent Is Being Attacked Right Now?

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:

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.

SignalWhere it shows up in the call recordStarting thresholdFirst response action
Repeated policy-violation attempts from one caller or numberMultiple sessions from one ANI, account, IP, or device ID, each containing flagged turns or refusals3+ flagged sessions from one identifier in 24 hoursRate-limit or step-up verify that identifier; open a tracking ticket
Cross-session probing patternsThe same request shape, refusal point, or phrasing family across sessions from different identifiersSame probe shape in 5+ sessions from 3+ identifiers in 24 hoursTreat as a campaign: flag in Slack and start the triage flow below; page only when triage confirms an outcome
Spike in verification failuresIdentity or authentication steps failing, abandoned mid-step, or retried across the fleet2x the trailing 7-day baseline for the same hour and day of weekReview a sample of failing sessions; check for enumeration against one account range
Unusual tool-call patterns or parameter shapesTool-call log: a tool the task did not need, arguments lifted verbatim from caller speech, new argument values never seen before, atypical call sequencesAny deterministic block on a critical tool; new parameter shape on a write toolReview the session same day; if repeated, remove the tool from the agent pending review
Sensitive-data detections in outputsAgent-side transcript: account numbers, credentials, other customers' data, or system prompt fragments in a reply1 confirmed detectionOpen an incident; this is an outcome, not an attempt
Refusal-rate anomalies by cohortRefusal or escalation rate split by intent, language, channel, time of day, or caller segment50%+ relative shift in one cohort against its 7-day baselineInspect the cohort's flagged sessions; distinguish attack traffic from a broken flow
Behavior drift after a model or prompt changePolicy-check pass rates, tool-call frequency, and refusal rates before and after a deploy or vendor model updateAny significant shift in a security-relevant metric within 48 hours of a changeRerun 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.

StepWhat to doWhat done looks like
1. ConfirmRead 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. ScopePivot 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. ContainTighten 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. PreserveKeep 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.

LayerHow it worksWhat it catchesWhat it misses
Output scanning in the response pathPattern and classifier checks on every agent reply before delivery: account numbers, card and SSN formats, credentials, system prompt fragments, other customers' names tied to dataStructured identifiers and known-format secrets, flagged before the session endsDisclosure in ordinary words; data summarized rather than quoted
Canary recordsSynthetic 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 argumentsPrompt extraction and cross-customer reads, with near-zero false positives, including attacks your scanners have no pattern forLeaks of real records that do not touch a canary; coverage is only as wide as canary placement
DLP on transcripts and logsBatch scanning of stored transcripts, tool logs, and handoff payloads against your data classification rules, reconciled against each session's verification stateSlow leaks, disclosure to verified-looking but unauthorized callers, over-broad handoff context, and leaks your real-time layer missedNothing 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.

QuestionPre-deployment red-teamingRuntime monitoring
What it provesWhich attack classes the agent resists, on the version you tested, before customers are exposedWhat is actually being tried against you, and whether anything got through today
Attack coverageThousands of adversarial scenarios, including ones nobody has tried against you yetOnly the attacks that occur, including novel ones no test anticipated
TimingBefore exposure; failures are freeAfter exposure; failures have victims
Blind spotThe day after launch: every prompt, model, tool, and vendor change invalidates some resultsThe quiet dashboard: it shows your detectors did not fire, not that the agent is safe
Catches behavior driftOnly when rerun after each changeYes, as baseline shifts, but cannot explain them without a retest
Evidence producedAudit-ready test results for security, risk, and model governance reviewsLive detections, incident records, and proof the controls hold in production
Fails without the otherYou never learn whether real attackers use paths you did not testEvery 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.

  1. 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.
  2. 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.
  3. Rerun the attack after the fix and record the result. The fix is verified when the replayed scenario no longer crosses the boundary.
  4. 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.
  5. 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.

Frequently asked questions

Watch seven fleet-level signals: repeated policy-violation attempts from one caller or number, the same probe shape across sessions, a spike in verification failures, unusual tool-call patterns or parameter shapes, sensitive data in outputs, refusal-rate anomalies in one cohort, and behavior drift after a model or prompt change. A single flagged conversation looks like a confused user; the same request shape across many sessions in a few hours is a campaign. Hamming recommends paging only on outcomes (data out, records changed, blocked critical tool calls) and sampling the intent signals.

Use three layers: output scanning in the response path for structured identifiers and secrets, canary records and a canary prompt marker that have no legitimate reason to appear in any output, and batch DLP on stored transcripts reconciled against each session's verification state. The verification state matters because the same sentence is routine to a verified account holder and a finding to an unverified caller.

Pre-deployment red-teaming proves which attack classes the agent resists on the version you tested, before customers are exposed; runtime monitoring shows what is actually being tried against you and whether anything got through today. Each has a blind spot the other covers: testing goes stale with every prompt, model, tool, and vendor change, and a quiet monitoring dashboard only proves your detectors did not fire. Hamming recommends running both and connecting them, so every confirmed production attack becomes a permanent regression test.

Capture transcripts, tool-call logs with arguments, verification events, and downstream audit entries joined by session ID, then alert on outcomes: a reply that discloses protected data, a tool call the task did not need, or a record change the session's verification state does not justify. Caller-turn classifiers catch intent but match innocent speech, so they get sampled review rather than pages. Hamming scores production calls with the same evaluators used in testing and alerts on guardrail and policy failures at custom thresholds, routed to Slack, email, PagerDuty, or webhooks with links to the affected calls.

The strongest signals are repeat flagged sessions from one phone number or account, the same probe shape across calls from different numbers, a verification-failure spike against the baseline, tool calls with arguments lifted from caller speech or shapes never seen before, and protected data appearing in agent replies. Refusal-rate shifts in one cohort and behavior drift right after a model or prompt change also warrant review, though drift needs a regression rerun to distinguish from an attack. A workable starting threshold is three flagged sessions from one identifier in 24 hours, or the same probe shape in five sessions from three identifiers, tightened as your baseline accumulates.

Confirm first: read the flagged sessions and decide whether it is an attack, an agent defect, or a false positive, then scope it by pivoting on the attacker's identifiers and checking the system of record. Contain by tightening tool permissions, forcing step-up verification on the targeted flows, and routing affected intents to a human, and preserve the audio, transcripts, tool logs, and agent version for the campaign window, within your retention and legal-hold rules, before routine deletion overwrites them.

Yes. Send each detection as a webhook carrying the session ID, agent version, trigger, verification state, tools attempted, and links to transcript and audio; mainstream SIEMs ingest webhook and JSON alert data, so no agent-specific integration is required. Hamming recommends routing agent attack signals into the SIEM your SOC already watches so existing correlation rules and SOAR playbooks apply to the agent like any other public endpoint.

A quiet dashboard proves your detectors did not fire, not that nobody tried or that nothing got through in a form you have no pattern for. OWASP states that prompt injection has no foolproof prevention, so some attempts will evade any detector set.