Agents API
The Agents API allows you to manage autonomous AI agents that execute multi-step tasks. Agents can use tools, handle approvals, and maintain execution state through threads.Capabilities
- CRUD Operations: Create, read, update, and delete agents
- Thread Management: Create and manage execution threads
- Execution Control: Pause, resume, and complete agent executions
- Approval Workflows: Handle human-in-the-loop approval requests
- Evaluations: Evaluate agent performance with scoring criteria
- Cost Tracking: Monitor daily and monthly costs
Key Concepts
Agent
An agent is configured through an embeddedassistantSpecialization object that determines its behavior and capabilities:
Thread
A thread represents a single execution of an agent. Threads can be in the following states:Endpoints Summary
Agent Management
Thread Management
Evaluations
Cost Tracking
Example: Create an Agent
Example: Create a Thread
Example: Handle Approval
Tool Access
Agents access tools throughavailableToolsGroupsUids:
- Each UID references a Tools Group
- Tools Groups can contain built-in tools or reference a Tool Server
- When an agent executes, it can call any tool from its assigned groups
- Use
enabledToolsto restrict to a specific subset
availableToolsGroupsUids: ["crm-tools", "email-tools"] can use all tools from both groups.
See Also
- Tool Servers API - Configure external tool integrations
- API Reference - Full API documentation