Skip to main content
By the end of this guide, you’ll have registered an agent with Agent Therapy, submitted a behavior log for analysis, and received a diagnostic report complete with a health score and actionable recommendations. All you need is an Agent Therapy account and a terminal — no SDK required to get started, though we’ll show you the Python SDK alternative along the way.
1

Sign Up & Get Your API Key

If you haven’t already, create your Agent Therapy account. Once you’re in the dashboard:
  1. Navigate to Settings → API Keys in the left sidebar.
  2. Click Create New Key, give it a descriptive name (e.g., my-first-integration), and click Generate.
  3. Copy the key immediately — it won’t be shown again.
Store your key securely (for example, as an environment variable):
Your API key grants full access to your Agent Therapy workspace. Never commit it to source control or expose it in client-side code.
2

Register Your Agent

Before you can submit sessions, you need to register your agent with Agent Therapy. This creates a persistent identity for your agent that health scores and diagnostics are tracked against over time.
A successful response returns your new agent’s ID along with its initial health state:
Save the id — you’ll use it to submit sessions in the next step.
3

Start a Therapy Session

A therapy session is a single unit of analysis. You submit a behavior log — a sequence of messages and tool calls from a real or representative agent run — and Agent Therapy analyzes it for failure modes and behavioral patterns.
The API responds immediately with a session ID and a processing status. Analysis typically completes within a few seconds.
4

Review Your Diagnostic Report

Once the session status is complete, retrieve the full diagnostic report including findings, your agent’s updated health score, and prioritized recommendations.
The findings array lists every detected failure mode with its severity. The recommendations array tells you exactly what to do next.
5

Apply an Intervention

Interventions are targeted, non-destructive corrections applied to your agent based on a session’s findings. Based on the recommendation above, apply a prompt_correction to fix the instruction drift:
All interventions are logged in your audit trail and can be reviewed at any time from the dashboard or via the API.

What’s Next?

You’ve registered an agent, run a diagnostic session, and applied your first intervention. From here, you can:
  • Set up continuous monitoring to automatically analyze sessions as your agent runs in production.
  • Configure alerts to get notified when your agent’s health score drops below a threshold.
  • Explore the full intervention library to learn about all available correction types.

API Reference

Full documentation for every endpoint, parameter, and response schema.

Set Up Alerts

Get notified when your agent’s health degrades before users notice.