Agent Endpoints
Agent management and configuration.
GET /api/agents
List all agents for the tenant.
Authentication: JWT required
Query Parameters:
| Param | Type | Description |
|---|---|---|
status | string | draft, published, archived |
type | string | Agent type filter |
includeArchived | boolean | Include archived agents |
createdBy | UUID | Filter by creator |
Response:
{
"success": true,
"data": [
{
"id": "uuid",
"name": "sales-agent",
"commercial_name": "Sales Assistant",
"bio": "AI-powered sales assistant",
"type": "data_analyst",
"status": "published",
"llm_config": {
"model": "auto",
"temperature": 0.7
},
"created_at": "2025-12-01T00:00:00.000Z",
"updated_at": "2025-12-17T00:00:00.000Z"
}
],
"count": 5
}
GET /api/agents/published
List published agents available for the tenant.
Authentication: JWT required
Response: Same as GET /api/agents with status=published
GET /api/agents/:id
Get agent by ID.
Authentication: JWT required
Response:
{
"success": true,
"data": {
"id": "uuid",
"name": "sales-agent",
"commercial_name": "Sales Assistant",
"bio": "AI-powered sales assistant",
"type": "data_analyst",
"status": "published",
"llm_config": {
"model": "auto",
"temperature": 0.7
},
"metadata": {},
"tags": ["sales", "assistant"],
"visibility": "tenant"
}
}
POST /api/agents
Create a new agent.
Authentication: JWT required
Request:
{
"name": "my-agent",
"commercial_name": "My AI Agent",
"bio": "Description of the agent",
"type": "data_analyst",
"llm_config": {
"model": "auto",
"temperature": 0.7
},
"metadata": {},
"tags": ["tag1", "tag2"],
"visibility": "tenant"
}
Response:
{
"success": true,
"data": {
"id": "uuid",
"name": "my-agent",
"status": "draft"
}
}
PATCH /api/agents/:id
Update an existing agent.
Authentication: JWT required
Request: Partial agent fields
DELETE /api/agents/:id
Archive an agent (soft delete).
Authentication: JWT required
POST /api/agents/:id/publish
Publish an agent.
Authentication: JWT required
Request:
{
"config": {
"rate_limit": 100,
"allowed_users": []
}
}
POST /api/agents/:id/unpublish
Unpublish an agent.
Authentication: JWT required