A scheduled run with a 15-minute cron isn’t the right shape for iterating on a prompt. Two manual paths exist for testing — both Builder-only:Documentation Index
Fetch the complete documentation index at: https://docs.chatblocks.ai/llms.txt
Use this file to discover all available pages before exploring further.
schedule.preview— one-off run of any prompt with no saved row. Streams progress over SSE. Use this while you’re drafting.- Run-now — fires the saved schedule’s exact prompt once, immediately. Use this when the schedule is already saved and you want to confirm it works without waiting for the next tick.
schedule.preview — one-off preview
The streaming MCP tool runs a one-off preview without creating a scheduledRuns row. Args mirror schedule.set minus cronExpression:
| Event | Payload |
|---|---|
text-delta | Chunk of model output text (throttled to 100ms intervals) |
tool-call | { toolName, args } — every time the model invokes a tool |
tool-result | { toolName, result } — what came back |
finish | { success, toolCallCount, errorMessage? } — the final summary |
Preview tools execute normally. If the agent calls
blocks.setWidgetData, widget data actually updates. Customers iterate by re-running with tweaked prompts; there’s no dry-run flag.How the ephemeral key works
Preview mints a system-flaggedcb_live_* key just for this invocation, uses it to call MCP, then deletes it in a finally block. If the process dies between mint and delete (extremely rare), the orphaned key sits inert with no row pointing at it — acceptable for v1. A janitor cron is deferred.
The audit log records the decrypt with actor: "system:schedulePreview", so preview events are distinguishable from production scheduled runs and from MCP tool calls driven by a human agent.
From the CLI
The CLI wraps preview atchatblocks schedule preview:
· prefix per event. See CLI → Commands.
Run-now — one-off fire of a saved schedule
The list row at/settings/schedule has a small Zap icon button — visible to admins on a Builder workspace when the row’s status is active. Clicking it:
- Calls
scheduledRuns.runNow(a Convex action). - Dispatches
tasks.trigger("scheduled-agent-run", { scheduledRunId })against Trigger.dev. - The standard scheduled-run pipeline runs — same BYOK decrypt, same hidden key, same MCP loop.
- A
scheduledRunHistoryrow appears on the History page within ~10–30 seconds.
schedule.runNow { scheduleId }. Same path via the CLI: chatblocks schedule run <id>.
When to use which
| Situation | Use |
|---|---|
| Drafting a brand-new prompt | schedule.preview (no row, instant feedback) |
| Verifying a saved schedule before the next cron tick | Run-now |
| Demoing the agent loop to a teammate | schedule.preview (one call, one log) |
| Re-firing yesterday’s broken run | Run-now |
What’s next
Concepts
What a scheduled run actually does, end to end.
CLI → schedule
Terminal commands for preview, list, history, and run.