AI agent glossary
Idempotency
The property that performing an operation more than once has the same effect as performing it once, which makes agent retries safe.
Agents retry. A network call times out, a step crashes, a durable workflow resumes, or the model simply calls the same tool twice. If the tool charges a card, sends an email, or creates a record, a retry can do it twice unless the operation is idempotent.
Reading data is naturally idempotent. Actions with side effects need design: check whether the work was already done, use an idempotency key so the server recognizes a repeated request, or prefer operations like setting a status rather than toggling it.
Build idempotency into any tool that changes the outside world, especially in background and production agents where no one is watching. It turns retries from a risk into a routine recovery mechanism.
A refund tool requires an idempotency key derived from the ticket ID. If the agent calls it twice for the same ticket, the payment provider processes the refund only once.
Learn more in the course
Related terms
Go from definitions to doing
Learn to use and build AI agents in 65 practical lessons.