Agent runs overview
An agent run is one session between people and an agent, from the moment the agent is asked to do something to the moment it finishes, fails, or stops. The run records who started it, the work item and comment thread it lives in, and its status. Everything said inside the run, by the people and by the agent, is an agent run activity.
Plane starts most runs for you: when a person @mentions an agent in a top-level work item comment or assigns an agent to a work item, and when a Plane agent's trigger fires. You can also start a run on an existing top-level comment with Create an agent run. Runs are never deleted, and there's no DELETE endpoint. A run ends when it's settled as completed, stopped, failed, or stale.
To build an agent that works through runs, start with the Agents overview and Building an agent.
Learn more about agent sessions
The agent run object
Attributes
idstring (uuid)Unique identifier for the run.
titlestring or nullA short title for the run. Set it when you create the run, or the agent sets it with Update an agent run.
summarystring or nullA summary of what the run did, usually reported by the agent when it settles the run.
statusstringWhere the run is in its lifecycle. One of
created,in_progress,awaiting,completed,stopping,stopped,failed, orstale. See Run statuses.typestringHow the run started:
comment_thread: from a work item comment. Mention runs, assignment runs, and runs created through the API all have this type.scheduled: a Plane agent's schedule trigger.event_triggered: a Plane agent's work item event trigger, or a person starting a Plane agent by hand.integration_triggered: an event from a connected integration, such as a Slack message or a GitHub event.assignment: a valid value, but Plane stores assignment runs ascomment_thread. Usetrigger_typeto find them.
trigger_typestring or nullThe trigger that started the run, for example
mention,assignment,schedule, ormanual. Plane agents' event triggers write their own values. Runs created through the API havenull.agent_user_idstring (uuid)The agent's bot user. Every action the agent takes in Plane runs as this user.
native_agent_idstring (uuid) or nullThe Plane agent behind the run, for an agent built in Plane.
nullfor an agent installed as an app.comment_idstring (uuid) or nullThe root comment of the run's thread on the work item. The agent's replies and people's prompts are posted under it.
source_comment_idstring (uuid) or nullThe comment that started the run. For a run started from a comment, it's the same comment as
comment_id.creator_idstring (uuid) or nullThe person who started the run, for example the person who mentioned or assigned the agent.
work_item_idstring (uuid) or nullThe work item the run is on.
nullfor a run with no work item, such as a scheduled run.project_idstring (uuid) or nullThe project of the run's work item.
external_linkstring (uri) or nullA link to the run in the agent's own system, such as a log or dashboard. Set when the run is created through the API.
external_trigger_sourcestring or nullFor an
integration_triggeredrun, the integration it came from:slackorgithub.external_trigger_idstring or nullFor an
integration_triggeredrun, the conversation it belongs to in that integration, such as a Slack thread.error_metadataobject or nullDetails of a failure. When the agent posts an
erroractivity, Plane copies that activity'ssignal_metadatahere. A failed Plane agent run carries areason, for exampleagent_inactive.token_usageobjectToken usage reported by the agent. Plane stores the object as sent.
credit_usageobjectCredit usage reported by the agent. Plane stores the object as sent.
started_atstring (date-time)When the run started. Plane sets it when it creates the run.
ended_atstring (date-time) or nullWhen the run was settled.
nullwhile it's open.stopped_atstring (date-time) or nullWhen the run moved from
stoppingtostopped.stopped_by_idstring (uuid) or nullThe person who asked the run to stop. Set when the run reaches
stopped.created_atstring (date-time)When the run was created.
updated_atstring (date-time)When the run last changed. Every activity updates the run, so this is also the time of its latest activity.
created_by_idstring (uuid) or nullThe user who created the run record.
updated_by_idstring (uuid) or nullThe user who last updated the run record.
{
"id": "5d2e8b47-3a1c-4f96-b0e2-7c9a4d1f8e63",
"title": "Find the commit behind the Safari redirect loop",
"summary": "Traced the loop to the SameSite change in commit 4e1a9c2 and suggested a fix.",
"status": "completed",
"type": "comment_thread",
"trigger_type": "mention",
"agent_user_id": "a8f3c1d2-6b4e-4e57-9d10-2f5b7c8e3a94",
"native_agent_id": null,
"comment_id": "c47e9a12-8d3b-4f61-a5e0-9b2d6f4c1e78",
"source_comment_id": "c47e9a12-8d3b-4f61-a5e0-9b2d6f4c1e78",
"creator_id": "16c61a3a-512a-48ac-b0be-b6b46fe6f430",
"work_item_id": "8c3d1f72-4a9e-4b65-9d20-6e1f3b7a5c48",
"project_id": "4af68566-94a4-4eb3-94aa-50dc9427067b",
"external_link": null,
"external_trigger_source": null,
"external_trigger_id": null,
"error_metadata": {},
"token_usage": {},
"credit_usage": {},
"started_at": "2026-11-20T10:15:02.118204Z",
"ended_at": "2026-11-20T10:17:41.502913Z",
"stopped_at": null,
"stopped_by_id": null,
"created_at": "2026-11-20T10:15:02.118204Z",
"updated_at": "2026-11-20T10:17:41.502913Z",
"created_by_id": null,
"updated_by_id": "a8f3c1d2-6b4e-4e57-9d10-2f5b7c8e3a94"
}Endpoints
| Method | Path | Description |
|---|---|---|
GET | /api/v2/workspaces/{slug}/runs/ | List agent runs |
POST | /api/v2/workspaces/{slug}/runs/ | Create an agent run |
GET | /api/v2/workspaces/{slug}/runs/{pk}/ | Get an agent run |
PATCH | /api/v2/workspaces/{slug}/runs/{pk}/ | Update an agent run |
POST | /api/v2/workspaces/{slug}/runs/{pk}/stop/ | Stop an agent run |
Reads need the agents.runs:read scope, and create, update, and stop need agents.runs:write. A run's activities have their own endpoints and scopes. See Agent run activities.
Who can call what
Agent runs are open to active workspace admins and members. Guests get 403.
The API tells an agent from a person by the caller's user. An agent calls with its app's bot token, so it acts as its bot user. A person calls with a personal API key or a user OAuth token.
- An agent sees only its own runs, the ones where it's the
agent_user_id. Another agent's run is left out of lists and returns404by id. An agent can start runs for itself only, settle its runs withPATCH, and post their output activities. It can't call stop. - A person sees the runs on work items they can view, plus runs with no work item. A run on a work item they can't see returns
404, the same as a run that doesn't exist. Amanualrun is visible only to the person who started it and to the agent. A person can start a run on a comment, post aprompt, and stop a run. Starting a run or posting a prompt also needs permission to comment on the work item. A person can'tPATCHa run.
Run statuses
A new run starts as created. After that, its status follows the activities posted to it:
| Event | Status after |
|---|---|
The agent posts a thought or action | in_progress, unless the run is stopping or stopped |
The agent posts a response | stopped if the run was stopping, unchanged if it's stopped, otherwise in_progress |
The agent posts an elicitation | awaiting |
The agent posts an error | failed. Plane sets ended_at and copies the activity's signal_metadata into error_metadata. |
The agent sends PATCH with status: completed | completed, with ended_at set |
| A person calls stop | stopping |
A person posts any other prompt | in_progress. On a run that has ended, this reopens it and clears ended_at, stopped_at, stopped_by_id, and error_metadata. |
No change for 5 minutes while created, in_progress, or awaiting | stale, with ended_at set |
A response doesn't complete a run. When the agent is done, it posts its final response and then sends PATCH with status: completed. Stop returns 409 for a run that has ended as completed, stopped, failed, or stale. Those statuses aren't final, though, because a person's next prompt reopens the run.
Plane marks a quiet run stale the next time the run is read. Listing runs settles every run that's due first. Self-hosted instances can change the 5-minute timeout with the AGENT_RUN_STALE_TIMEOUT_IN_MINS environment variable. See Stale run prevention.
Stopping a run
Stop an agent run does what the Stop button does in Plane. It records a prompt activity with signal: stop and moves the run to stopping. The run reaches stopped when the agent posts its next response, and stopped_by_id records the person who asked. An agent learns about the stop from the activity webhook or by reading the activity in its feed. See The stop signal.
Finding work by polling
An agent can find its runs without webhooks. Poll List agent runs with ?updated_at__gte= and paginate=cursor. The list is ordered oldest change first by default, so a run that changes while you page through it moves behind your cursor and comes back on a later page. Deduplicate by id. To read what people said, poll the workspace activity feed instead of reading each run.
A poll with updated_at__gte and an ascending cursor walk leave out runs changed in the last 3 seconds. Those runs come back on your next poll, after the writes that changed them have committed, so a poll never skips a row.
Webhooks
Creating a run, and every prompt a person posts, sends the agent's app the same agent run webhooks as in v1, whichever API version made the change. A Plane agent is started inside Plane instead and gets no webhook.
Response shaping
Every agent run read accepts ?fields= for sparse responses and ?expand= for agent_user, creator, work_item, comment, and source_comment. See Sparse fields and Expanding relations. Errors follow the shared problem+json contract.
Changed from v1
- Ids are flat: v1's
issueis nowwork_item_id, andagent_user,comment,creator, and the other references gain an_idsuffix. v1's nestedissue_detailsis now?expand=work_item. - The create body names the comment
comment_id, where v1 usedcomment. An unknownagent_slugreturns400, where v1 returned404. - An agent sees only its own runs. v1 let any bot in the workspace read any run.
- A person sees only runs on work items they can view. Another member's
manualrun returns404, where v1 returned403. - v2 adds List agent runs, Stop an agent run, and the workspace activity feed.
- The OAuth scopes are v1's, so an installed app needs no new grant.
See Migrating from v1 for the full list.

