AI Dictionary › Fondamenti AI

Idempotency

Idempotenza

Idempotency is the property of an operation that, when performed multiple times, has the same effect as performing it once. Pressing the elevator call button twice is equivalent to pressing it once: that is an idempotent operation. In distributed systems, where messages can be duplicated and retries are the norm, it is the property separating robust systems from fragile ones.

Definition

How it works

In practice it is achieved by designing operations so that repetitions are harmless: set the balance to 100 is idempotent, add 10 to the balance is not. APIs use idempotency keys: the client attaches a unique identifier to the request and the server, upon seeing it again, returns the already computed result instead of re-executing. In HTTP, GET, PUT and DELETE are defined as idempotent, POST is not.

Applications

In AI, idempotency protects agents: an agent retrying a failed action (a payment, an email send, a database write) must be able to do so without duplicating effects, and it is one of the key properties in designing safe tools for LLMs. Beyond AI it is vital in digital payments, messaging and infrastructure deployment (Terraform and Ansible are built on idempotent operations).

History & etymology

The term comes from mathematics: it was coined by the American algebraist Benjamin Peirce around 1870, from the Latin idem (same) and potens (power), to describe elements that return themselves when raised to a power. Distributed computing adopted it, turning an algebraic curiosity into a fundamental design principle.

How it's used in Grace

In Grace's scenarios on AI agents you learn to explicitly request actions that are safe to repeat: idempotency is the concept that makes that requirement precise. The 7 evaluation dimensions reward prompts that anticipate error and retry cases.

Related terms

More in Fondamenti AI

Put it into practice

From our network

HSE Genius: AI for Safety Data Sheets

Extract SDS data, H phrases and ECHA compliance checks in seconds, powered by AI.

Visit hsegenius.com →

From the Agora Intelligence blog

More on agora-intelligence.com →

📱 Download the Android app (beta) iOS coming soon

Say what you mean. Get what you need.

Grace Certified, the AI coach that trains and certifies your prompt engineering, by Agora Intelligence.