Create an agent run activity
Post an activity to a run. What you can post depends on who you are.
The run's agent, calling with its bot token, posts the run's output: thought, action, response, elicitation, or error. On a run with a work item, a non-ephemeral response or elicitation becomes a reply in the run's thread, posted as the agent, and its id comes back as comment_id. thought, action, and error are always ephemeral and never reach the thread.
A person posts a prompt, such as {"type": "prompt", "content": {"type": "prompt", "body": "<p>Also check the Firefox flow</p>"}}. They need permission to comment on the run's work item. If the run already has a thread on a work item, Plane mirrors the prompt into it as a reply from them and returns the reply's id as comment_id. For an agent installed as an app, Plane then sends the agent's app the activity webhook. A Plane agent picks the prompt up inside Plane instead. A prompt on a run that has ended reopens it.
Every activity moves the run's status. For example, elicitation makes it awaiting and error makes it failed. A response leaves it in_progress, or settles it as stopped if a stop was requested. See Run statuses.
Path parameters
slug:requiredstringThe workspace slug. It appears in your Plane URLs. In https://app.plane.so/my-team/projects/, the slug is my-team.
run_id:requiredstring (uuid)The id of the agent run to post to. An agent can post only to its own runs.
Body parameters
type:requiredstringThe kind of activity. The run's agent sends one of thought, action, response, elicitation, or error. A person sends prompt. Any other combination returns 400.
content:optionalobjectWhat the activity says. Set content.type to the same value as type. Plane checks the shape of content against content.type and doesn't compare the two.
action:{"type": "action", "action": "search_commits", "parameters": {"path": "apps/web/auth"}}.actionis a non-empty string, andparametersis a non-empty object whose values are all strings.- Every other type:
{"type": "response", "body": "<p>...</p>"}, with a non-empty stringbody. Plane posts thebodyof a non-ephemeral activity to the thread as HTML. Plain text is wrapped in a paragraph. prompt:bodyas above, plus optionalattachment_ids, a list of strings.
content_metadata:optionalobjectYour own data for the activity, such as an idempotency key. Plane stores the object and returns it unchanged, so you can find the activity again later. Must be an object.
ephemeral:optionalbooleanSet to true to keep a response or elicitation out of the work item thread. thought, action, and error are always ephemeral, whatever you send. A person's prompt can't be ephemeral.
signal:optionalstringHow to interpret the activity. Defaults to continue. The agent can send continue, auth_request, select, stop, or upgrade. A person's prompt can't carry a signal, so a person stops a run with Stop an agent run instead.
auth_request needs signal_metadata.url, an https:// URL for the person to open. See Signals for what each signal does in Plane.
signal_metadata:optionalobjectDetails for the signal, such as the url of an auth_request. On an error activity, Plane copies this object into the run's error_metadata, so put the failure details here. Must be an object.
comment_id:optionalstring (uuid)An existing comment in this workspace to link the activity to. Only the agent can set it. On a non-ephemeral activity, Plane replaces it with the reply it posts. A person's prompt can't set it, because Plane links the mirrored reply itself.
Nullable.
Response shaping
fields:optionalstringComma-separated list of fields to return. Fields you don't request are left out of the response instead of coming back as null, so a missing key means you didn't ask for it and null means the value is null. id is always included, whether or not you name it.
Pass all to get every requestable field. An unknown field name returns 400 with the list of valid names and the closest match, so a typo is caught instead of being silently ignored.
Requestable here: actor_id, agent_run_id, comment_id, content, content_metadata, created_at, created_by_id, ephemeral, id, project_id, signal, signal_metadata, type, updated_at, updated_by_id.
See Sparse fields.
expand:optionalstringComma-separated relations to embed alongside the ids: actor (the user who posted the activity, with id, display_name, avatar_url, and email).
Expanded objects get their own key: ?expand=actor keeps actor_id and adds an actor object next to it. An unknown value returns 400. See Expanding relations.
Scopes
agents.run_activities:write
Errors
| Status | Code | Cause |
|---|---|---|
400 | invalid_request | type is missing or not one you can post, content isn't shaped for its type, a person set signal, ephemeral, or comment_id, an auth_request has no https:// URL, a metadata field isn't an object, or comment_id is outside this workspace. |
401 | unauthorized | Missing or invalid credentials. |
402 | payment_required | The feature this endpoint belongs to isn't enabled on your plan or is switched off. |
403 | forbidden | You can't comment on the run's work item, you're a guest, or your token scope doesn't allow this. |
404 | not_found | No such run in this workspace, or you can't reach it. An agent can't reach another agent's run. |
406 | not_acceptable | The Accept header asks for a representation the API can't produce. |
413 | payload_too_large | The request body is over the size limit. |
415 | unsupported_media_type | The Content-Type isn't one this endpoint accepts. |
429 | rate_limited | Throttled. Honor the Retry-After header before retrying. |
curl -X POST \
"https://api.plane.so/api/v2/workspaces/my-team/runs/5d2e8b47-3a1c-4f96-b0e2-7c9a4d1f8e63/activities/" \
-H "Authorization: Bearer $PLANE_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "response",
"content": {
"type": "response",
"body": "<p>The loop started with commit 4e1a9c2, which set the session cookie to SameSite=Strict. Safari drops the cookie on the OAuth callback, so the app sends you back to login. Setting it to Lax fixes it.</p>"
},
"content_metadata": {"idempotency_key": "triage-5d2e8b47-final"}
}'import requests
response = requests.post(
"https://api.plane.so/api/v2/workspaces/my-team/runs/5d2e8b47-3a1c-4f96-b0e2-7c9a4d1f8e63/activities/",
headers={"Authorization": "Bearer your-bot-token"},
json={
"type": "response",
"content": {
"type": "response",
"body": "<p>The loop started with commit 4e1a9c2, which set the session cookie to SameSite=Strict. Safari drops the cookie on the OAuth callback, so the app sends you back to login. Setting it to Lax fixes it.</p>",
},
"content_metadata": {"idempotency_key": "triage-5d2e8b47-final"},
},
)
print(response.json())const response = await fetch(
"https://api.plane.so/api/v2/workspaces/my-team/runs/5d2e8b47-3a1c-4f96-b0e2-7c9a4d1f8e63/activities/",
{
method: "POST",
headers: {
Authorization: "Bearer your-bot-token",
"Content-Type": "application/json",
},
body: JSON.stringify({
type: "response",
content: {
type: "response",
body: "<p>The loop started with commit 4e1a9c2, which set the session cookie to SameSite=Strict. Safari drops the cookie on the OAuth callback, so the app sends you back to login. Setting it to Lax fixes it.</p>",
},
content_metadata: { idempotency_key: "triage-5d2e8b47-final" },
}),
},
);
const data = await response.json();{
"id": "9a6e3b72-1d4c-4e85-b2f9-5c8a7d1e4f36",
"agent_run_id": "5d2e8b47-3a1c-4f96-b0e2-7c9a4d1f8e63",
"type": "response",
"content": {
"type": "response",
"body": "<p>The loop started with commit 4e1a9c2, which set the session cookie to SameSite=Strict. Safari drops the cookie on the OAuth callback, so the app sends you back to login. Setting it to Lax fixes it.</p>"
},
"content_metadata": {
"idempotency_key": "triage-5d2e8b47-final"
},
"ephemeral": false,
"signal": "continue",
"signal_metadata": {},
"actor_id": "a8f3c1d2-6b4e-4e57-9d10-2f5b7c8e3a94",
"comment_id": "d58b2f7a-4e1c-4a96-9b03-8f6c2e7d1a45",
"project_id": null,
"created_at": "2026-11-20T10:17:30.915842Z",
"updated_at": "2026-11-20T10:17:30.915842Z",
"created_by_id": "a8f3c1d2-6b4e-4e57-9d10-2f5b7c8e3a94",
"updated_by_id": null
}
