Skip to main content
GET
https://jwhite.tail8bf327.ts.net
/
api
/
v1
/
agents
/
{agent_id}
Get Agent
curl --request GET \
  --url https://jwhite.tail8bf327.ts.net/api/v1/agents/{agent_id} \
  --header 'x-api-key: <api-key>'
{
  "id": 123,
  "user_id": 1,
  "name": "Sales Support Agent",
  "avatar_id": 1,
  "voice_id": 2,
  "role_id": 1,
  "language": "en",
  "custom_greeting": "Welcome! How can I assist you today?",
  "context": "You are a helpful sales assistant.",
  "properties": null,
  "memories": null,
  "knowledge_base": null,
  "status": "active",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z",
  "last_used_at": "2024-01-15T12:00:00Z",
  "total_sessions": 5,
  "avg_duration": 120.5
}

Authentication

Requires JWT authentication (cookie-based) or API key authentication.
Authorization: Bearer <jwt_token>

Parameters

agent_id
integer
required
The ID of the agent to retrieve

Request

GET https://jwhite.tail8bf327.ts.net/api/v1/agents/123
Authorization: Bearer <jwt_token>

Response

{
  "id": 123,
  "user_id": 1,
  "name": "Sales Support Agent",
  "avatar_id": 1,
  "voice_id": 2,
  "role_id": 1,
  "language": "en",
  "custom_greeting": "Welcome! How can I assist you today?",
  "context": "You are a helpful sales assistant.",
  "properties": null,
  "memories": null,
  "knowledge_base": null,
  "status": "active",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z",
  "last_used_at": "2024-01-15T12:00:00Z",
  "total_sessions": 5,
  "avg_duration": 120.5
}
{
  "success": false,
  "error": "Agent not found"
}

Response Fields

FieldTypeDescription
idintegerUnique agent identifier
user_idintegerUser ID who owns the agent
namestringAgent name
avatar_idintegerAvatar ID
voice_idintegerVoice ID
role_idintegerRole/persona ID
languagestringLanguage code
custom_greetingstringCustom greeting message
contextstringAI context/instructions
propertiesobjectCustom properties (JSON)
memoriesobjectAgent memories (JSON)
knowledge_baseobjectKnowledge base content (JSON)
statusstringAgent status
created_atstringISO 8601 creation timestamp
updated_atstringISO 8601 last update timestamp
last_used_atstringISO 8601 last usage timestamp
total_sessionsintegerTotal number of sessions
avg_durationnumberAverage session duration in seconds

Use Cases

  • Agent Management: Get full agent details for editing
  • Analytics: Access agent statistics (total sessions, average duration)
  • Context Loading: Retrieve agent context for UI display

Error Responses

For information about error responses and status codes, see Error Responses.

Common Errors for This Endpoint

  • 401 Unauthorized - Invalid or missing authentication
  • 403 Forbidden - Insufficient permissions
  • 404 Not Found - Agent not found
  • 500 Internal Server Error - Server error