AI Agents
Neo

CreateTasks

Creates 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.

post/api/preview/agents/{orgName}/tasks

Request

  • Base URL: https://api.pulumi.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.pulumi.com/api/preview/agents/{orgName}/tasks
  • Auth: none declared

Path parameters

orgNamestring required

The organization name

Request body

agentDefinitionIdstring

Optional Custom Agent definition id to run this task as. When set, the task's role, permission mode, 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.

approvalMode'manual' | 'auto' | 'balanced'

Optional approval mode override for this task. If omitted, org default is used.

permissionMode'default' | 'read-only'

Controls the permission scope for the task. When omitted, defaults to 'default' (the agent uses the creating user's full permissions).

planModeboolean

Whether to enable plan mode for this task.

rolestring

Optional 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.

source'api' | 'console' | 'cli' | 'slack' | 'schedule' | 'github' | 'code-review'

The origin that triggered this task. Defaults to 'api' if omitted.

toolExecutionMode'cloud' | 'cli' | 'worker'

Where tools should be executed. Defaults to 'cloud' if omitted.

Response

Created

taskIdstring required

The task identifier

Changes

No recorded changes to this operation across all 1 revision of this API.