create_agent
Creates a new Cloud Agent from a prompt and queues its execution, optionally connecting to a repository and configuring model, mode, and MCP servers.
Instructions
Create a Cloud Agent and enqueue its initial run (POST /v1/agents).
Args: prompt_text: Required instruction text for the agent. name: Optional display name (max 100 chars). repo_url: Optional GitHub repository URL. starting_ref: Optional branch or SHA starting point. pr_url: Optional PR URL (repo_url still required when set). model_id: Optional model id from list_models. auto_create_pr: Whether to open a PR when the run completes. work_on_current_branch: Push to starting ref instead of a new branch. mode: Initial mode: agent or plan. agent_id: Optional client-supplied id (bc-...) for idempotent create. prompt_images_json: Optional JSON array of prompt images ({data,mimeType} or {url}). mcp_servers_json: Optional JSON array (string or list) of inline MCP servers. extra_json: Optional JSON object (string or object) merged into the request body for advanced fields. Cannot overwrite keys already set by typed args (for model.params, omit model_id and pass full model).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| name | No | ||
| pr_url | No | ||
| agent_id | No | ||
| model_id | No | ||
| repo_url | No | ||
| extra_json | No | ||
| prompt_text | Yes | ||
| starting_ref | No | ||
| auto_create_pr | No | ||
| mcp_servers_json | No | ||
| prompt_images_json | No | ||
| work_on_current_branch | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||