Agent CRUD
Manage agents inside the workspace bound to your API key.You do not pass
workspaceId or userId in the request. The API key scope is applied automatically.Common Headers
GET /api/v1/agent/
Fetch one agent with full detail.Response
POST /api/v1/agent
Create a new agent.Request Body
Fields
Default behavior
- The first agent in a workspace is automatically created as
isDefault: true - Creating with
isDefault: trueclears the previous default agent in that workspace
PATCH /api/v1/agent/
Partially update an agent. Only provided fields are changed.Request Body
Notes
- Sending
isDefault: truepromotes that agent to the workspace default - You cannot directly send
isDefault: falsefor the current default agent. Promote another agent instead
DELETE /api/v1/agent/
Delete an agent. RelatedAgentRun rows are deleted by cascade.
Default deletion behavior
- If other agents remain, the most recently updated one becomes the new default
- If no agents remain, the workspace ends up with no default agent