CrewAI conversational flows: confirm cost before a Sume render

In a CrewAI chat flow, have the step call Sume with dry_run first and ask the user to confirm the cost.

4 min readSume
All posts

In a conversational flow, make the first Sume call a preview with dry_run=true, show the estimate to the user, and submit only after they agree. The CrewAI releases page lists 1.15.23 (Sep 28, 2026) with native Gemini 3.8 Flash support.

Why a flow step should preview

A chat flow can reach a paid tool in one turn. Sume's hosted MCP offers dry_run=true, an admission and cost preview that does not submit the job, and max_spend_usd, which is enforced only when provided.

Flow steps and Sume gates (CrewAI releases and Sume docs, read 2026-10-03)
Flow stepSume callSpend?
1. Gather the requestNoneNo
2. PreviewPaid tool with dry_run=trueNo
3. Confirm with the userNoneNo
4. SubmitSame tool, dry_run omitted, idempotency_key setYes

Step 2: the preview call

The playbook in the Sume docs shows the argument shape. Send it first and show the user the estimate.

{
  "idempotency_key": "chat-1234-video-001",
  "dry_run": true,
  "max_spend_usd": 2,
  "payload": {
    "prompt": "A slow push-in on a ceramic mug, soft morning light"
  }
}

Step 4: the submit

Repeat with dry_run omitted or false. Keep the same idempotency_key per confirmed request, so a repeated message does not create a second job. Poll with jobs_status or jobs_wait and read jobs_result.

Guard rails

  • Hosted MCP hides mutating and paid tools until the session has mcp:write or an API key.
  • allow_write and allow_paid are legacy and not required, and they cannot bypass a missing scope.
  • Discover contracts with tools_list and tools_schema; do not hard-code them.
  • Store the idempotency key with the chat turn so a crash can be recovered.

Takeaway

The release notes cover CrewAI, not Sume. The pattern comes from Sume's documented gates: preview, confirm, then submit.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume