Skip to main content
An idempotency key is a header one API honours so that the same request sent twice charges once. An effect key is the name of a consequence on the agent’s side, enforced before the call goes out, across every API the agent touches, whether or not any of them support idempotency. Where an API does support it, pass the effect key as the idempotency key and get both.

What idempotency keys are good at

At the remote, they are the strongest thing available: the provider itself knows whether it has seen the key, and can return the original response rather than acting again. Stripe’s is the canonical example and it works. If every call your agent makes is to one API that implements them well, you have solved a large part of this problem.

What they do not do

The row that matters most is the unknown outcome. Resending with an idempotency key is the right move when the remote implements them and the window has not passed. It is a guess when the remote does not, when the call went to a second API, when the window expired, or when the client never learned whether the first request arrived. CTRLRun refuses to guess and makes someone look.

When to use both

Always, where the remote supports it. Pass the effect key as the idempotency key:
Now the agent refuses the second attempt before it leaves, and the remote refuses it if one ever arrives. Two independent defences, and the receipt says which one acted.

The distinction that matters

An idempotency key makes a request repeatable. An effect key makes a consequence identifiable, before anything is sent, across the whole agent, and joined to who approved it and what was recorded.

Next