How a self-calling function stays durable and content-addressed when every invocation is its own durable promise.
A Resonate Python worker computes factorial recursively across a worker pool. Each invocation is a durable promise keyed by the input, so prior results are returned from the store on replay without re-execution.
How the fan-out / fan-in pattern collapses to four `yield ctx.rfi(...)` calls plus four `yield <handle>` fan-in points when every branch is a durable promise.
Notify a customer over email, SMS, Slack, and push in parallel. Each channel is an independent durable checkpoint, so a retry of one branch does not re-send the others.
How a Redpanda-fed Python worker collapses head-of-line blocking and crash-resume into straight-line generator code by treating each message id as a durable promise id.
A Redpanda consumer kicks off one durable workflow per message and returns immediately. Each step is a checkpoint; a worker crash mid-deletion resumes from the last completed batch, and the record id deduplicates retries.
How a Lambda handler hands a multi-step Python workflow to a long-running Resonate worker that survives Lambda's 15-minute timeout.
AWS Lambda has a hard 15-minute execution ceiling. Split the work: Lambda accepts the request and dispatches a durable RPC, and a long-running Resonate worker runs the multi-step workflow with each step checkpointed.
How a generator-style workflow blocks indefinitely on a ctx.promise() and resumes the moment an external HTTP handler calls resonate.promises.resolve.
Block a workflow on a human click without polling, schedulers, or queues. The workflow yields a durable promise that an HTTP gateway resolves from outside on a later request.
How a self-calling calculator function distributes its sub-tasks across task groups while keeping each step a durable checkpoint.
Parse an arithmetic expression into a tree, then recursively dispatch each sub-expression to a worker pool and the operator to a separate pool. Every sub-expression is its own durable promise, so partial results survive crashes and the recursion is plain Python.
How three sequential LLM agents become four lines of generator code when every yield is a Resonate checkpoint.
Coordinate researcher, writer, and reviewer agents in sequence. Each agent handoff is a durable checkpoint, so a failure mid-pipeline retries only the failed agent — completed agents are not re-run.
Three remote-invocation shapes — rfc, detached, rfi — across a Flask gateway and nine Python service groups, with crash recovery.
Cross-process function calls survive node crashes when the call graph is a durable promise. The example shows await-chain, detached-chain, and fan-out flows in Python using rpc, rfc, rfi, and detached.
Three MCP tools coordinate on one durable promise keyed by job name — work survives MCP-server restarts and deduplicates by id.
Three MCP tools — start_gathering, probe_status, await_result — coordinate on one Resonate durable promise keyed by job name; after a crash the worker reclaims the promise and re-runs the function from the top.
How a Resonate workflow combines an LLM step with a durable-promise approval gate and a re-summarize loop when the human rejects.
Scrape a URL, summarize it with a local LLM, then block on a durable promise until a human confirms or rejects. Rejection re-runs the summarize step; confirmation completes the workflow.
How tagging a Python process with `group="worker-group"` and addressing an RPC to `poll://any@worker-group` handles service discovery, load balancing, and crash recovery.
Spread work across N identical Python workers and recover in-flight executions when one of them crashes, by tagging each worker with a group name and addressing the call to any member of that group.
How a Python webserver route invokes a registered function under durable execution and reads its result without standing up a separate worker process.
A request handler invokes a Resonate-registered function; the SDK executes it as a durable promise inside the same process and returns the result inline.
How a two-step money transfer with compensating reversal is written as straight-line Python when each step is a Resonate durable checkpoint.
Move funds between two accounts with debit + credit + compensating reversal against a SQLite ledger. Each step is a durable checkpoint and replays are idempotent on a deterministic op_id.
How a long-running keyword-monitoring agent collapses to a generator workflow when every yield is a durable checkpoint and the promise store IS the state store.
Continuously scan Hacker News, score each story with an LLM, and notify on hits — without re-analyzing stories after a crash. Every step is a Resonate checkpoint and the dedup set rebuilds on replay, so no external database is needed.
How a Stripe-style payment webhook becomes exactly-once when the event_id is the durable promise id and each step is a checkpoint.
Process Stripe-style payment webhooks exactly once by using the event_id as the Resonate promise id. Retries from the provider reattach to the existing durable execution instead of triggering a second charge.
How RPC, RFI, and ctx.detached split a FaaS submission into one durable orchestration on a router process and a pool of replaceable executors in a named worker group.
Submit function executions to a named worker group via durable RPC, RFI, and detached invocations; the orchestration survives worker crashes because the durable promise lives on the Resonate server, not in the router process.
How an MCP server returns a promise id instead of blocking, and lets the agent ask back later — backed by a Resonate-registered function and a durable sleep.
Expose a long-running job to an LLM as an MCP tool that returns a promise id immediately, then let the agent poll for completion against a durable promise on the Resonate server.
How a FastAPI gateway dispatches durable work to a worker group and lets clients poll a non-blocking status endpoint.
Accept an HTTP request, dispatch durable work to a separate worker process, and let the client poll for completion. The FastAPI gateway holds no state; Resonate keeps the promise alive across worker crashes and restarts.
How a single generator orchestrator triggers a long-running Databricks job and blocks on a durable promise that the notebook resolves out-of-band.
Trigger a Databricks job from a FastAPI service and resume a workflow when the job calls back, without splitting business logic across event handlers. The orchestrator yields a durable promise that the notebook resolves over HTTP.
How `ctx.sleep` collapses long-lived waits into one yield by suspending the workflow against a durable timer promise.
Suspend a workflow for seconds, days, or years without holding a Python process open. The sleep is a server-backed timer promise; another worker resumes the workflow when the timer fires, even if the original worker is gone.
How an autonomous agent loop with a long-lived sleep step collapses to straight-line generator code when each yield is a durable checkpoint.
An LLM-driven reminder assistant that parses a natural-language request, picks a target timestamp, and sleeps until then before sending the reminder. The sleep is a durable timer, so no cron, queue, or database is needed.
How a three-function greeting program demonstrates the Resonate Python SDK's local-mode workflow, registration, and ctx.run primitive.
The minimum Resonate Python workflow: one generator function calls two ordinary functions through ctx.run, and the SDK turns each call into a durable checkpoint with zero server setup.
A multi-turn tool-using LLM agent expressed as one generator function with three branches, where every LLM call, web call, and user prompt is a Resonate durable checkpoint.
An LLM agent that searches the web, scrapes pages, and converses with a user across many turns must not lose context to a crash. Each LLM call, tool call, and user input becomes a durable checkpoint via `ctx.lfc`.