Skip to main content

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 embedded assistantSpecialization 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 through availableToolsGroupsUids:
  1. Each UID references a Tools Group
  2. Tools Groups can contain built-in tools or reference a Tool Server
  3. When an agent executes, it can call any tool from its assigned groups
  4. Use enabledTools to restrict to a specific subset
Example: An agent with availableToolsGroupsUids: ["crm-tools", "email-tools"] can use all tools from both groups.

See Also