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 an organization. Returns 404 when no Neo-token cap applies to this organization.
Request Parameters
orgNamestring path requiredThe organization name
Responses
windowKindenum requiredKind of cap window applied to the org.Values:trial,individualbaseAllowanceTokensinteger 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.
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 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 - ↳
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). - ↳
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. - ↳
sourceenum optionalThe origin that triggered this task. Valid values: ‘console’, ‘cli’, ‘slack’, ‘schedule’, ‘api’, ‘github’, ‘code-review’.Values:api,console,cli,slack,schedule,github,code-review - ↳
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,gitlab,bitbucket,azure_devops,custom,github_enterprise 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,read-onlyrolestring 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.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,console,cli,slack,schedule,github,code-review- 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,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-onlyrolestring optionalThe id of the RBAC role this task assumes. Null when the task runs with the creating user’s own permissions (no assumed role).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.sourceenum optionalThe origin that triggered this task. Valid values: ‘console’, ‘cli’, ‘slack’, ‘schedule’, ‘api’, ‘github’, ‘code-review’.Values:api,console,cli,slack,schedule,github,code-reviewvcsProviderenum 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,gitlab,bitbucket,azure_devops,custom,github_enterprise
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.
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-onlyrolestring optionalThe id of the RBAC role this task assumes. Null when the task runs with the creating user’s own permissions (no assumed role).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.sourceenum optionalThe origin that triggered this task. Valid values: ‘console’, ‘cli’, ‘slack’, ‘schedule’, ‘api’, ‘github’, ‘code-review’.Values:api,console,cli,slack,schedule,github,code-reviewvcsProviderenum 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,gitlab,bitbucket,azure_devops,custom,github_enterprise
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