A walkthrough of every section in the Idempotency & Safety Rails tool: what each action configuration means, how the circuit breaker settings work, and how to use the exported configuration in your payment agent.
In distributed payment systems, the same operation can be triggered multiple times — a Lambda function retried by SQS, a user double-clicking a payment button, a webhook replayed after a timeout. Without idempotency controls, each trigger executes independently and you end up with duplicate charges, double refunds, or duplicate payouts.
This tool addresses Agent Safety Layer 3 — the idempotency and retry safety layer. It generates a configuration file specifying how each payment action constructs its idempotency key, how long to retain deduplication records, and how the circuit breaker should behave when downstream payment services degrade.
The output is a YAML or JSON configuration file your agent reads at startup. It tells the agent exactly how to construct idempotency keys and when to stop retrying.
{userId}-{orderId}-{action}. This is what gets stored in DynamoDB and checked on each subsequent invocation.agent-idempotency-config.yml or .json.payments.authorise, refunds.process) before executing the corresponding operation.