Skip to main content
Agents are automation workflows that trigger callbacks when specific labeling events occur. They can monitor task completion, quality changes, and other project events.

Methods

list

List all agents.
client.agents.list(
    limit=100,
    cursor="next_page_token"
)
limit
int
Maximum number of agents to return per page
cursor
str
Pagination cursor for fetching the next page
data
list[Agent]
List of agent objects
next_cursor
str
Cursor for the next page of results

get

Retrieve a specific agent by UID.
client.agents.get(uid="agent_123")
uid
str
required
Unique identifier of the agent
uid
str
Unique identifier of the agent
name
str
Name of the agent
events
list[str]
List of events that trigger this agent
description
str
Description of the agent’s purpose
callback_url
str
URL to call when events are triggered
is_active
bool
Whether the agent is currently active
project
str
Project UID this agent is associated with
task_types
list[str]
Types of tasks this agent monitors

create

Create a new agent.
client.agents.create(
    name="Quality Monitor",
    events=["task.completed", "task.reviewed"],
    description="Monitor task completion and quality",
    callback_url="https://api.example.com/webhook",
    is_active=True,
    project="proj_123",
    task_types=["classification", "segmentation"]
)
name
str
required
Name of the agent
events
list[str]
List of events that trigger this agent (e.g., “task.completed”, “task.reviewed”)
description
str
Description of the agent’s purpose
callback_url
str
URL to call when events are triggered
is_active
bool
Whether the agent should be active immediately (default: true)
project
str
Project UID to associate this agent with
task_types
list[str]
Types of tasks this agent should monitor

update

Update an existing agent.
client.agents.update(
    uid="agent_123",
    name="Updated Quality Monitor",
    is_active=False
)
uid
str
required
Unique identifier of the agent to update
name
str
New name for the agent
events
list[str]
Updated list of events that trigger this agent
description
str
Updated description
callback_url
str
Updated callback URL
is_active
bool
Whether the agent should be active
project
str
Updated project UID
task_types
list[str]
Updated task types to monitor

delete

Delete an agent.
client.agents.delete(uid="agent_123")
uid
str
required
Unique identifier of the agent to delete

list_executions

List execution history for an agent.
client.agents.list_executions(
    uid="agent_123",
    limit=50,
    cursor="next_page_token"
)
uid
str
required
Unique identifier of the agent
limit
int
Maximum number of executions to return per page
cursor
str
Pagination cursor for fetching the next page
data
list[AgentExecution]
List of agent execution records
next_cursor
str
Cursor for the next page of results

test

Test an agent by triggering a test execution.
client.agents.test(uid="agent_123")
uid
str
required
Unique identifier of the agent to test
status
str
Status of the test execution
response
dict
Response from the callback URL

Async Methods

All methods are available in async form through AsyncAvala:
await client.agents.list()
await client.agents.get(uid="agent_123")
await client.agents.create(name="Quality Monitor")
await client.agents.update(uid="agent_123", is_active=False)
await client.agents.delete(uid="agent_123")
await client.agents.list_executions(uid="agent_123")
await client.agents.test(uid="agent_123")

Build docs developers (and LLMs) love