Neo
List Neo Member Usage Caps
/api/console/orgs/{orgName}/neo/member-usage-capsReturns every organization member joined with their per-member monthly Neo usage cap, their month-to-date Neo spend, and their effective limit (the smaller of the per-member and org-level caps). Caps are denominated in cents.
Request Parameters
orgNamestring path requiredThe organization name
Responses
orgCapCentsinteger optionalThe org-level monthly Neo usage cap in US-dollar cents, or null when the organization has no org-level cap. Provided for context — a member’s effective limit is the smaller of their per-member cap and this.- One entry per organization member.
- ↳
userIDstring requiredThe member’s user ID. This is the identifier the PUT and DELETE per-member cap endpoints key on (SSO-safe, unlike login). - ↳
loginstring requiredThe member’s login. - ↳
namestring requiredThe member’s display name. - ↳
avatarURLstring requiredURL of the member’s avatar image. - ↳
emailstring requiredThe member’s email address. - ↳
perMemberCapCentsinteger optionalThe member’s per-member monthly Neo usage cap in US-dollar cents, or null when no per-member cap is set (the member is bounded only by the org-level cap, if any). - ↳
amountUsedCentsinteger requiredThe member’s Neo spend in US-dollar cents so far in the current monthly cap window. - ↳
effectiveLimitCentsinteger optionalThe limit that binds first: the smaller of the per-member and org-level caps in US-dollar cents. Null when the member has neither cap (unbounded).
Update Neo Member Usage Cap
/api/console/orgs/{orgName}/neo/member-usage-caps/{userID}Creates or replaces the monthly Neo usage cap for a single member of an organization. The cap must be at least $10/month. To remove the cap, call DeleteNeoMemberUsageCap.
Request Parameters
orgNamestring path requiredThe organization nameuserIDstring path requiredThe member’s user ID
Request Body
capCentsinteger requiredMonthly cap in US-dollar cents. Must be at least 1000 ($10, the self-serve floor) and at most 100_000_000 ($1M). Outside that range the call returns 400.
Responses
userIDstring requiredThe user the cap applies to.capCentsinteger requiredMonthly cap in US-dollar cents. Always strictly positive; “no cap” is the absence of a row (removed via DeleteNeoMemberUsageCap).updatedAtstring requiredTime when the cap was last updated.
Delete Neo Member Usage Cap
/api/console/orgs/{orgName}/neo/member-usage-caps/{userID}Removes the monthly Neo usage cap for a single member, returning them to only the org-level cap (if any). Idempotent — deleting when no cap is set returns 204.
Request Parameters
orgNamestring path requiredThe organization nameuserIDstring path requiredThe member’s user ID
Responses
Get Org Neo Token Budget
/api/orgs/{orgName}/neo/token-budgetReturns the current Neo-token allowance and consumption for the binding (closest-to-exhaustion) in-force Neo limit for a context. Returns 404 when no Neo-token cap applies to this organization.
Request Parameters
orgNamestring path requiredThe organization nametaskIdstring query optionalWhen supplied, returns the budget for this task’s owner instead of the caller. Must resolve to a task within orgName.
Responses
windowKindenum requiredKind of cap window applied to the org.Values:trial— Trial- One-time allowance across the duration of a subscription trial.
individual— Individual- Per calendar-month allowance for a single-user free organization.
free— Free- Per calendar-month, SKU-defined token allowance for a Free-plan organization.
org-dollar— OrgDollar- Per calendar-month, admin-configured dollar allowance for a multi-user organization.
member-dollar— MemberDollar- Per calendar-month, admin-configured dollar allowance for a single member of a multi-user organization.
baseAllowanceTokensinteger requiredPlan-derived base allowance for the current window, in Neo tokens.effectiveAllowanceTokensinteger requiredAllowance for the current window, in Neo tokens. Includes any active bonus on top of the base allowance.consumedTokensinteger requiredTotal Neo tokens consumed in the current window.windowEndinteger requiredUnix epoch timestamp (seconds) when the current window ends and the consumed counter resets. Zero when the window does not reset.exhaustedboolean requiredTrue when consumedTokens has reached effectiveAllowanceTokens for the current window.baseAllowanceCentsinteger optionalPlan-derived base allowance for the current window, in cents. Present only for dollar-denominated window kinds (org-dollar, member-dollar); null otherwise.effectiveAllowanceCentsinteger optionalAllowance for the current window, in cents. Present only for dollar-denominated window kinds (org-dollar, member-dollar); null otherwise.consumedCentsinteger optionalTotal consumed in the current window, in cents. Present only for dollar-denominated window kinds (org-dollar, member-dollar); null otherwise.
Get Neo Usage Cap
/api/orgs/{orgName}/neo/usage-capReturns the org admin-configured monthly Neo usage cap for an organization, or 204 (no content) when no cap is configured (the default). Caps are denominated in cents.
Request Parameters
orgNamestring path requiredThe organization name
Responses
capCentsinteger requiredMonthly cap in US-dollar cents. Always strictly positive; “no cap” is the absence of a row (GetNeoUsageCap returns 204).updatedAtstring requiredTime when the cap was last updated.notificationsEnabledboolean requiredWhether threshold-warning emails (50/80/95/100% of the cap) are sent to billing admins. True unless the admin has turned them off.
Update Neo Usage Cap
/api/orgs/{orgName}/neo/usage-capCreates or replaces the monthly Neo usage cap for an organization. The cap must be at least $10/month. To remove the cap, call DeleteNeoUsageCap.
Request Parameters
orgNamestring path requiredThe organization name
Request Body
capCentsinteger requiredMonthly cap in US-dollar cents. Must be at least 1000 ($10, the self-serve floor) and at most 100_000_000 ($1M). Outside that range the call returns 400.notificationsEnabledboolean optionalWhether to send threshold-warning emails (50/80/95/100% of the cap) to billing admins. Omit (null) to leave the current setting unchanged; new caps default to enabled.
Responses
capCentsinteger requiredMonthly cap in US-dollar cents. Always strictly positive; “no cap” is the absence of a row (GetNeoUsageCap returns 204).updatedAtstring requiredTime when the cap was last updated.notificationsEnabledboolean requiredWhether threshold-warning emails (50/80/95/100% of the cap) are sent to billing admins. True unless the admin has turned them off.
Delete Neo Usage Cap
/api/orgs/{orgName}/neo/usage-capRemoves the monthly Neo usage cap for an organization, returning it to the uncapped default. Idempotent — deleting when no cap is set returns 204.
Request Parameters
orgNamestring path requiredThe organization name
Responses
List Agent Definitions
/api/preview/agents/{orgName}/definitionsLists the Custom Agent definitions configured for the organization, ordered by name. Each definition is a saved, team-owned agent configuration (role, integrations, and instructions) that a task can be run as.
Request Parameters
orgNamestring path requiredThe organization name
Responses
- The organization’s Custom Agent definitions, ordered by name.
- ↳
idstring requiredThe unique identifier of the agent definition. - ↳
namestring requiredThe agent’s name: lower-case letters, digits and hyphens, unique within the organization. This is the stable handle a person writes down – in an automation, in a CLI invocation – and it may be changed, because everything that references an agent internally references it by id. - ↳
displayNamestring requiredThe human-readable label shown wherever the agent is displayed. Falls back to the name when the agent has none. - ↳
roleIdstring optionalThe RBAC role id the agent’s tasks assume, identified by role id. Null means no assumed role: tasks run with the invoking user’s own permissions. - ↳
permissionModeenum optionalDeprecated. Custom Agent authority is controlled by roleId.Values:default— Defaultread-only— ReadOnly
- ↳
customInstructionsstring optionalInstructions that shape how the agent behaves in the team’s environment. - The integrations enabled for the agent’s tasks, by id. Omitted or null inherits all organization integrations; an empty list enables none.
- ↳
purposestring optionalA one-line description of what this agent is for, shown under its name in the roster. - ↳
avatarstring optionalA presentation token the console maps to an icon. Not an uploaded asset. - ↳
approvalModeenum optionalThe approval posture the agent’s runs inherit. When omitted, runs are auto-approved, matching scheduled automations.Values:manual,auto,balanced - ↳
pausedAtstring optionalWhen the agent was paused, or null if it is not paused. A paused agent starts no new runs from any source – console, schedule, or trigger – until it is resumed; runs already in flight continue. - ↳
pausedBystring optionalWho paused the agent, by user id. Null when the agent is not paused. Recorded by the server from the caller rather than supplied by the client. - ↳
pausedReasonstring optionalWhy the agent was paused. Null when it is not paused, or when no reason was given. - Run counts for this agent, shown on its roster card.
Create Agent Definition
/api/preview/agents/{orgName}/definitionsCreates a Custom Agent definition for the organization from the supplied configuration (name, optional RBAC role, integrations, and instructions). Requires agent_definitions:create, granted to organization admins by default. Returns the created definition including its generated id. Returns 404 if a supplied role does not exist in the organization.
Request Parameters
orgNamestring path requiredThe organization name
Request Body
namestring optionalThe agent’s name: lower-case letters, digits and hyphens, at most 64 characters, unique within the organization. Optional – when omitted it is derived from displayName, so a form that asks for one name still works. A name already taken by another agent is rejected with a 409 rather than silently suffixed. Supplying a different name on an update renames the agent, which is safe because every internal reference is by id.displayNamestring optionalThe human-readable label shown wherever the agent is displayed. Required unless name is supplied, in which case the name is used as the label too.roleIdstring optionalThe RBAC role id the agent’s tasks assume. With Agents-as-Team-Members enabled, creation with omitted/null or empty uses the feature’s read-only default; on update, omitted/null preserves the existing role and empty selects that default. A role that does not exist in the organization is rejected with a 404.permissionModeenum optionalDeprecated. Custom Agent authority is controlled by roleId and this field is ignored.Values:default— Defaultread-only— ReadOnly
customInstructionsstring optionalInstructions that shape how the agent behaves in the team’s environment.- The integrations to enable for the agent’s tasks, by id. Omitted or null inherits all organization integrations; an empty list enables none.
purposestring optionalA one-line description of what this agent is for, shown under its name in the roster.avatarstring optionalA presentation token the console maps to an icon. Not an uploaded asset.approvalModeenum optionalThe approval posture the agent’s runs inherit. When omitted, runs are auto-approved, matching scheduled automations. ‘manual’ makes the agent propose rather than act, and applies to every run of the agent, including scheduled and triggered ones – such a run stops and waits for a person even though nothing yet notifies them it is waiting, so choose it deliberately for an unattended agent.Values:manual,auto,balanced
Responses
idstring requiredThe unique identifier of the agent definition.namestring requiredThe agent’s name: lower-case letters, digits and hyphens, unique within the organization. This is the stable handle a person writes down – in an automation, in a CLI invocation – and it may be changed, because everything that references an agent internally references it by id.displayNamestring requiredThe human-readable label shown wherever the agent is displayed. Falls back to the name when the agent has none.roleIdstring optionalThe RBAC role id the agent’s tasks assume, identified by role id. Null means no assumed role: tasks run with the invoking user’s own permissions.permissionModeenum optionalDeprecated. Custom Agent authority is controlled by roleId.Values:default— Defaultread-only— ReadOnly
customInstructionsstring optionalInstructions that shape how the agent behaves in the team’s environment.- The integrations enabled for the agent’s tasks, by id. Omitted or null inherits all organization integrations; an empty list enables none.
- ↳
idstring requiredThe catalog integration ID (e.g. ‘honeycomb’, ‘datadog’). purposestring optionalA one-line description of what this agent is for, shown under its name in the roster.avatarstring optionalA presentation token the console maps to an icon. Not an uploaded asset.approvalModeenum optionalThe approval posture the agent’s runs inherit. When omitted, runs are auto-approved, matching scheduled automations.Values:manual,auto,balancedpausedAtstring optionalWhen the agent was paused, or null if it is not paused. A paused agent starts no new runs from any source – console, schedule, or trigger – until it is resumed; runs already in flight continue.pausedBystring optionalWho paused the agent, by user id. Null when the agent is not paused. Recorded by the server from the caller rather than supplied by the client.pausedReasonstring optionalWhy the agent was paused. Null when it is not paused, or when no reason was given.- Run counts for this agent, shown on its roster card.
- ↳
totalinteger requiredHow many runs this agent has started in total. - ↳
runninginteger requiredHow many of this agent’s runs are currently running.
Get Agent Definition
/api/preview/agents/{orgName}/definitions/{definitionID}Retrieves a single Custom Agent definition by id. Returns 404 if the definition does not exist in the organization.
Request Parameters
orgNamestring path requiredThe organization namedefinitionIDstring path requiredThe agent definition identifier
Responses
idstring requiredThe unique identifier of the agent definition.namestring requiredThe agent’s name: lower-case letters, digits and hyphens, unique within the organization. This is the stable handle a person writes down – in an automation, in a CLI invocation – and it may be changed, because everything that references an agent internally references it by id.displayNamestring requiredThe human-readable label shown wherever the agent is displayed. Falls back to the name when the agent has none.roleIdstring optionalThe RBAC role id the agent’s tasks assume, identified by role id. Null means no assumed role: tasks run with the invoking user’s own permissions.permissionModeenum optionalDeprecated. Custom Agent authority is controlled by roleId.Values:default— Defaultread-only— ReadOnly
customInstructionsstring optionalInstructions that shape how the agent behaves in the team’s environment.- The integrations enabled for the agent’s tasks, by id. Omitted or null inherits all organization integrations; an empty list enables none.
- ↳
idstring requiredThe catalog integration ID (e.g. ‘honeycomb’, ‘datadog’). purposestring optionalA one-line description of what this agent is for, shown under its name in the roster.avatarstring optionalA presentation token the console maps to an icon. Not an uploaded asset.approvalModeenum optionalThe approval posture the agent’s runs inherit. When omitted, runs are auto-approved, matching scheduled automations.Values:manual,auto,balancedpausedAtstring optionalWhen the agent was paused, or null if it is not paused. A paused agent starts no new runs from any source – console, schedule, or trigger – until it is resumed; runs already in flight continue.pausedBystring optionalWho paused the agent, by user id. Null when the agent is not paused. Recorded by the server from the caller rather than supplied by the client.pausedReasonstring optionalWhy the agent was paused. Null when it is not paused, or when no reason was given.- Run counts for this agent, shown on its roster card.
- ↳
totalinteger requiredHow many runs this agent has started in total. - ↳
runninginteger requiredHow many of this agent’s runs are currently running.
Update Agent Definition
/api/preview/agents/{orgName}/definitions/{definitionID}Replaces the configuration of an existing Custom Agent definition (name, role, integrations, and instructions). Requires agent_definitions:update, granted to organization admins by default. Returns the updated definition. Returns 404 if the definition or a supplied role does not exist in the organization.
Request Parameters
orgNamestring path requiredThe organization namedefinitionIDstring path requiredThe agent definition identifier
Request Body
namestring optionalThe agent’s name: lower-case letters, digits and hyphens, at most 64 characters, unique within the organization. Optional – when omitted it is derived from displayName, so a form that asks for one name still works. A name already taken by another agent is rejected with a 409 rather than silently suffixed. Supplying a different name on an update renames the agent, which is safe because every internal reference is by id.displayNamestring optionalThe human-readable label shown wherever the agent is displayed. Required unless name is supplied, in which case the name is used as the label too.roleIdstring optionalThe RBAC role id the agent’s tasks assume. With Agents-as-Team-Members enabled, creation with omitted/null or empty uses the feature’s read-only default; on update, omitted/null preserves the existing role and empty selects that default. A role that does not exist in the organization is rejected with a 404.permissionModeenum optionalDeprecated. Custom Agent authority is controlled by roleId and this field is ignored.Values:default— Defaultread-only— ReadOnly
customInstructionsstring optionalInstructions that shape how the agent behaves in the team’s environment.- The integrations to enable for the agent’s tasks, by id. Omitted or null inherits all organization integrations; an empty list enables none.
purposestring optionalA one-line description of what this agent is for, shown under its name in the roster.avatarstring optionalA presentation token the console maps to an icon. Not an uploaded asset.approvalModeenum optionalThe approval posture the agent’s runs inherit. When omitted, runs are auto-approved, matching scheduled automations. ‘manual’ makes the agent propose rather than act, and applies to every run of the agent, including scheduled and triggered ones – such a run stops and waits for a person even though nothing yet notifies them it is waiting, so choose it deliberately for an unattended agent.Values:manual,auto,balanced
Responses
idstring requiredThe unique identifier of the agent definition.namestring requiredThe agent’s name: lower-case letters, digits and hyphens, unique within the organization. This is the stable handle a person writes down – in an automation, in a CLI invocation – and it may be changed, because everything that references an agent internally references it by id.displayNamestring requiredThe human-readable label shown wherever the agent is displayed. Falls back to the name when the agent has none.roleIdstring optionalThe RBAC role id the agent’s tasks assume, identified by role id. Null means no assumed role: tasks run with the invoking user’s own permissions.permissionModeenum optionalDeprecated. Custom Agent authority is controlled by roleId.Values:default— Defaultread-only— ReadOnly
customInstructionsstring optionalInstructions that shape how the agent behaves in the team’s environment.- The integrations enabled for the agent’s tasks, by id. Omitted or null inherits all organization integrations; an empty list enables none.
- ↳
idstring requiredThe catalog integration ID (e.g. ‘honeycomb’, ‘datadog’). purposestring optionalA one-line description of what this agent is for, shown under its name in the roster.avatarstring optionalA presentation token the console maps to an icon. Not an uploaded asset.approvalModeenum optionalThe approval posture the agent’s runs inherit. When omitted, runs are auto-approved, matching scheduled automations.Values:manual,auto,balancedpausedAtstring optionalWhen the agent was paused, or null if it is not paused. A paused agent starts no new runs from any source – console, schedule, or trigger – until it is resumed; runs already in flight continue.pausedBystring optionalWho paused the agent, by user id. Null when the agent is not paused. Recorded by the server from the caller rather than supplied by the client.pausedReasonstring optionalWhy the agent was paused. Null when it is not paused, or when no reason was given.- Run counts for this agent, shown on its roster card.
- ↳
totalinteger requiredHow many runs this agent has started in total. - ↳
runninginteger requiredHow many of this agent’s runs are currently running.
Delete Agent Definition
/api/preview/agents/{orgName}/definitions/{definitionID}Deletes a Custom Agent definition. Runs the agent has already produced are kept and still name it, so the audit trail survives the agent. Requires agent_definitions:delete, granted to organization admins by default. Returns 404 if the definition does not exist in the organization.
Request Parameters
orgNamestring path requiredThe organization namedefinitionIDstring path requiredThe agent definition identifier
Responses
Update Agent Definition Paused
/api/preview/agents/{orgName}/definitions/{definitionID}/pausedPauses or resumes a Custom Agent. When paused, the agent remains configured but starts no new runs from any source – console, schedule, or trigger – until it is resumed; runs already in flight continue. Pausing is recorded against the calling user; resuming clears that attribution along with the reason. Returns 404 if the definition does not exist in the organization.
Request Parameters
orgNamestring path requiredThe organization namedefinitionIDstring path requiredThe agent definition identifier
Request Body
pausedboolean requiredTrue to pause the agent, false to resume it. Resuming also clears the recorded reason and the user who paused it.reasonstring optionalWhy the agent is being paused. Ignored when resuming.
Responses
idstring requiredThe unique identifier of the agent definition.namestring requiredThe agent’s name: lower-case letters, digits and hyphens, unique within the organization. This is the stable handle a person writes down – in an automation, in a CLI invocation – and it may be changed, because everything that references an agent internally references it by id.displayNamestring requiredThe human-readable label shown wherever the agent is displayed. Falls back to the name when the agent has none.roleIdstring optionalThe RBAC role id the agent’s tasks assume, identified by role id. Null means no assumed role: tasks run with the invoking user’s own permissions.permissionModeenum optionalDeprecated. Custom Agent authority is controlled by roleId.Values:default— Defaultread-only— ReadOnly
customInstructionsstring optionalInstructions that shape how the agent behaves in the team’s environment.- The integrations enabled for the agent’s tasks, by id. Omitted or null inherits all organization integrations; an empty list enables none.
- ↳
idstring requiredThe catalog integration ID (e.g. ‘honeycomb’, ‘datadog’). purposestring optionalA one-line description of what this agent is for, shown under its name in the roster.avatarstring optionalA presentation token the console maps to an icon. Not an uploaded asset.approvalModeenum optionalThe approval posture the agent’s runs inherit. When omitted, runs are auto-approved, matching scheduled automations.Values:manual,auto,balancedpausedAtstring optionalWhen the agent was paused, or null if it is not paused. A paused agent starts no new runs from any source – console, schedule, or trigger – until it is resumed; runs already in flight continue.pausedBystring optionalWho paused the agent, by user id. Null when the agent is not paused. Recorded by the server from the caller rather than supplied by the client.pausedReasonstring optionalWhy the agent was paused. Null when it is not paused, or when no reason was given.- Run counts for this agent, shown on its roster card.
- ↳
totalinteger requiredHow many runs this agent has started in total. - ↳
runninginteger requiredHow many of this agent’s runs are currently running.
List Agent Definition Tasks
/api/preview/agents/{orgName}/definitions/{definitionID}/tasksLists the tasks that were run as a given Custom Agent, across every member of the organization — the agent’s shared run history, not just the caller’s own runs. Supports pagination via continuationToken with a configurable pageSize (1-1000, default 100). Returns 404 if the definition does not exist in the organization.
Request Parameters
orgNamestring path requiredThe organization namedefinitionIDstring path requiredThe agent definition identifiercontinuationTokenstring 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.
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— Scheduled- The task was started by a cron-driven scheduled signal.
external_signal— ExternalSignal- The task was started in reaction to an external signal payload.
- ↳
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— Defaultread-only— ReadOnly
- ↳
rolestring optionalThe id of the RBAC role this task assumes. Null when the task runs with the creating user’s own permissions (no assumed role). - ↳
roleNamestring optionalThe display name of the RBAC role this task assumes. Null when the task has no assumed role or the role no longer exists. - ↳
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. - ↳
contextCompactionThresholdPercentinteger optionalPercentage of the context window (1-100) at which the agent triggers conversation compaction. Populated alongside contextWindowTokens when token usage data is available; omitted otherwise. - ↳
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,worker - ↳
sourceAutomationIDstring optionalThe automation that spawned this task, if the task was created by an automation run. - ↳
agentDefinitionIdstring optionalThe Custom Agent definition this task was run as, if any. Null for tasks run by a user directly rather than as a saved agent. - ↳
pendingInputCountinteger optionalThe number of pending inputs waiting behind this task. Present for tasks that can receive asynchronous inputs. - ↳
sourceenum optionalThe origin that triggered this task. Valid values: ‘console’, ‘cli’, ‘slack’, ‘schedule’, ‘api’, ‘github’, ‘code-review’.Values:api— Api- Task created via the REST API without a more specific origin.
console— Console- Task created from the Pulumi Cloud web console.
cli— Cli- Task created from the Pulumi CLI.
slack— Slack- Task created from the Slack integration.
schedule— Schedule- Task created by a scheduled automation.
github— Github- Task triggered from a GitHub integration.
code-review— CodeReview- Task created by the code review feature. The platform hosting the reviewed change is identified by the task’s vcsProvider field.
- ↳
vcsProviderenum optionalThe version control system this task operates against. Set for tasks that target a specific VCS platform (e.g. code reviews). Null for tasks with no VCS context.Values:github— GitHub- GitHub version control system
gitlab— GitLab- GitLab version control system
bitbucket— Bitbucket- Bitbucket version control system
azure_devops— AzureDevOps- Azure DevOps version control system
custom— Custom- Custom version control system
github_enterprise— GitHubEnterprise- GitHub Enterprise Server version control system
origin— Origin- Cursor Origin version control system
continuationTokenstring optionalContinuationToken can be used to fetch the next page of results. If null, there are no more results available.
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 nameagentDefinitionIdstring query optionalAgent definition ID to filter by. Use ’neo’ for tasks without a custom agent. Omit to include all agents.continuationTokenstring query optionalToken for retrieving the next page of resultsexcludeSourcesarray query optionalTask origins to exclude from the results.pageSizeinteger query optionalNumber of results per pagepolicyIssueIdstring query optionalPolicy issue ID to filter by. Returns only tasks linked to that issue, such as tasks launched to remediate it.querystring query optionalCase-insensitive text to match in the task name.sortBystring query optionalField to sort the results by. Defaults to lastEvent.sortDirectionstring query optionalDirection to sort the results in. Defaults to desc.statusstring query optionalExecution status to filter by.taskTypestring query optionalTask type to filter by. Omit to include both interactive and background tasks.
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— Scheduled- The task was started by a cron-driven scheduled signal.
external_signal— ExternalSignal- The task was started in reaction to an external signal payload.
- ↳
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— Defaultread-only— ReadOnly
- ↳
rolestring optionalThe id of the RBAC role this task assumes. Null when the task runs with the creating user’s own permissions (no assumed role). - ↳
roleNamestring optionalThe display name of the RBAC role this task assumes. Null when the task has no assumed role or the role no longer exists. - ↳
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. - ↳
contextCompactionThresholdPercentinteger optionalPercentage of the context window (1-100) at which the agent triggers conversation compaction. Populated alongside contextWindowTokens when token usage data is available; omitted otherwise. - ↳
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,worker - ↳
sourceAutomationIDstring optionalThe automation that spawned this task, if the task was created by an automation run. - ↳
agentDefinitionIdstring optionalThe Custom Agent definition this task was run as, if any. Null for tasks run by a user directly rather than as a saved agent. - ↳
pendingInputCountinteger optionalThe number of pending inputs waiting behind this task. Present for tasks that can receive asynchronous inputs. - ↳
sourceenum optionalThe origin that triggered this task. Valid values: ‘console’, ‘cli’, ‘slack’, ‘schedule’, ‘api’, ‘github’, ‘code-review’.Values:api— Api- Task created via the REST API without a more specific origin.
console— Console- Task created from the Pulumi Cloud web console.
cli— Cli- Task created from the Pulumi CLI.
slack— Slack- Task created from the Slack integration.
schedule— Schedule- Task created by a scheduled automation.
github— Github- Task triggered from a GitHub integration.
code-review— CodeReview- Task created by the code review feature. The platform hosting the reviewed change is identified by the task’s vcsProvider field.
- ↳
vcsProviderenum optionalThe version control system this task operates against. Set for tasks that target a specific VCS platform (e.g. code reviews). Null for tasks with no VCS context.Values:github— GitHub- GitHub version control system
gitlab— GitLab- GitLab version control system
bitbucket— Bitbucket- Bitbucket version control system
azure_devops— AzureDevOps- Azure DevOps version control system
custom— Custom- Custom version control system
github_enterprise— GitHubEnterprise- GitHub Enterprise Server version control system
origin— Origin- Cursor Origin version control system
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. The message is a user message, so its discriminator field must be set to “type”: “user_message”. 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. This is the first event in the conversation and must be a user message, so its discriminator field must be set to “type”: “user_message”.
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— Defaultread-only— ReadOnly
rolestring optionalOptional RBAC role the task assumes, identified by role id. When set, the task operates with that role’s permissions in place of the creating user’s own assignments. You may only assume a role that is assigned to you, directly or through a team; a role you do not hold is rejected with a 403. Omitted/null means no assumed role: the task uses the creating user’s full permissions. Orthogonal to permissionMode, which controls the read-only behavior posture independently.agentDefinitionIdstring optionalOptional Custom Agent definition id to run this task as. When set, the task’s role and enabled integrations are taken from the named agent definition instead of from this request, and the task is attributed to that agent. The agent’s instructions and approval mode are not copied at creation: they are read from the definition on every turn, so editing the agent applies to the next turn of every run. A preview capability, gated per organization.toolExecutionModeenum optionalWhere tools should be executed. Defaults to ‘cloud’ if omitted.Values:cloud,cli,worker- 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.
sourceenum optionalThe origin that triggered this task. Defaults to ‘api’ if omitted.Values:api— Api- Task created via the REST API without a more specific origin.
console— Console- Task created from the Pulumi Cloud web console.
cli— Cli- Task created from the Pulumi CLI.
slack— Slack- Task created from the Slack integration.
schedule— Schedule- Task created by a scheduled automation.
github— Github- Task triggered from a GitHub integration.
code-review— CodeReview- Task created by the code review feature. The platform hosting the reviewed change is identified by the task’s vcsProvider field.
- 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 with missing or unknown catalogId, missing name, or referencing a (catalogId, name) pair that is not connected for the organization are rejected with a 400 response. catalogId matching is case-insensitive.
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— Scheduled- The task was started by a cron-driven scheduled signal.
external_signal— ExternalSignal- The task was started in reaction to an external signal payload.
statusenum 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 optionalThe user’s email address. It is only populated on selected endpoints and is omitted from most responses. Treat it as sensitive information. - ↳
servicePrincipalKindenum optionalThe type of service principal the user is. Set only where service principals are listed next to people, such as an organization’s members and the access granted on an entity.Values:team— Teamuser-defined— UserDefinedcustom-agent-definition— CustomAgentDefinition
permissionModeenum optionalThe permission scope for the task.Values:default— Defaultread-only— ReadOnly
rolestring optionalThe id of the RBAC role this task assumes. Null when the task runs with the creating user’s own permissions (no assumed role).roleNamestring optionalThe display name of the RBAC role this task assumes. Null when the task has no assumed role or the role no longer exists.runtimePhaseenum 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.contextCompactionThresholdPercentinteger optionalPercentage of the context window (1-100) at which the agent triggers conversation compaction. Populated alongside contextWindowTokens when token usage data is available; omitted otherwise.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,workersourceAutomationIDstring optionalThe automation that spawned this task, if the task was created by an automation run.agentDefinitionIdstring optionalThe Custom Agent definition this task was run as, if any. Null for tasks run by a user directly rather than as a saved agent.pendingInputCountinteger optionalThe number of pending inputs waiting behind this task. Present for tasks that can receive asynchronous inputs.sourceenum optionalThe origin that triggered this task. Valid values: ‘console’, ‘cli’, ‘slack’, ‘schedule’, ‘api’, ‘github’, ‘code-review’.Values:api— Api- Task created via the REST API without a more specific origin.
console— Console- Task created from the Pulumi Cloud web console.
cli— Cli- Task created from the Pulumi CLI.
slack— Slack- Task created from the Slack integration.
schedule— Schedule- Task created by a scheduled automation.
github— Github- Task triggered from a GitHub integration.
code-review— CodeReview- Task created by the code review feature. The platform hosting the reviewed change is identified by the task’s vcsProvider field.
vcsProviderenum optionalThe version control system this task operates against. Set for tasks that target a specific VCS platform (e.g. code reviews). Null for tasks with no VCS context.Values:github— GitHub- GitHub version control system
gitlab— GitLab- GitLab version control system
bitbucket— Bitbucket- Bitbucket version control system
azure_devops— AzureDevOps- Azure DevOps version control system
custom— Custom- Custom version control system
github_enterprise— GitHubEnterprise- GitHub Enterprise Server version control system
origin— Origin- Cursor Origin version control system
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
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. A change to the task’s assumed role takes effect starting with the next turn of the conversation.
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— Defaultread-only— ReadOnly
rolestring optionalThe RBAC role the task assumes, identified by role id. Null means no change. An empty string clears the assumed role, so subsequent turns run with the task owner’s own permissions. A non-empty value must identify a role that exists in the organization and is assigned to you, directly or through a team; a role you do not hold is rejected with a 403. A changed role takes effect starting with the next turn of the conversation.
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— Scheduled- The task was started by a cron-driven scheduled signal.
external_signal— ExternalSignal- The task was started in reaction to an external signal payload.
statusenum 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 optionalThe user’s email address. It is only populated on selected endpoints and is omitted from most responses. Treat it as sensitive information. - ↳
servicePrincipalKindenum optionalThe type of service principal the user is. Set only where service principals are listed next to people, such as an organization’s members and the access granted on an entity.Values:team— Teamuser-defined— UserDefinedcustom-agent-definition— CustomAgentDefinition
permissionModeenum optionalThe permission scope for the task.Values:default— Defaultread-only— ReadOnly
rolestring optionalThe id of the RBAC role this task assumes. Null when the task runs with the creating user’s own permissions (no assumed role).roleNamestring optionalThe display name of the RBAC role this task assumes. Null when the task has no assumed role or the role no longer exists.runtimePhaseenum 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.contextCompactionThresholdPercentinteger optionalPercentage of the context window (1-100) at which the agent triggers conversation compaction. Populated alongside contextWindowTokens when token usage data is available; omitted otherwise.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,workersourceAutomationIDstring optionalThe automation that spawned this task, if the task was created by an automation run.agentDefinitionIdstring optionalThe Custom Agent definition this task was run as, if any. Null for tasks run by a user directly rather than as a saved agent.pendingInputCountinteger optionalThe number of pending inputs waiting behind this task. Present for tasks that can receive asynchronous inputs.sourceenum optionalThe origin that triggered this task. Valid values: ‘console’, ‘cli’, ‘slack’, ‘schedule’, ‘api’, ‘github’, ‘code-review’.Values:api— Api- Task created via the REST API without a more specific origin.
console— Console- Task created from the Pulumi Cloud web console.
cli— Cli- Task created from the Pulumi CLI.
slack— Slack- Task created from the Slack integration.
schedule— Schedule- Task created by a scheduled automation.
github— Github- Task triggered from a GitHub integration.
code-review— CodeReview- Task created by the code review feature. The platform hosting the reviewed change is identified by the task’s vcsProvider field.
vcsProviderenum optionalThe version control system this task operates against. Set for tasks that target a specific VCS platform (e.g. code reviews). Null for tasks with no VCS context.Values:github— GitHub- GitHub version control system
gitlab— GitLab- GitLab version control system
bitbucket— Bitbucket- Bitbucket version control system
azure_devops— AzureDevOps- Azure DevOps version control system
custom— Custom- Custom version control system
github_enterprise— GitHubEnterprise- GitHub Enterprise Server version control system
origin— Origin- Cursor Origin version control system
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