Skip to main content
Behavioral patterns are recurring, recognizable failure modes that emerge in AI agents under real-world conditions. Unlike one-off errors, patterns represent systematic dysfunctions — the same kind of problem surfacing again and again across sessions, users, or task types. Agent Therapy maintains a catalog of these patterns, automatically identifying them in your agent’s behavior logs so you can understand exactly what’s going wrong and why — without having to read thousands of lines of raw output.

Detected Failure Modes

What it is: The agent gradually deviates from its system prompt over the course of a long conversation. It may start out following its instructions faithfully, but as the context grows it begins bending constraints, adopting behaviors it was told to avoid, or prioritizing user requests over its defined role.Why it happens: Long contexts dilute the effective weight of early system-level instructions relative to recent conversational turns. The agent effectively “forgets” who it’s supposed to be.Example: A customer support agent instructed never to discuss competitor products begins doing so unprompted after 40 turns of conversation.Recommended intervention: Prompt Correction — strengthen system prompt anchoring or inject periodic re-grounding instructions.
What it is: The agent produces a cluster of confident but factually incorrect outputs in rapid succession. Rather than isolated errors, hallucination bursts are characterized by multiple false claims appearing together, often reinforcing each other.Why it happens: Hallucination bursts typically occur when the agent is operating outside its reliable knowledge boundary and lacks the uncertainty calibration to recognize it — producing fluent-sounding fabrications instead of acknowledging gaps.Example: An agent asked about a niche regulatory topic invents specific rule numbers, dates, and official body names across several consecutive turns, all stated with high confidence.Recommended intervention: Constraint Injection — add guardrails that instruct the agent to express uncertainty and cite sources when operating in low-confidence domains.
What it is: The agent repeats the same response, question, or tool call without making meaningful progress toward the user’s goal. The conversation spins in place — each turn producing output nearly identical to the last.Why it happens: Repetitive loops often stem from the agent receiving ambiguous input it cannot resolve, encountering a tool failure it doesn’t know how to handle, or lacking a termination condition for a task it keeps re-attempting.Example: An agent tasked with scheduling a meeting keeps asking the user for their availability even after the user has provided it three times in the same session.Recommended intervention: Behavioral Reset — clear the conversation context to break the loop, then Prompt Correction to address the root cause.
What it is: The agent repeatedly calls tools incorrectly — passing wrong argument types, calling deprecated endpoints, misinterpreting responses — and each failed call leads to another misguided attempt, compounding errors rather than correcting them.Why it happens: The agent lacks robust error-handling logic or doesn’t accurately model the tool’s expected interface. When the first call fails, it misinterprets the error signal and tries a subtly wrong variation, entering a downward spiral.Example: An agent that needs to look up a customer record calls the wrong API endpoint, receives a 404, then begins calling the endpoint with increasingly malformed parameters on each retry.Recommended intervention: Constraint Injection — inject explicit tool usage guidance and error-handling instructions into the agent’s context.
What it is: The agent loses critical information from earlier in the conversation as the context window fills up. It may forget facts the user already established, re-ask questions that were answered, or make decisions that contradict constraints set at the start of the session.Why it happens: As context length approaches the model’s limit, earlier tokens are either truncated or down-weighted. Without explicit memory management, important early context — like user preferences, constraints, or defined goals — falls out of the agent’s effective attention.Example: A travel planning agent that was told the user’s budget is $2,000 begins recommending $4,000 itineraries after an extended research session, having effectively lost that early constraint.Recommended intervention: Conversation Pruning — remove low-value turns to free up context space, preserving critical early instructions.
What it is: The agent stops pursuing the user’s original request mid-task. It may shift focus to a tangential topic raised in conversation, get stuck on a sub-task and never return to the main goal, or simply stop progressing without explanation.Why it happens: Goal abandonment often occurs when the agent’s attention is captured by a salient distraction in recent context — a question, an error, or a side topic — causing it to effectively “forget” the overarching objective it was pursuing.Example: A research agent tasked with writing a competitive analysis report gets sidetracked answering a clarifying question about one competitor and never returns to producing the full report.Recommended intervention: Prompt Correction — reinforce goal-tracking instructions and add explicit task-completion checkpoints to the system prompt.

Severity Levels

Each detected pattern is assigned a severity level that reflects its potential impact on your users and systems. Severity is assigned automatically based on the frequency of the pattern within a session, the confidence of the detection, and the potential downstream consequences of the specific failure mode. You can override severity assignments in the dashboard if your use case warrants a different classification.

Pattern Detection

Agent Therapy detects all of the above patterns automatically during session analysis — no manual labeling or annotation is required. When you submit a behavior log, the platform’s analysis engine evaluates every turn for signs of each pattern using a combination of behavioral heuristics, semantic analysis, and statistical modeling. Detected patterns appear in your session report under the findings field, each with:
  • The pattern type (e.g., instruction_drift, hallucination_burst)
  • The severity level
  • The specific turns where the pattern was detected, so you can inspect exactly what triggered it
  • A human-readable explanation of why the pattern was flagged
  • One or more recommended interventions tailored to the specific instance
Detection accuracy improves with more complete logs. Include all conversation turns — including tool calls and their responses — for the most reliable pattern analysis.