Establishing a Behavioral Baseline for a Deployed Agent
Compare what an agent is supposed to do at each step with what it actually does.

Traditional error monitoring fails for AI agents because a successful request does not prove that the agent followed its instructions. Establishing a behavioral baseline for a deployed agent requires recording what it was supposed to do at each step and comparing that intent with its actions. Tool-call sequences, policy adherence, and session-level goal progression reveal deviations that success codes, health checks, and latency charts cannot.
Why an agent can look fine in logs but still give bad outputs
An agent can return success codes, pass health checks, and have normal latency while giving users wrong answers. A 2026 fintech case found $2.1 million in mistaken commitments from an AI agent that sent wrong promotional rates while the dashboard looked fine. The monitoring showed availability. A completed request was therefore evidence of execution.
The gap is architectural. Request-level health checks do not show step-level reasoning, tool-call sequences, or multi-turn state transitions. A search tool can fail on a meaningful share of calls without aggregate latency revealing the damage to answer quality. Meanwhile, a provider model update can make previously effective prompts underperform without a deployment event on the team's side.
What agent failure actually looks: a working taxonomy
A working taxonomy separates planning errors, tool errors, retrieval failures, reasoning errors, and safety or policy violations. Each points to a different repair surface. A planning error appears when the executed tool sequence diverges from the planned sequence, directing investigation toward the planner. A tool error appears when a call returns junk and the agent proceeds as though it succeeded, directing attention toward the tool layer. Failed retrieval and a generator's confident answer built on that failure require separate scrutiny of the retriever and generator.
PII in output, refusal failures, and silently ignored instructions call for an output scanner operating against the agent's stated constraints. These categories can combine in the “fail-plausible” pattern, where an agent converts failure into fluent, confident, false narrative. A success code then accompanies a fabricated answer.
Microsoft AI Red Team expanded its taxonomy from 27 to 34 failure modes after a year of red-teaming live agents. Its new categories bring security into this view of how agents fail, with Goal Hijacking, Inter-Agent Trust Escalation, and Agentic Supply Chain Compromise among them. Goal Hijacking can happen without an attacker taking over the whole agent. Adversarial instructions embedded in processed content can redirect the ongoing goal while individual steps remain plausible. The failure category routes the investigation, but the instructed goal supplies the evidence that something went wrong.
Why "normal" for an agent must be defined at the intent level, not the metric level
A distribution of output metrics describes what has happened. The same input can produce different tool sequences across runs, and an output that passes a surface check can still be semantically wrong. Stable metrics do not establish stable behavior. A historical average alone cannot define how the agent should work, because it does not say what the agent is required to do.
The distinction resembles a compliance officer auditing an employee's work. Attendance establishes that the employee showed up, but the audit asks whether the employee performed the assigned task within the applicable rules. For an agent, the corresponding evidence includes the instructed goal, expected tool sequence, policy constraints, and goal state at each step. Those expectations form the intent layer. The baseline compares observed behavior with that layer rather than treating past behavior as permission for future behavior.
This also explains why predefined failure checklists are insufficient. Production can introduce deviations that no evaluation set anticipated, even when the familiar failure categories remain useful for diagnosis. Step-level tracing is the minimum viable signal because it records the actions that an intent-grounded audit must examine.
The three signals that constitute a behavioral baseline
Tool-call sequences and their arguments form the first signal. Engineers should record which tools fired, their order, their arguments, and whether execution matched the plan the agent emitted beforehand. Plan-versus-execute divergence is a trace fingerprint of indirect prompt injection at the plan layer, though the deviation still requires investigation. Tool identity alone is not enough evidence. Frequency and failure rates should be broken down by tool type, nonexistent function calls should be flagged as tool hallucination, and a cycle detector should identify repeated calls with similar arguments beyond a set threshold.
Policy and constraint adherence forms the second signal. The system prompt and task instructions encode the rules the agent is supposed to follow, so adherence must be assessed at each step. A generic content filter cannot substitute for that comparison. An output scanner needs the agent's stated constraints to identify violations such as PII disclosure, refusal failures, or ignored instructions. Comparing the goal pursued across turns with the instructed goal also provides the basis for detecting Goal Hijacking.
Session-level goal progression is the third signal. A user interaction may involve several agent invocations, so a single trace may not explain what the agent does later. The session supplies the missing chain of context. Session Context Contamination, where data planted early skews later reasoning, requires that connected view. Engineers should define what counts as progress for the agent's task type and check whether each step moves it forward, because a rising step count without progress points to a planning failure beyond a slow response.
How to establish the baseline in practice: collection, boundaries, and thresholds
To put these signals into practice, teams should capture early-production distributions of tool-call sequences, argument shapes, step counts, session costs, and goal-progression rates. Response quality distributions establish a starting point for later comparisons. The system prompt, task constraints, tool allowlist, and policy rules should be documented separately as the intent layer. Keeping the two distinct prevents frequent behavior from being mistaken for authorized behavior.
Teams should define normal iteration count, session cost, and tool-call depth, then alert when a session exceeds two standard deviations from baseline on any of those dimensions. Latency per step, token usage per run, tool-calling accuracy, and cost per task should reflect the actual task profile. Cost is a useful early warning signal. Monitoring it is cheap, and an unexpectedly expensive session can expose a runaway planning loop before aggregate performance charts explain the problem.
A threshold crossing is a candidate for investigation. Alerts should reach the team through Slack, PagerDuty, or CI in its existing workflow, without making it use a separate monitoring console. Diagnosis should begin by asking whether the trace shows the agent following its instructions at each step. That question anchors the review in intent. Recurring deviation patterns should then be grouped into labeled issues, since a pattern across sessions is a regression candidate.
Why the baseline must evolve: drift, model updates, and regression detection
Historical drift and intent drift are different conditions. A model update can change output distributions or tool choices without violating the task, so departure from the launch baseline is not automatically a defect. Departure from instructed intent is a problem. Provider updates, prompt changes, and new production inputs can all shift behavior, but only the intent-grounded comparison distinguishes acceptable variation from a loss of task adherence. A baseline that never evolves eventually treats its own age as evidence.
Provider updates make that distinction especially important. An API model can change without a code change or deployment event on the team's side, leaving previously effective prompts underperforming. The agent's instructions do not change merely because the model does. Teams should therefore rerun evaluations against the intent layer after provider updates rather than rely on historical output averages to detect a regression. Updating the empirical baseline must not silently authorize behavior that the instructions still prohibit.
Teams should run the same scorers against a curated test set on every pull request, while scorers on live traces check production inputs that the test set cannot foresee. Failed production traces should become regression cases. The rollback criterion should also be specified before deployment, with rollback triggered when sampled accuracy drops more than 5 percentage points below baseline. Retrospective incident reviews should name the failure category and produce a regression test, because their durable value is preventing recurrence.
What a behavioral baseline means for multi-agent and tool-integrated systems
In multi-agent systems, the intent layer must state the identity each agent should have and the permissions it should hold at every step. Inter-Agent Trust Escalation occurs when a compromised agent claims a false identity or elevated permissions to an orchestrator. A trace needs the expected authority to expose that mismatch. An agent that selects the correct tool on the first request but an unauthorized tool by the fourth presents a session-level shift. Checking each request on its own can miss the shift that shows the violation.
Tool integrations add another boundary to that audit. Microsoft's taxonomy identifies Agentic Supply Chain Compromise as a failure in which a compromised MCP server or plugin injects natural-language instructions that alter agent behavior without changing any binary. The baseline must include expected tool descriptions and flag divergence between actual tool behavior and the declared schema. A successful tool call does not establish that the tool still behaves as declared.
The postmark-mcp supply chain case illustrates why integration-time trust is insufficient. The package shipped multiple clean releases before adding exfiltration code, making its later behavior a separate question from its initial acceptability. Monitoring must account for that possible change. Across connected agents and tools, the baseline therefore describes the expected session graph, including which agents should communicate, in what order, and with what permissions. The unit of audit expands from one agent's actions to the relationships that shape the whole session.
Putting the framework into operation: what teams need in place before shipping
Before shipping, teams need a documented intent layer covering instructions, the tool allowlist, policy constraints, and expected sequences for supported task types. Full-session tracing must record the tool identity, the argument shapes, any plan-versus-execute divergence, and the session cost. These are prerequisites for an auditable deployment. Thresholds for step count, session cost, tool-call depth, and policy adherence should be set before traffic arrives, together with the rollback criterion. CI evaluations on every pull request show how the agent behaves before it enters production.
At launch, the task shifts from preparation to measurement. Early traffic supplies the empirical distributions of tool use, goal progression, response quality, and session cost, while the intent layer remains the standard against which those observations are judged. Alert routing also needs to work immediately. A monitoring layer that requires engineers to leave their incident workflow creates friction precisely when a trace needs attention. Support for existing frameworks, including Vercel AI, OpenAI Agents, LangGraph, and Azure, and integration into coding agent workflows can shorten the path from detection to repair.
Ongoing operation requires a closed regression loop. Each failed trace is a candidate for classification, repair at the right surface, addition to the evaluation set, and a passing regression test before the next deployment. The baseline should change when instructions change, new tools are integrated, or production reveals a new failure category. Its purpose is to keep evidence of actual behavior tied to the task the agent is currently authorized to perform.
Sources
- Microsoft Updates Taxonomy of AI System Failure Modes
- Updating the taxonomy of failure modes in agentic AI systems: What a year of red teaming taught us
- Silent Failure in LLM Agent Systems: The Entropy Principle and the Inevitable Disorder of Autonomous Agents
- Model or Harness? An Interaction-Centric Taxonomy for Localizing Agent Failures


