LS-Labs

Glossary

What Is Idempotency? How AI Retries Avoid Duplicate Orders

Idempotency means repeating a request has the same intended effect on the server as running it once. It does not guarantee identical responses or success.

What is idempotency?

Idempotency is the property that repeating the same request has the same intended effect on the server as running it once. It does not require every response body or status code to be identical, and it does not mean the request will succeed.

Idempotency key

An idempotency key identifies retries of the same operation. A client resend is protected against duplicates only if the server supports the key and handles the same key value, parameters and retention period according to its contract; adding a field arbitrarily has no effect on its own.

Why agents need a safe way to retry

When a booking request times out, the backend may not have processed it yet, or the booking may already exist and only the response was lost. Sending the create request again immediately could produce two bookings.

A product can offer a way to look up existing status and, for operations that support it, use idempotency keys. An agent should look up or retry according to the service contract, and must not treat "no response received" as "not executed".

Read HTTP methods and business operations together

RFC 9110 defines PUT, DELETE and safe methods as idempotent methods; using POST to create an order does not give the same guarantee just because HTTP is used. Stripe's POST API, for example, provides a separate idempotency key mechanism.

Idempotency covers the effect of repeating an operation; authorization, whether the parameters match what the user asked for, and whether the result can be confirmed still need separate verification.

Sources and scope

Sources as checked for the source-language entry on 2026-11-06; this English edition adds no new claims and does not represent a new check of the cited pages.

← Back to glossary