Skip to main content

Agent Types

List Agent Types

GET /api/v1/agent_type/all
Query Parameters:
  • skip (integer): Number of records to skip (default: 0)
  • limit (integer): Max records to return (default: 100, max: 100)
Response:
{
  "total": 1,
  "agent_types": [
    {
      "id": "at_abc123",
      "name": "Customer Support Bot",
      "description": "AI support agent",
      "created_at": "2024-01-15T10:00:00Z"
    }
  ]
}

Create Agent Type

POST /api/v1/agent_type/create
Body:
{
  "name": "Customer Support Bot",
  "description": "AI customer support agent"
}

Update Agent Type

PUT /api/v1/agent_type/{agent_type_id}

Delete Agent Type

DELETE /api/v1/agent_type/{agent_type_id}

Agent Instances

List Agent Instances

GET /api/v1/agent_instance/all
Query Parameters:
  • skip (integer): Number of records to skip (default: 0)
  • limit (integer): Max records to return (default: 100, max: 100)
Response:
{
  "total": 1,
  "agent_instances": [
    {
      "id": "ai_xyz789",
      "name": "Production Instance",
      "agent_type_id": "at_abc123",
      "account_id": "acc_123",
      "contact_id": "con_456",
      "is_active": true,
      "created_at": "2024-01-15T10:00:00Z"
    }
  ]
}

Create Agent Instance

POST /api/v1/agent_instance/create
Body:
{
  "name": "Production Instance",
  "description": "Main production agent",
  "agent_type_id": "at_abc123",
  "account_id": "acc_123",
  "contact_id": "con_456"
}
Response includes the secret:
{
  "id": "ai_xyz789",
  "name": "Production Instance",
  "secret": "secret_abc123xyz..."
}

Get Agent Instance

GET /api/v1/agent_instance/{agent_instance_id}

Update Agent Instance

PUT /api/v1/agent_instance/{agent_instance_id}

Delete Agent Instance

DELETE /api/v1/agent_instance/{agent_instance_id}

Refresh Secret

POST /api/v1/agent_instance/{agent_instance_id}/refresh
Generates a new secret for the agent instance. The old secret is immediately invalidated.

Validate Secret

POST /api/v1/agent_instance/validate-secret
Body:
{
  "secret": "secret_abc123xyz"
}
Used by the SDK to validate agent credentials and retrieve agent metadata.