Agent API
API endpoints for managing AI agents and their configurations
Manage AI agents and their configurations.
Access: Secret Key Only (sk_live_*)
Create Agent
Creates a new AI agent.
POST /agent
Request Body:
{
"name": "string",
"description": "string",
"systemPrompt": "string",
"model": "string",
"temperature": 0.7,
"tools": []
}
Response 200 OK:
{
"id": "string",
"name": "string",
"description": "string",
"teamId": "string",
"createdAt": "2024-01-15T10:30:00Z"
}
List Agents
Retrieves all agents for the authenticated team.
GET /agent
Response 200 OK:
{
"agents": [
{
"id": "string",
"name": "string",
"description": "string",
"createdAt": "2024-01-15T10:30:00Z"
}
]
}
Get Agent by ID
Retrieves a specific agent.
GET /agent/:id
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | The agent ID |
Response 200 OK:
{
"id": "string",
"name": "string",
"description": "string",
"systemPrompt": "string",
"model": "string",
"temperature": 0.7,
"tools": [],
"createdAt": "2024-01-15T10:30:00Z"
}
Update Agent
Updates an existing agent.
PUT /agent/:id
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | The agent ID |
Request Body:
{
"name": "string",
"description": "string",
"systemPrompt": "string",
"model": "string",
"temperature": 0.7,
"tools": []
}
Response 200 OK:
{
"id": "string",
"name": "string",
"updatedAt": "2024-01-15T10:30:00Z"
}
Delete Agent
Deletes an agent.
DELETE /agent/:id
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | The agent ID |
Response 204 No Content
Rollback Agent to Previous Version
Reverts an agent to its previous configuration version.
PUT /agent/:id/rollback
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | The agent ID |
Response 200 OK:
{
"id": "string",
"name": "string",
"version": "number",
"rolledBackAt": "2024-01-15T10:30:00Z"
}