Skip to main content
The Agent Therapy REST API gives you full programmatic control over every aspect of the platform — registering agents, submitting behavior logs for analysis, retrieving diagnostic findings, and applying corrective interventions. All requests are made over HTTPS to the versioned base URL, and all request and response bodies use JSON. The API is versioned at /v1; breaking changes will only be introduced in new major versions.

Base URL

Every API request you make must be directed to the following base URL:
Append the endpoint path directly to this base URL — for example, https://api.agenttherapy.ai/v1/agents.

Request Format

All requests that include a body (POST, PATCH) must set the Content-Type header to application/json. Every request — regardless of method — must include a valid Authorization header.

Response Format

All responses are JSON. Successful responses wrap the returned resource or list in a data envelope:
Error responses follow a consistent structure with an error object that contains three fields:

Rate Limits

Rate limits are enforced per API key on a rolling one-minute window. The limits by plan are: Every API response includes the following headers so you can track your current usage: When you exceed your rate limit, the API returns a 429 Too Many Requests response. Wait until the time indicated in X-RateLimit-Reset before retrying.

Pagination

List endpoints use cursor-based pagination, which is more stable than offset-based pagination for datasets that change frequently. Use the limit and cursor query parameters to page through results. Every list response includes pagination metadata alongside the data array:
When has_more is false, you have reached the last page. When it is true, pass the value of next_cursor as the cursor parameter in your next request.

Error Codes

SDKs

Agent Therapy provides an official Python SDK that wraps the REST API with idiomatic, typed interfaces. Install it from PyPI:
The SDK handles authentication, retries, and pagination automatically so you can focus on building. For full setup instructions, framework-specific patterns, and code examples, see the integration guides.