Skip to main content
An intervention is a targeted, evidence-based corrective action that Agent Therapy applies to address a specific behavioral problem identified in your agent. Rather than rebuilding your agent from scratch or guessing at what went wrong, interventions are precise — grounded in the findings from a diagnostic session and designed to correct the identified issue while leaving healthy behavior untouched. Each intervention type targets a different class of problem, so you apply the right fix for the right failure mode every time.

Intervention Types

Prompt Correction

Rewrites or supplements your agent’s system prompt to address instruction drift, goal abandonment, or behavior that contradicts the agent’s intended role. Agent Therapy generates a specific prompt amendment based on the session findings — you review it, edit if needed, and apply it.Best for: Instruction Drift, Goal Abandonment, Hallucination Burst

Constraint Injection

Adds targeted guardrails to the agent’s active context to prevent a specific failure behavior from continuing. Unlike a full prompt rewrite, constraint injection inserts a focused, scoped directive — for example, a prohibition on making a certain type of tool call, or an instruction to express uncertainty in a particular domain.Best for: Hallucination Burst, Tool Call Failure Cascade

Behavioral Reset

Clears the agent’s current conversation context to break out of a repetitive loop or stop a cascading failure from compounding further. The agent restarts with a clean context, re-grounded in its system prompt. Behavioral Reset is the fastest way to stop active dysfunction.Best for: Repetitive Loop, Tool Call Failure Cascade

Conversation Pruning

Removes specific turns from the agent’s context window — typically low-value exchanges, erroneous tool responses, or turns that are crowding out critical early context. Unlike a full reset, pruning preserves the conversational thread while freeing up context space and removing noise.Best for: Context Overflow, Repetitive Loop

When to Use Each Type

Use this reference to match a detected failure mode to the most appropriate intervention. In many cases, a combination of intervention types produces the best outcome.
Agent Therapy’s session reports include a tailored intervention recommendation for each finding — you don’t need to select the type manually unless you want to override the suggestion.

Applying an Intervention

You can apply an intervention through the dashboard or directly via the API.

Via the Dashboard

  1. Open any session report that contains findings.
  2. Click Apply Intervention next to the finding you want to address.
  3. Review the recommended intervention type and the proposed change (e.g., the amended prompt or the turns selected for pruning).
  4. Edit the proposed change if needed, then click Confirm & Apply.
The intervention is applied immediately and linked to the session in the audit log.

Via the API

Send a POST request to /v1/interventions with the session ID, the target finding, the intervention type, and any relevant parameters.
A successful response returns the intervention record with its ID and status:

Listing Available Intervention Types

Before applying an intervention programmatically, you can fetch the current catalog of supported intervention types and their metadata with a single API call. This is useful for building dynamic UIs, validating intervention_type values, or checking which parameters each type accepts.
The response returns an array of intervention type objects:

Intervention History

Every intervention is permanently logged and linked to the session that prompted it. In the dashboard, navigate to Agents → select your agent → Interventions to see a full chronological history including the intervention type, the finding it addressed, who applied it, and when. Via the API, retrieve intervention history for an agent:
This history is an important part of your agent’s operational record. It allows you to:
  • Verify that issues were addressed — reviewers can see that a reported problem was acted on.
  • Correlate interventions with score changes — confirm that an intervention improved the Health Score in subsequent sessions.
  • Demonstrate compliance — provide auditors with a full timeline of detected issues and corrective actions taken.
Some interventions affect live agent sessions. Behavioral Reset in particular immediately clears the active context of any ongoing conversation your agent is currently handling — users mid-session will experience a context break. Always review the scope of an intervention in the preview screen before applying it in a production environment. If possible, schedule disruptive interventions during low-traffic windows.