> ## Documentation Index
> Fetch the complete documentation index at: https://vizmaxxing.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Register and Connect Your AI Agent to Agent Therapy

> Register your AI agent with Agent Therapy using the dashboard or REST API, and configure it for behavioral monitoring and diagnostics.

This guide walks you through registering an AI agent with Agent Therapy and preparing it for behavioral monitoring and diagnostics. Once connected, Agent Therapy can run sessions against your agent's conversation logs, track health scores over time, and surface actionable findings when something goes wrong.

## Via the Dashboard

The dashboard is the fastest way to register a new agent without writing any code.

**1. Open the Agents page**

Log in to your Agent Therapy account and navigate to **Agents** in the left sidebar. Click **New Agent** in the top-right corner.

**2. Fill in the agent details**

Complete the registration form:

* **Name** — a human-readable label for the agent (e.g., `Customer Support Bot`).
* **Description** — a short summary of what the agent does and where it runs.
* **Framework** — select the framework your agent is built on: **OpenAI Assistants**, **LangChain**, **AutoGen**, or **Custom**.

**3. Create the agent**

Click **Create Agent**. Agent Therapy registers the agent and takes you to its detail page.

**4. Copy the Agent ID**

Your new agent's **Agent ID** appears near the top of the detail page (format: `agt_xxxxxxxxxx`). Copy it — you'll need this ID whenever you submit diagnostic sessions or query the API.

## Via the API

You can also register agents programmatically using the REST API. This is useful when automating agent provisioning or managing your agent fleet through code.

**Endpoint:** `POST https://api.agenttherapy.ai/v1/agents`

```bash curl theme={null}
curl --request POST \
  --url https://api.agenttherapy.ai/v1/agents \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "name": "Customer Support Bot",
    "description": "Handles tier-1 support tickets via the web chat widget.",
    "framework": "langchain",
    "tags": ["production", "customer-facing", "support"]
  }'
```

```python Python theme={null}
import httpx

response = httpx.post(
    "https://api.agenttherapy.ai/v1/agents",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
        "name": "Customer Support Bot",
        "description": "Handles tier-1 support tickets via the web chat widget.",
        "framework": "langchain",
        "tags": ["production", "customer-facing", "support"],
    },
)

agent = response.json()
print(agent["id"])  # agt_xxxxxxxxxx
```

**Request body fields:**

| Field | Type | Required | Description |
| - | - | - | - |
| `name` | string | Yes | Human-readable name for the agent. |
| `description` | string | No | Short summary of the agent's purpose. |
| `framework` | string | No | One of `openai`, `langchain`, `autogen`, or `custom`. |
| `tags` | array of strings | No | Labels for filtering and grouping agents. |

**Example response:**

```json theme={null}
{
  "id": "agt_4kR9mXpLqZ",
  "name": "Customer Support Bot",
  "framework": "langchain",
  "health_score": null,
  "status": "active",
  "created_at": "2024-01-15T09:30:00Z"
}
```

The `health_score` field is `null` on creation — it populates after your first completed diagnostic session. The `status` field starts as `active` and changes to `inactive` if the agent is archived.

## Agent Frameworks

Agent Therapy supports the most widely-used agent frameworks out of the box, plus a generic **Custom** option for anything else.

| Framework | Value in API | Notes |
| - | - | - |
| OpenAI Assistants | `openai` | Supports Assistants API v2 conversation threads. |
| LangChain | `langchain` | Compatible with LCEL chains and legacy AgentExecutor. |
| AutoGen | `autogen` | Works with multi-agent conversation logs. |
| Custom / Other | `custom` | Use this for in-house frameworks or any other tool. |

Selecting the correct framework lets Agent Therapy apply framework-specific heuristics when analyzing behavior logs. If your framework is not listed, choose `custom` — the general diagnostic engine still provides full coverage.

## Updating Agent Details

To rename an agent, update its description, or change its tags, send a `PATCH` request to `/v1/agents/{id}`.

```bash curl theme={null}
curl --request PATCH \
  --url https://api.agenttherapy.ai/v1/agents/agt_4kR9mXpLqZ \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "name": "Customer Support Bot v2",
    "tags": ["production", "customer-facing", "support", "v2"]
  }'
```

```python Python theme={null}
import httpx

response = httpx.patch(
    "https://api.agenttherapy.ai/v1/agents/agt_4kR9mXpLqZ",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
        "name": "Customer Support Bot v2",
        "tags": ["production", "customer-facing", "support", "v2"],
    },
)

updated_agent = response.json()
```

Only the fields you include in the request body are updated — all other agent properties remain unchanged.

> [!TIP]
>
> Add descriptive tags like `production`, `staging`, `team-billing`, or `high-traffic` when you register agents. In large deployments with dozens of agents, tags make it significantly easier to filter, group, and set up alerts targeted at specific subsets of your fleet.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.