List agent sessions
list_agent_sessionsList agent sessions visible to the caller in a workspace, most recently updated first, with filters for status, agent, incident, mode, and search text.
Instructions
List the agent sessions in the workspace the credential resolves to that the caller can see, most recently updated first. A session started by a user in the Orchestra UI is visible to that user alone, so an API key never sees one. Sessions started for a task run or an incident are visible to everyone in the workspace who can view the agent.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_agent_sessions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Only return sessions whose name, or whose agent's name, contains this text. Case-insensitive. | |
| page | No | Page number. Must be greater than or equal to 1. | |
| status | No | Only return sessions in these statuses. Repeat the parameter to match any of several, e.g. `?status=BUSY&status=IDLE`. One of `BUSY`, `EXPIRED`, `FAILED`, `IDLE`, `INITIALISING`, `PENDING`, `STARTUP_ERROR`. | |
| archived | No | Return only archived sessions instead of only unarchived ones. Defaults to false. | |
| agent_ids | No | Only return sessions of these agents. Repeat the parameter to match any of several, e.g. `?agent_ids=<id>&agent_ids=<id>`. | |
| page_size | No | Number of items per page. Defaults to 50; maximum 100. | |
| incident_id | No | Only return sessions about this incident. | |
| session_mode | No | Only return sessions started in these modes. Repeat the parameter to match any of several. One of `USER`, `TASK_RUN`, `INCIDENT`. | |
| X-Orchestra-Account-Id | No | Act on this account rather than the one the credential resolves to. Omit it to use the credential's own account. An API key is issued to a single account, so it may only name that account; an OAuth token may name any account its grant covers. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||