Backend job that needs an agent: Agent Completions or hosted MCP?
Agent Completions runs Sume's agent and returns a 202 receipt with a required spend cap. Hosted MCP is for a client whose own model calls Sume tools.

Pick by who supplies the model. If your backend wants Sume's own agent to do an ad-hoc task, call Agent Completions: POST /v1/agent/completions returns a 202 receipt, and generation_spend_cap_usd is required. If you want your own model (Claude, Mistral, anything else) to call Sume tools, connect it to hosted MCP at https://mcp.sume.com/mcp. The first runs Sume's agent; the second lets another agent use Sume.
Side by side
Both are documented on Sume's docs (read 2026-10-08).
| Question | Agent Completions | Hosted MCP |
|---|---|---|
| Whose model runs | Sume's agent; model is only sume-agent | Yours, in the MCP client |
| Entry | POST /v1/agent/completions | https://mcp.sume.com/mcp |
| Auth | API key with agent_completions:write | OAuth or API key |
| Response | 202 and an agent.run receipt you poll | Tool results, then jobs_wait |
| Spend control | generation_spend_cap_usd, required, no default | dry_run, max_spend_usd (optional) |
| Sync chat wire | No; streaming not available | Not applicable |
Details that bite
Agent Completions has constraints that a drop-in chat integration would not expect:
- It is not a synchronous chat completion. The response is a run receipt with
status_urlandcancel_url, notchoices[]. - Send exactly one of
instructionormessages. Assistant turns are rejected, not ignored, and each completion runs in a new thread. - Keys created before the feature shipped lack the scopes and get
403 insufficient_scope. Create a new key and rotate to it. - Service-account keys cannot create completions.
- A repeated
Idempotency-Keyreturns the original receipt withidempotency_hit: true; the same key with a different payload returns409 idempotency_conflict.
A minimal call
The cap is the field to get right. Here the run may spend at most $2 on generation.
curl -sS -X POST https://api.sume.com/v1/agent/completions \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: weekly-teaser-2026-10-08" \
-d '{
"instruction": "Make one 9:16 teaser clip for the new product.",
"generation_spend_cap_usd": 2
}'When to choose which
Choose Agent Completions when the task changes on each call and you want Sume's sandbox and tools without running a model yourself. If the task is the same recipe with new inputs, Sume's docs point to Formats, and for a clock-driven job, to Scheduled. Choose hosted MCP when a person works inside Cursor, Claude Code or VS Code, or when you already run an agent loop and only need Sume's tools. Do not mix them up with the in-app Studio Agent, which is not an MCP connector.
Polling the receipt
After the 202, poll the status_url from the receipt until the run reaches a terminal state, and call the cancel_url if you need to stop it. Store the Idempotency-Key with your own record of the task, so a retry after a network error in your backend returns the original receipt, not a second run. Keep the spend cap in your own config, because it has no default and a missing value is rejected.
Choosing keys and scopes
Create a dedicated API key for the backend with only the agent_completions scopes it needs, and keep it in your secret store, not in a repo. If a run needs more than the cap you set, raise the cap on the next request on purpose; do not make it large by default. The cap is the spend control, so pick it per task.
Sources
Related posts
More in Agents
- Swap the LLM behind your MCP client: do Sume's gates change?
No. Hosted MCP gates sit in scopes, idempotency_key and max_spend_usd, not in the client model. What each session type can see, whatever model it runs.
- Claude Code prompt hook: 30 s default, a model checks a Sume render
A prompt hook asks a model to review a tool call, with a 30-second default timeout. When that suits a Sume render and when a script check is the better gate.
- Which Sume MCP tools to leave undeferred when Claude searches tools
Anthropic says to keep 3 to 5 frequently used tools non-deferred. Which Sume hosted MCP tools to pin and which to defer.
- Codex background tasks keep their turn's permissions: paid Sume calls
Codex 0.161.0 background tasks retain the permissions of the turn that started them. What that means for a Sume render started from a background task.
Written by Sume