Your AI will eventually trigger an expensive incident. OnceOnly prevents it.
OnceOnly sits between your agent and real side-effects (Stripe, emails, CRM, APIs). It blocks duplicates, caps spend, and enforces tool permissions.
Why we built OnceOnly
A short founder-style note and the real scenarios this prevents in production.
Why we built this
We built OnceOnly after seeing AI agents double-charge users and loop paid APIs in production.
Every AI system that can act in the real world will eventually do something twice.
Real scenarios we stop
- Stripe double charges / duplicate refunds
- API retry storms burning budget overnight
- Agents mutating or deleting the wrong record
What goes wrong without OnceOnly
AI agents retry, race, and loop. When they touch money or external systems, the failure mode is expensive.
Without OnceOnly
WITHOUT- Double charges / double refunds
- Runaway spend overnight
- Tool loops → API bans / outages
- Refunds + chargebacks + angry users (trust damage)
- No audit trail when things break
With OnceOnly
WITH ONCEONLY- Exactly-once side-effects
- Hard budgets + rate limits
- Tool allowlists/denylists
- Audit logs: executed / blocked / deduped + why
Real production failure
A concrete breakdown: trigger, impact, and how it gets prevented.
Incident: Duplicate refunds
Real incidentTrigger
AI support agent retried refund logic (retries + races).
Impact
34 duplicate refunds → $8,200 lost + 2 days support cleanup.
Prevention
OnceOnly: idempotency key + budget cap + audit logs.
Where teams use OnceOnly
Common production use-cases where AI agents and automations create real risk.
Teams use OnceOnly to protect
- Payment agents
- AI support bots
- Automation platforms
- Multi-worker AI jobs
Before vs after
Before
LLM → Stripe → Stripe → Stripe → INCIDENT
After
LLM → OnceOnly → Stripe (1x)
How it works
OnceOnly is a decision API. Before your agent performs a real action, it asks OnceOnly. Only one run gets permission.
Pick an action key
Example: charge:order:123
- Use stable IDs you already have (order_id, event_id, user_id).
- Reuse the same key on retries.
Ask OnceOnly
Allowed or duplicate — one decision before the action.
- Allowed → run once.
- Duplicate/locked → skip safely or poll.
Execute side-effect once
Stripe, email, CRM, API writes happen exactly once.
- Do the irreversible call once.
- Failures are safe to retry with the same key.
Built for production AI bot teams
Everything you need to ship faster without burning budget or breaking systems.
Exactly-once actions
Guarantee a side-effect happens once, even with retries, race conditions, and webhook replays.
AI leases
One agent acquires and executes; everyone else polls. Prevents double execution under load.
Tool governance
Allow/deny tools per agent, add pricing rules, and hard caps so agents can’t “invent” dangerous actions.
Budgets & rate limits
Cap actions/hour and spend/day to stop runaway loops and tool spam.
Audit logs
Get a forensic trail of decisions: executed, blocked, deduped, and why.
Kill switch
Instantly disable a rogue agent (Agency plan) during an incident.
Python SDK: ship in minutes
If you can call HTTP, you can use OnceOnly — but the SDK makes it fast.
Install
pip install onceonly-sdk
Then use check_lock(), AI leases, and governance APIs.
Governed tool call
from onceonly import OnceOnly
client = OnceOnly(api_key="onceonly_sk_...")
client.gov.upsert_policy({
"agent_id": "support-bot",
"allowed_tools": ["send_email"],
"max_actions_per_hour": 120,
"max_spend_usd_per_day": 25.0
})
res = client.ai.run_tool(
agent_id="support-bot",
tool="send_email",
args={"to": "user@example.com"},
spend_usd=0.001
)
ROI in one incident
Examples (not promises) of what a single AI incident can cost when it hits money, paid tools, and production. Examples from typical production failures (loops/retries).
Duplicate payments
When an agent processes payments, duplicates become direct loss:
Plus refunds and support time. Even 2 duplicates × $200 = $400 + support time.
Runaway tool loop
An overnight loop calling paid tools / LLMs can rack up:
Incident response
One on-call incident:
Plus trust damage and time spent on postmortems.
| Incident Type | Typical Loss | With OnceOnly |
|---|---|---|
| Duplicate payments | $5K–$50K | $0 (exactly-once) |
| API loop | $500–$40K | Hard spend cap |
| Tool misuse | Data loss / bans | Tool allowlists |
| Incident debugging | 6–12 eng hours | Full audit log |
Pricing
Pick a plan based on your risk. If your agent touches money or writes to external systems, choose Pro.
| Metric | Free | Starter | Pro | Agency |
|---|---|---|---|---|
| Idempotency checks / month | 1,000 | 20,000 | 200,000 | 2,000,000 |
| AI lease requests / month | 3,000 | 100,000 | 1,000,000 | 10,000,000 |
| Default TTL | 60s | 1h | 6h | 24h |
| Max TTL | 1h | 24h | 7d | 30d |
| Tools registry | — | — | Up to 10 tools | Up to 500 tools |
| Agent governance (policies + observability) | — | — | Included | Included |
| Kill switch | — | — | — | Included |
FAQ
Quick answers for teams shipping AI agents in production.
How much can one AI incident cost?
It depends on what your agent can touch. Incidents commonly include duplicate payments, refund/chargeback overhead, and runaway tool spend — ranging from hundreds to tens of thousands of dollars.
Can one incident cost more than a year of OnceOnly?
Yes. A single duplicate payment batch or overnight retry loop can exceed the yearly cost — plus the hidden cost of support time and trust damage.
What types of failures does this stop?
Duplicate side-effects (charges, refunds, emails), retry storms, tool loops, and unsafe tool usage. OnceOnly enforces exactly-once actions, budgets, and tool allow/deny rules.
Where do I put OnceOnly in my stack?
Right before the irreversible call: Stripe, email send, CRM write, or any API mutation. Your agent asks OnceOnly first; only one run is allowed to execute.
How fast can we integrate?
Minutes. Add one call before the side-effect and reuse the same action key on retries.
Do you store our payment data or business payloads?
No. OnceOnly does not store payment data or business payloads — only action keys and decision metadata needed for dedupe, governance, and audit logs.
Do you have a Python SDK?
Yes — Python SDK + REST API. Start here: Python SDK docs.
How do billing and refunds work?
Renews monthly • Cancel anytime • Secure payments via Stripe. We offer a 14-day refund — see Refund Policy or email support@onceonly.tech. Charges may appear as OnceOnly.
Is it safe to put in the critical path?
Yes. OnceOnly is built to make low-latency decisions so you can put it directly in front of irreversible calls.
How does it work (technical)?
OnceOnly is a decision API in front of side-effects: it blocks duplicates, enforces budgets/tool permissions, and records audit logs. See the docs for full details and the API reference: docs.onceonly.tech.