Agents API
The Agents API allows you to programmatically manage AI agents in your echowin account. You can list agents, get agent details, and update agent instructions.
Rate Limits
- List Agents: 1000 requests per hour
- Get/Update Instructions: 100 requests per hour
Table of Contents
/api/v1/agentsGet a list of all AI agents for your team
Responses
{
"data": [
{
"id": "agent-uuid-1234",
"name": "Customer Support Agent",
"description": "Handles customer inquiries",
"knowledgebase": {
"id": "kb-uuid-1234",
"name": "Support KB"
},
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
},
{
"id": "agent-uuid-5678",
"name": "Sales Agent",
"description": "Handles sales calls",
"knowledgebase": null,
"createdAt": "2024-01-05T00:00:00.000Z",
"updatedAt": "2024-01-10T14:20:00.000Z"
}
]
}API Tester
/api/v1/agents/:agentId/instructionsGet the current instructions for a specific agent
Path Parameters
agentIdstringrequiredThe unique identifier (UUID) of the agent
Responses
{
"data": {
"id": "agent-uuid-1234",
"name": "Customer Support Agent",
"instructions": "You are a helpful customer support agent. Always greet the customer warmly and help resolve their issues efficiently.",
"updatedAt": "2024-01-15T10:30:00.000Z"
}
}{
"error": "Agent not found"
}API Tester
/api/v1/agents/:agentId/instructionsUpdate the instructions for a specific agent. Previous instructions are saved to history (up to 20 versions).
Path Parameters
agentIdstringrequiredThe unique identifier (UUID) of the agent
Request Body
instructionsstringrequiredThe new instructions for the agent (max 100,000 characters)
Responses
{
"data": {
"id": "agent-uuid-1234",
"name": "Customer Support Agent",
"instructions": "You are an expert customer support agent. Greet customers warmly, listen to their concerns, and provide clear solutions.",
"updatedAt": "2024-01-15T12:00:00.000Z"
},
"message": "Agent instructions updated successfully"
}{
"error": "Validation error",
"details": [
{
"field": "instructions",
"message": "Instructions must be at least 1 character"
}
]
}{
"error": "Agent not found"
}API Tester
Agent Knowledgebase Access
You can access and update an agent's assigned knowledgebase directly through the agents API. This allows you to read and modify the agent's knowledge sources (webpages, documents, and Q&A references) without needing to know the knowledgebase ID.
See the Knowledgebase API documentation for full details, request/response examples, and interactive testing.
Available Endpoints:
GET/api/v1/agents/:agentId/knowledgebaseGET/api/v1/agents/:agentId/knowledgebase/search1 credit/searchGET/PUT/api/v1/agents/:agentId/knowledgebase/webpages/:webpageIdPOST/api/v1/agents/:agentId/knowledgebase/webpages/:webpageId/refreshGET/PUT/api/v1/agents/:agentId/knowledgebase/documents/:documentIdGET/PUT/api/v1/agents/:agentId/knowledgebase/references/:referenceId