Skip to content
Eldan.ai
Glossary

Idempotency

An operation is idempotent when doing it several times has the same effect as doing it once.

This matters for agents because retries are common: a timeout may hide a call that actually succeeded. An idempotency key lets the receiving system recognise a repeat and ignore it.

Reading is naturally idempotent. Sending an email or charging a card is not, unless you design it to be. Generate a key from the logical action, such as the order id plus the action name, not from a random value created on each attempt.

Common mistake. Retrying a write after a timeout with no key, and charging a customer twice.

In practice. Require an idempotency key on every tool with a side effect, store results by key for a period, and return the stored result on a repeat.

Where this is taught

  • Tool calling

    Tool calling, also called function calling, lets a model request that your code run a named function with structured arguments. The model never executes anything itself. It returns a request, your code validates and runs it, and the result goes back into the conversation for the next step.

  • Human in the loop

    Human in the loop means a person reviews or approves the system's action at defined points before it takes effect. It is the main control for risky or irreversible actions. It only works when the review shows exactly what will happen and the person has the time and context to say no.

  • Agent loop

    The agent loop is the cycle at the heart of every agent: send the conversation to the model, and if it asks for tools, run them, append the results and send again. It ends when the model answers in plain text or a limit is hit. The message list is the whole state of the run.

Cite this page

Eldan Abdrashim. "Idempotency." Eldan.ai, 23 November 2026. https://eldan.ai/glossary/idempotency.

The date you read it is added when you copy.

BibTeX

@online{abdrashim2026idempotency,
  author = {Eldan Abdrashim},
  title = {Idempotency},
  organization = {Eldan.ai},
  date = {2026-11-23},
  year = {2026},
  month = nov,
  url = {https://eldan.ai/glossary/idempotency},
  langid = {english}
}

All terms

Section: Agents and tools. Last updated 23 Nov 2026.