script_run or Agent Completion: which for a GPT-6.1 Sol agent?
A GPT-6.1 Sol coding agent can call Sume via MCP script_run or Agent Completions. Which fits fan-out of known calls, and which fits open-ended tasks.

Use script_run when your coding agent already knows the calls: three or more independent tool calls of the same shape, such as one image per scene. Use an Agent Completion when the task itself is open-ended and Sume's own agent should decide the steps. script_run runs in a bounded 5 to 55 second window on the MCP session; a completion is an asynchronous run with its own sandbox, started over the API with a required spend cap.
What each one is
MCP tools and gates describes script_run as a short JavaScript program run on the Sume side that calls listed tools in a loop, in parallel or conditionally, and returns one value. It is bounded by timeout_seconds (5 to 55), max_calls and max_paid_calls, and paid creates inside it still need their own idempotency_key. The Agent Completions page describes an unattended run of the Sume Agent with a sandbox, tools, an MCP bridge and media generation, answering 202 with a receipt you poll.
Side by side
| Question | `script_run` | Agent Completion |
|---|---|---|
| Who plans the steps? | Your agent writes the script | Sume's agent decides |
| Entry point | Hosted MCP tool | POST /v1/agent/completions |
| Time model | Up to 55 seconds, then jobs to wait on | Asynchronous run, poll or webhook |
| Spend control | max_paid_calls, max_spend_usd per call | Required generation_spend_cap_usd |
| Credential | OAuth with write, or an API key | API key with agent_completions:write (service-account keys are refused) |
| Result | Returned value, call journal, child jobs | output, artifacts, usage |
Rules of thumb
- Fan-out of identical, well-specified calls:
script_run. Six scene stills, ten caption passes. - Read-heavy discovery that needs judgment: let the coding agent call read tools directly.
- A brief like "make a teaser from this URL" where the steps are unknown: Agent Completion.
- Anything that must survive the coding session ending: Agent Completion, or save job ids from
script_runand wait later.
Limits to remember
Discovery tools and script_run itself cannot be called from a script. script_run returns child jobs[] you still jobs_wait on, one call holding up to 55 seconds. A completion has no streaming and no thread continuation yet, and assistant turns in messages[] are rejected. If you need a saved, repeatable workflow with changing inputs, a Format is a third option, and Scheduled runs saved instructions on a clock.
Whichever route you use, the model on your side does not have to be GPT-6.1 Sol. The same split applies to any coding agent that can speak MCP or HTTP.
Sources
Related posts
More in Agents
- What did my seller agent spend? Read Sume usage by thread
Amazon's Seller Assistant plugin logs its actions with audit trails. For the media your agent made through Sume, read the cost by thread_id and run_id.
- Run the Sume video agent from your backend with Agent Completions
POST /v1/agent/completions runs the same agent as the Sume Agents chat, with tools and media generation, and returns an async run receipt you poll or webhook.
- Safe automation for AI agents that call paid APIs
Keep agents read-only by default, keep secrets out of logs, and on hosted MCP send an idempotency_key, preview with dry_run, and cap with max_spend_usd.
- Scheduled AI video agent runs: cron, API triggers, and receipts
A Sume schedule is a saved Agents automation that runs on a cron cadence and returns a run receipt. Author it in the dashboard; start and monitor runs by API.
Written by Sume