Preparing Your Behavior Logs
Agent Therapy expects your conversation log as a JSON array of message objects. Each object represents one turn in the conversation and must include arole, content, and timestamp.
Timestamps must be ISO 8601 UTC strings. Tool messages should include a
tool_name field — this enables tool-specific behavioral checks.
We recommend including at least 3 complete exchanges (user → assistant → user) for accurate analysis. Shorter logs may not contain enough signal for the diagnostic engine to detect patterns reliably, and findings may have lower confidence scores.
Starting a Session
1
Prepare your behavior log
Collect the conversation turns from your agent and format them as the JSON array described above. Make sure all messages have valid ISO 8601 timestamps.
2
Submit the session
Send a Request body fields:
POST request to /v1/sessions with your agent ID and the log.3
Wait for the session to complete
Analysis is asynchronous. Poll
GET /v1/sessions/{id} until the status field returns completed or failed. Most sessions complete within 10–30 seconds. See Session Status below for the full polling pattern.4
Retrieve the report
Once the status is
completed, the full diagnostic report is included in the session object returned by GET /v1/sessions/{id}. See Reading the Report for a field-by-field breakdown.Session Status
Sessions move through the following statuses after submission:
Polling pattern:
error field in the response for a human-readable explanation. Common causes include malformed log JSON, an unrecognized agent_id, or logs that are too short to analyze.
Reading the Report
When a session reachescompleted status, the response from GET /v1/sessions/{id} includes the full diagnostic report inline. Here is a complete example: