Same execution guard — one lens: any irreversible API call

Execution Integrity for Irreversible APIs

Retries are safe. Duplicate side effects aren't. SafeAgent makes any API call exactly-once, even when the network isn't. Payments, webhooks, agent tool calls — anywhere a retry can turn into a second real-world action.

Install from PyPI View on GitHub See it happen ↓
pip install safeagent-exec-guard
Python 3.10+ Apache-2.0
01 — Where it applies

Any API where "it happened" and "the response arrived" aren't the same fact.

The gap between an action firing and your code confirming it fired is where duplicates come from. These are the categories where that gap has a direct dollar or trust cost.

Payments
Stripe, Coinbase, Binance, and broker APIs (Alpaca, Interactive Brokers) all execute irreversible transfers of money. A retried charge, trade, or transfer isn't a UI glitch — it's a second real-world transaction.
Stripe
Coinbase
Binance
Alpaca
Interactive Brokers
Webhooks
Stripe, GitHub, and Twilio explicitly document at-least-once delivery — they will redeliver an event your endpoint doesn't cleanly acknowledge. Slack's Events API behaves the same way, retrying on anything but a fast 200. None of them guarantee exactly-once. That's the receiving side's job.
Stripe
GitHub
Twilio
Slack
Agent tool calls
OpenAI tool calls, Anthropic/Claude tool use, and any agent framework with side-effecting actions can be retried by the orchestration layer without knowing whether the underlying action already executed.
OpenAI tools
Claude / MCP
LangChain
CrewAI
n8n
02 — See it happen

One button. Two outcomes.

This is the actual failure mode — mash the button and watch one side fire a duplicate order on every click while the other side blocks every repeat after the first. Full interactive demo, live below.

Open full demo in a new tab →
03 — Production proof

Live duplicate blocking — May 21, 2026.

Not a simulation. Six confirmed SKIP events from a live trading session on the full stack: DashClaw, SafeAgent, Mycelium Trails, Base/Arbitrum, broker Alpaca.

Six duplicates blocked in one live session
09:42 ET — duplicate buy TQQQ qty=6 blocked, $452
09:47 ET — duplicate add TQQQ qty=6 blocked, $452
09:49 ET — duplicate sell TQQQ qty=12 on flip blocked, $902
10:00 ET — duplicate entry TQQQ qty=6 blocked, $454
10:14 ET — duplicate sell TQQQ qty=18 on V20 flip blocked, $1,350
11:06 ET — duplicate SQQQ add during scale-in blocked, $43
Sum of the six blocked events above: $3,653 in duplicate exposure prevented in a single session.
Full session data →
04 — Get started

Add the guard before the next retry fires.

MIT-licensed claim-before-execute guard. About 10 lines to add to any agent, workflow, or webhook handler.

View on GitHub
pip install safeagent-exec-guard