resonate-external-system-of-record-pattern-python

Coordinate idempotent writes to external systems of record in Python Resonate workflows.

6|Updated Jan 8, 2026
One-click install
npx skills add https://github.com/resonatehq/resonate-skills --skill resonate-external-system-of-record-pattern-python
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: resonate-external-system-of-record-pattern-python
Source: https://github.com/resonatehq/resonate-skills/tree/main/resonate-external-system-of-record-pattern-python
Command: npx skills add https://github.com/resonatehq/resonate-skills --skill resonate-external-system-of-record-pattern-python

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the challenge of keeping business state consistent when durable Resonate workflows interact with external systems that have their own durability guarantees, by ensuring writes to the system of record are idempotent and authoritative.

Core Features & Use Cases

  • Idempotent writes first: Write to the external system of record before any dependent side effects to ensure a single source of truth.
  • Checkpointed interactions: Use deterministic checkpointing so external calls are durably recorded and not re-executed on replay.
  • Practical integrations: Patterns and examples for PostgreSQL, TigerBeetle/ledger systems, and HTTP/message brokers in Python-based workflows.
  • Anti-pattern guidance: Advice on avoiding in-memory, non-durable reads and on handling secondary systems (e.g., search indexes) as compensatable or best-effort writes.

Quick Start

Write to the external system of record first, wrap all I/O in ctx.run so results are checkpointed, and use an external idempotency key to avoid duplicates.

Frequently Asked Questions about resonate-external-system-of-record-pattern-python

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I ensure idempotent writes to PostgreSQL from durable Python workflows?

To ensure idempotent writes to PostgreSQL from durable Python workflows, write to the external system of record first using an external idempotency key, and wrap all database I/O in deterministic ctx.run checkpoints to prevent duplicate executions on replay.

Why does my durable workflow re-execute external database calls during replay?

Durable workflows re-execute external database calls during replay when those interactions are not properly checkpointed. Wrapping I/O operations in deterministic ctx.run calls durably records results, ensuring external dependency usage via ctx.get_dependency is not re-executed on replay.

What is the best way to keep business state consistent across a TigerBeetle ledger and secondary search indexes?

The best way to keep business state consistent is to make TigerBeetle the authoritative system of record with idempotent writes first, then treat secondary search indexes as compensatable or best-effort writes to avoid in-memory, non-durable reads.

Can I use external message brokers as the system of record for Python workflow state?

Yes, you can use external message brokers as the system of record for Python workflow state by applying idempotency keys and deterministic ctx.run checkpointing. This ensures the broker remains the single source of truth for durable workflow interactions.

When should I avoid in-memory state reads in durable Resonate workflows?

You should avoid in-memory state reads in durable Resonate workflows whenever business state consistency is required. Always perform explicit authoritative reads from the external system of record on replay to guarantee durable, accurate state synchronization.