Neo
List Tasks
/api/preview/agents/{orgName}/tasksLists all agent tasks for the specified organization. Supports pagination via continuationToken with a configurable pageSize (1-1000, default 100). Returns task metadata including ID, name, status, and creation timestamp.
Request Parameters
orgNamestring path requiredThe organization namecontinuationTokenstring query optionalToken for retrieving the next page of resultspageSizeinteger query optionalNumber of results per pagesortBystring query optionalField to sort the results by. Defaults to lastEvent.sortDirectionstring query optionalDirection to sort the results in. Defaults to desc.taskTypestring query optionalTask type to filter by
Responses
- Tasks contains the list of tasks for this page.
- ↳
idstring requiredUnique identifier for the task. - ↳
namestring requiredDisplay name for the task, typically auto-generated from the initial user message. - ↳
taskTypeenum requiredWhether the task was started synchronously by a user or asynchronously by background automation.Values:sync,async - ↳
asyncTriggerTypeenum optionalThe async trigger source for this task. Null for sync tasks.Values:scheduled,external_signal - ↳
statusenum requiredCurrent execution status of the task.Values:running,idle - ↳
createdAtstring requiredWhen the task was created, in ISO 8601 format. - ↳
approvalModeenum requiredApproval mode for this task. Valid values: ‘manual’, ‘auto’, ‘balanced’.Values:manual,auto,balanced - Pulumi entities (stacks, projects, etc.) that provide context for the agent.
- ↳
planModeboolean requiredWhether the task is in plan mode. Set based on the first user message. - ↳
isSharedboolean requiredWhether this task is shared with other org members. - ↳
sharedAtstring optionalWhen the task was first shared. Null if never shared. - Information about the user who created this task.
- ↳
permissionModeenum optionalThe permission scope for the task.Values:default,read-only - ↳
runtimePhaseenum optionalThe current runtime phase for this task. Null until the runtime checks in.Values:booting,ready,running - ↳
lastHeartbeatstring optionalWhen the task runtime last reported a heartbeat. Null if the runtime has never checked in. - ↳
contextUsedTokensinteger optionalTotal input tokens consumed across all model invocations for this task. Approximate context window usage. - ↳
contextWindowTokensinteger optionalMaximum context window size in tokens for the primary model used by this task. - ↳
tokensUsedinteger requiredTotal Neo tokens consumed across all model invocations for this task. Neo tokens are the priced unit used for billing — distinct from the raw model input tokens surfaced in contextUsedTokens / contextWindowTokens. - ↳
toolExecutionModeenum optionalWhere tools are executed for this task. Valid values: ‘cloud’, ‘cli’.Values:cloud,cli - ↳
sourceAutomationIDstring optionalThe automation that spawned this task, if the task was created by an automation run. - ↳
sourceenum optionalThe origin that triggered this task. Valid values: ‘console’, ‘cli’, ‘slack’, ‘schedule’, ‘api’, ‘github’.Values:api,console,cli,slack,schedule,github continuationTokenstring optionalContinuationToken can be used to fetch the next page of results. If null, there are no more results available.
Create Tasks
/api/preview/agents/{orgName}/tasksCreates a new agent task for the specified organization. The request must include a prompt (the user event message) that initiates the task. Set the ‘permissionMode’ field in the request body to restrict the agent to read-only operations. Returns the created task details including task ID, name, status, and timestamp.
Request Parameters
orgNamestring path requiredThe organization name
Request Body
- The message content
- ↳
contentstring requiredThe exact natural language instruction from the user. - Entities to add or remove from the agent.
- Slash Commands the user selected when creating their message.
- Optional Pulumi Cloud page the user has the Neo pane open on at the moment they sent this event. Persisted with the event so cold-start replay can reproduce per-turn page context exactly. Omitted by clients with no concept of a current page (CLI, scheduled tasks, Slack, GitHub triggers, API consumers).
- ↳
timestampstring requiredWhen the event occurred. - ↳
typestring required approvalModeenum optionalOptional approval mode override for this task. If omitted, org default is used.Values:manual,auto,balancedplanModeboolean optionalWhether to enable plan mode for this task.permissionModeenum optionalControls the permission scope for the task. When omitted, defaults to ‘default’ (the agent uses the creating user’s full permissions).Values:default,read-onlytoolExecutionModeenum optionalWhere tools should be executed. Defaults to ‘cloud’ if omitted.Values:cloud,cli- Optional list of integrations to enable for this task. Semantics: omitted/null → inherit all org-enabled integrations; empty list → explicit opt-out (no integration credentials for this task); populated list → whitelist of specific integrations by ID. Modeled as an object array rather than a bare string array so multi-instance support (instance_name, scope, etc.) can be added later without a wire break.
- ↳
idstring requiredThe catalog integration ID (e.g. ‘honeycomb’, ‘datadog’). sourceenum optionalThe origin that triggered this task. Defaults to ‘api’ if omitted.Values:api,console,cli,slack,schedule,github- Optional filter for CLI integrations to enable for this task. Semantics: omitted/null → enable all CLI integrations connected for the org; empty list → explicit opt-out (no CLI integrations for this task); populated list → whitelist by (catalogId, name) of the configured instances to enable. Entries that do not match any connected integration are silently skipped.
- ↳
catalogIdstring requiredThe CLI catalog entry ID (e.g. ‘aws’). - ↳
namestring requiredThe user-chosen instance name. Unique within the (org, catalogId) pair.
Responses
Get Task
/api/preview/agents/{orgName}/tasks/{taskID}Retrieves metadata for a specific agent task, including its ID, name, status, creation timestamp, and associated entities. Returns 404 if the task does not exist.
Request Parameters
orgNamestring path requiredThe organization nametaskIDstring path requiredThe agent task identifier
Responses
idstring requiredUnique identifier for the task.namestring requiredDisplay name for the task, typically auto-generated from the initial user message.taskTypeenum requiredWhether the task was started synchronously by a user or asynchronously by background automation.Values:sync,asyncasyncTriggerTypeenum optionalThe async trigger source for this task. Null for sync tasks.Values:scheduled,external_signalstatusenum requiredCurrent execution status of the task.Values:running,idlecreatedAtstring requiredWhen the task was created, in ISO 8601 format.approvalModeenum requiredApproval mode for this task. Valid values: ‘manual’, ‘auto’, ‘balanced’.Values:manual,auto,balanced- Pulumi entities (stacks, projects, etc.) that provide context for the agent.
- ↳
typestring required planModeboolean requiredWhether the task is in plan mode. Set based on the first user message.isSharedboolean requiredWhether this task is shared with other org members.sharedAtstring optionalWhen the task was first shared. Null if never shared.- Information about the user who created this task.
- ↳
namestring requiredThe user’s display name. - ↳
githubLoginstring requiredThe user’s login name. - ↳
avatarUrlstring requiredThe URL of the user’s avatar image. - ↳
emailstring optionalIMPORTANT: The email address of the user is only included on a few admin-only APIs. For nearly all APIs that return a UserInfo object, this will not be provided. considered sensitive information. permissionModeenum optionalThe permission scope for the task.Values:default,read-onlyruntimePhaseenum optionalThe current runtime phase for this task. Null until the runtime checks in.Values:booting,ready,runninglastHeartbeatstring optionalWhen the task runtime last reported a heartbeat. Null if the runtime has never checked in.contextUsedTokensinteger optionalTotal input tokens consumed across all model invocations for this task. Approximate context window usage.contextWindowTokensinteger optionalMaximum context window size in tokens for the primary model used by this task.tokensUsedinteger requiredTotal Neo tokens consumed across all model invocations for this task. Neo tokens are the priced unit used for billing — distinct from the raw model input tokens surfaced in contextUsedTokens / contextWindowTokens.toolExecutionModeenum optionalWhere tools are executed for this task. Valid values: ‘cloud’, ‘cli’.Values:cloud,clisourceAutomationIDstring optionalThe automation that spawned this task, if the task was created by an automation run.sourceenum optionalThe origin that triggered this task. Valid values: ‘console’, ‘cli’, ‘slack’, ‘schedule’, ‘api’, ‘github’.Values:api,console,cli,slack,schedule,github
Respond To Task
/api/preview/agents/{orgName}/tasks/{taskID}Sends a response to an ongoing agent task. Supported event types include user_message, user_confirmation, and user_cancel. Returns 409 if the task already has a pending request that has not completed.
Request Parameters
orgNamestring path requiredThe organization nametaskIDstring path requiredThe agent task identifier
Request Body
- The event
- Entities to add or remove from the agent.
- Optional Pulumi Cloud page the user has the Neo pane open on at the moment they sent this event. Persisted with the event so cold-start replay can reproduce per-turn page context exactly. Omitted by clients with no concept of a current page (CLI, scheduled tasks, Slack, GitHub triggers, API consumers).
- ↳
timestampstring requiredWhen the event occurred. - ↳
typestring required
Responses
Update Task
/api/preview/agents/{orgName}/tasks/{taskID}Updates the settings or metadata of an agent task. Only the user who created the task can modify it.
Request Parameters
orgNamestring path requiredThe organization nametaskIDstring path requiredThe agent task identifier
Request Body
namestring optionalA new display name for the task. Null means no change. Must be between 1 and 255 characters after trimming whitespace.isSharedboolean optionalWhether to share the task with other org members. Null means no change.approvalModeenum optionalApproval mode for this task. Null means no change. Valid values: ‘manual’, ‘auto’, ‘balanced’.Values:manual,auto,balancedpermissionModeenum optionalThe permission scope for the task. Null means no change.Values:default,read-only
Responses
idstring requiredUnique identifier for the task.namestring requiredDisplay name for the task, typically auto-generated from the initial user message.taskTypeenum requiredWhether the task was started synchronously by a user or asynchronously by background automation.Values:sync,asyncasyncTriggerTypeenum optionalThe async trigger source for this task. Null for sync tasks.Values:scheduled,external_signalstatusenum requiredCurrent execution status of the task.Values:running,idlecreatedAtstring requiredWhen the task was created, in ISO 8601 format.approvalModeenum requiredApproval mode for this task. Valid values: ‘manual’, ‘auto’, ‘balanced’.Values:manual,auto,balanced- Pulumi entities (stacks, projects, etc.) that provide context for the agent.
- ↳
typestring required planModeboolean requiredWhether the task is in plan mode. Set based on the first user message.isSharedboolean requiredWhether this task is shared with other org members.sharedAtstring optionalWhen the task was first shared. Null if never shared.- Information about the user who created this task.
- ↳
namestring requiredThe user’s display name. - ↳
githubLoginstring requiredThe user’s login name. - ↳
avatarUrlstring requiredThe URL of the user’s avatar image. - ↳
emailstring optionalIMPORTANT: The email address of the user is only included on a few admin-only APIs. For nearly all APIs that return a UserInfo object, this will not be provided. considered sensitive information. permissionModeenum optionalThe permission scope for the task.Values:default,read-onlyruntimePhaseenum optionalThe current runtime phase for this task. Null until the runtime checks in.Values:booting,ready,runninglastHeartbeatstring optionalWhen the task runtime last reported a heartbeat. Null if the runtime has never checked in.contextUsedTokensinteger optionalTotal input tokens consumed across all model invocations for this task. Approximate context window usage.contextWindowTokensinteger optionalMaximum context window size in tokens for the primary model used by this task.tokensUsedinteger requiredTotal Neo tokens consumed across all model invocations for this task. Neo tokens are the priced unit used for billing — distinct from the raw model input tokens surfaced in contextUsedTokens / contextWindowTokens.toolExecutionModeenum optionalWhere tools are executed for this task. Valid values: ‘cloud’, ‘cli’.Values:cloud,clisourceAutomationIDstring optionalThe automation that spawned this task, if the task was created by an automation run.sourceenum optionalThe origin that triggered this task. Valid values: ‘console’, ‘cli’, ‘slack’, ‘schedule’, ‘api’, ‘github’.Values:api,console,cli,slack,schedule,github
Cancel Task
/api/preview/agents/{orgName}/tasks/{taskID}/cancelCancels an agent task. When force is true, immediately terminates the runtime session and resets the task to idle. This is the escalation path when a graceful cancel (via the user_cancel event in RespondToTask) is insufficient or the task is stuck. Unlike graceful cancel, force-cancel does not attempt to notify the agent runtime — it kills the session directly and resets the task state. Currently only force cancellation is supported; the force field must be set to true. Returns 409 if the session was stopped but the task status could not be reset to idle.
Request Parameters
orgNamestring path requiredThe organization nametaskIDstring path requiredThe agent task identifier
Request Body
forceboolean requiredIf true, immediately terminate the runtime session and reset the task to idle without attempting a graceful cancel. Required to be true in the current implementation.
Responses
Get Task Events
/api/preview/agents/{orgName}/tasks/{taskID}/eventsRetrieves the event stream for a specific agent task. Events include agent messages, tool calls, status changes, and user interactions. Supports pagination via continuationToken with a configurable pageSize (1-1000).
Request Parameters
orgNamestring path requiredThe organization nametaskIDstring path requiredThe agent task identifiercontinuationTokenstring query optionalToken for retrieving the next page of resultspageSizeinteger query optionalNumber of results per page
Responses
- Events contains the list of events for this page.
- ↳
idstring requiredThe UUID of the event - ↳
isSyntheticboolean requiredTrue when the event was synthesized by the backend rather than submitted directly by the user or agent runtime. - ↳
typestring required continuationTokenstring optionalContinuationToken can be used to fetch the next page of results. If null, there are no more results available.
Stream Task Events
/api/preview/agents/{orgName}/tasks/{taskID}/events/streamStreams events for a specific agent task as Server-Sent Events. Each SSE data frame contains a JSON-encoded AgentConsoleEvent. The stream delivers existing events immediately, then keeps the connection open to deliver new events in real time until the task completes.
Request Parameters
orgNamestring path requiredThe organization nametaskIDstring path requiredThe agent task identifier
Responses
Thank you for your feedback!
If you have a question about how to use Pulumi, reach out in Community Slack.
Open an issue on GitHub to report a problem or suggest an improvement.