API Reference - Agents

Manage your agents using the Paygent API. List agents with pagination, or use the ensure endpoint to create or retrieve an agent by its external ID.

List Agents

Returns a paginated list of agents. Use page and limit query parameters to control pagination.

cURL
1curl --location 'https://cp-api.withpaygent.com/api/v1/agents?page=1&limit=20' \
2--header 'paygent-api-key: YOUR_API_KEY'

Ensure Agent

Create a new agent or retrieve an existing one. This is useful for auto-discovering agents from external systems like LiveKit or basic LLM tracking.

cURL
1curl --location 'https://cp-api.withpaygent.com/api/v1/agents/ensure' \
2--header 'paygent-api-key: YOUR_API_KEY' \
3--header 'Content-Type: application/json' \
4--data '{
5    "agent_name": "My Discovery Agent",
6    "agent_external_id": "agent_unique_123", // This identifier will be used as your agent_id when interacting with the SDK
7    "agent_description": "Auto-discovered agent",
8    "agent_type": "voice" // voice/other only two options
9  }'

Need help? Contact us at support@withpaygent.com