Agents API
Build, configure, and deploy AI agents. Each agent can be a conversational assistant or a task-execution agent. Manage their lifecycle, invoke them programmatically, and access conversation logs. Base path:/v1/agents
Create Agent
POST /v1/agents
Create a new AI agent.
Agent display name
Agent type:
conversational or taskLLM model to use (e.g.,
gpt-4o, claude-sonnet-4-20250514)System instructions that define the agent’s behavior and personality
Array of tool definitions the agent can invoke
Channels this agent is available on:
whatsapp, sms, voice, webPortkey guardrail configuration for output validation
List Agents
GET /v1/agents
Retrieve all agents with cursor-based pagination.
Cursor for pagination
Number of results per page (max 100)
Get Agent
GET /v1/agents/{id}
Retrieve a single agent and its full configuration.
Agent ID (e.g.,
agt_abc123)Update Agent
PUT /v1/agents/{id}
Update an agent’s configuration. Changes take effect for new conversations immediately.
Agent ID
Updated display name
Updated system instructions
Updated LLM model
Updated tool definitions (replaces existing tools)
Updated channel list
Delete Agent
DELETE /v1/agents/{id}
Delete an agent. Active conversations are terminated gracefully.
Agent ID
204 No Content
List Conversations
GET /v1/agents/{id}/conversations
Retrieve conversation logs for a specific agent, ordered by most recent.
Agent ID
Cursor for pagination
Number of results per page (max 100)