Agent class represents a single agent on the Relevance AI platform. Use it to start conversations, fetch existing tasks, and read configuration set in the dashboard.
Load a single agent
Fetch an agent by its ID. The agent ID is visible on the agent’s page in the dashboard.List all agents
Fetch a paginated list of every agent in the project:pageSize and page:
pageSize: 20 and page: 1.
Read agent metadata
Once loaded, an agent exposes a number of fields:name, description, and avatar may be undefined if they haven’t been configured in the dashboard.
Start a conversation
Send a message withsendMessage. This creates a new task (the conversation thread) and returns it immediately. The method doesn’t wait for the agent to respond.
Retrieve tasks
A single task
Fetch a specific task by ID:A list of tasks
Fetch a paginated, sortable, and filterable list of tasks for the agent:pageSize: 100, page: 1, and sort: { createdAt: "asc" }.
Filtering by status accepts an array of simplified task statuses. For the full lifecycle and status values, see Tasks.
