Prompt Sandbox
prompt_agentSubmit a natural-language task to a sandboxed agent harness, starting a new conversation, continuing a specific one, or resuming the most recent; monitor progress with events.
Instructions
Prompt Sandbox. Queue a natural-language work item for an agent harness (Codex, Claude Code, pi, OpenCode, or Prime Agent) inside the sandbox. Observe progress with GET /sandboxes/{sandboxId}/events.
A Sandbox runs many conversations in parallel. Set new: true to start a fresh one, conversationId to continue a specific one, or omit both to continue the most-recently-active conversation; the response returns the conversationId. See Integrated agents.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sandboxId": "<sandboxId>",
"provider": "<provider>",
"prompt": "<prompt>"
},
"name": "prompt_agent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| new | No | Start a NEW conversation on the sandbox (runs in parallel with any existing ones) instead of continuing the most-recently-active one. Mutually exclusive with `conversationId`. | |
| fast | No | Optional. `true` runs this prompt in fast mode. The model stays the same and gives output faster. The provider bills fast mode at its higher fast rate. Omit to use the choice saved on the Agents dashboard for that model. `false` forces standard speed. Only models with `fastMode` set to `true` in `GET /provider-models` accept `true`. Other models return 400 `fast_mode_not_supported`. | |
| model | No | Optional provider model id from `GET /provider-models`. Omit to use the model selected for that harness on the Agents dashboard. Unknown explicit ids are currently forwarded rather than rejected by request validation. | |
| speed | No | Optional. Same as `fast`, plus `ultrafast`, the fastest Codex tier, billed above fast. Only models with `ultrafastMode` set to `true` in `GET /provider-models` accept `ultrafast`. Other models return 400 `ultrafast_not_supported`. Ultrafast needs ChatGPT Pro, an Enterprise or Edu workspace with Ultrafast turned on, or an API organization with Ultrafast access. Without it, the prompt fails and says so. When you send both `speed` and `fast`, they must agree, or the request returns 400 `invalid_speed`. | |
| prompt | Yes | Natural-language task for the sandbox, including repo, preview, or browser-use instructions. | |
| provider | Yes | ||
| sandboxId | Yes | Public Sandbox id returned by create/list/get sandbox calls. | |
| conversationId | No | Continue a specific conversation by id (as returned by a previous prompt). Omit (and omit `new`) to continue the sandbox's most-recently-active conversation. | |
| reasoningEffort | No | Optional reasoning/thinking level (e.g. `none`, `low`, `medium`, `high`, `xhigh`, `max`). Which levels a given model accepts is listed per model in `GET /provider-models`; some models accept none. |