v22

latestOpenAPI 3.1.0raw.githubusercontent.com2025-10-07253798.6 KB
agents
agents
agents

Create Agent Run

Create a new agent run.

Creates and initiates a long-running agent process based on the provided prompt. The process will complete asynchronously, and the response contains the agent run ID which can be used to check the status later. The requesting user must be a member of the specified organization.

This endpoint accepts both a text prompt and an optional image file upload.

Rate limit: 10 requests per minute.

post/v1/organizations/{org_id}/agent/run

Path parameters

org_idinteger required

Headers

{"stackTrail":"paths:/v1/organizations/{org_id}/agent/run:post:parameters:1:schema","oasType":"schema","type":"unknown","title":"Authorization"}

Request body

promptstring required
imagesstring[] nullable

List of base64 encoded data URIs representing images to be processed by the agent

metadataobject nullable

Arbitrary JSON metadata to be stored with the agent run

repo_idinteger nullable

ID of the repository to use for the agent run

modelstring nullable

Model to use for this agent run (optional, uses org default if not specified)

agent_type'codegen' | 'claude_code' nullable

Type of agent to use for this agent run (optional, uses org default if not specified)

Response

Successful Response

idinteger required
organization_idinteger required
statusstring nullable
created_atstring nullable
web_urlstring nullable
resultstring nullable
summarystring nullable
source_type'LOCAL' | 'SLACK' | 'GITHUB' | 'GITHUB_CHECK_SUITE' | 'GITHUB_PR_REVIEW' | 'LINEAR' | 'API' | 'CHAT' | 'JIRA' | 'CLICKUP' | 'MONDAY' | 'SETUP_COMMANDS'
metadataobject nullable