Agents API
These endpoints power the Agent History sidebar and the persistence layer. All endpoints are internal Next.js API routes.List agents
updated_at descending.
Response
Create agent
id.
Get agent
Update agent
Delete agent
AI Builder conversation history
List test sessions
started_at descending.
Response
Get / update test session
PATCH accepts endedAt and durationMs to close a session.
Session messages
POST body: