liveBook · Manning

Idempotency

As explained in Designing AI Systems

An idempotent operation has the same externally observable effect when repeated, whereas a non-idempotent call can create an additional effect each time it runs.

An idempotent operation has the same externally observable effect when repeated. This makes retries safe after timeouts or uncertain execution. A read-only availability check is idempotent; an appointment or ticket creation call is non-idempotent because repeating it can create another result. section 6.1.2 section 10.6

Treat idempotency as operational metadata on every managed tool:

  • Declare whether the tool is idempotent alongside read-only status, confirmation requirements, side effects, rate limits, and cost. section 6.1.2
  • Use the declaration during timeout and retry handling: retry read-only or idempotent operations freely, but require explicit confirmation before retrying state-changing non-idempotent calls. section 6.1.2 section 10.6
  • Keep the declaration aligned with actual external behavior; a false positive can duplicate meetings, tickets, or other state changes. section 10.6

Scheduling and ticket creation

A calendar availability check can be retried after a timeout because it only reads state. A calendar event creation or ticket creation operation is marked non-idempotent, so the platform avoids automatically retrying it without explicit confirmation. section 6.1.2 section 10.6

Figure 6.3 The three layers of a tool definition serve different consumers. Identity (name, version, owner) supports registry operations and access control. Schema (description, parameters, returns) is what models see during function calling. Operational metadata (behavior, rate limits, cost) informs guardrails, execution safety, and billing attribution.

The tool-definition layers show where idempotency belongs: operational metadata informs guardrails and execution safety, while schemas describe model-visible calls. section 6.1.2

How Designing AI Systems covers it

How deep it goes
Defines repeated observable effects and applies the distinction to read-only and state-changing tools, without implementing deduplication.
Examples
Contrasts availability checks with appointment, calendar-event, and ticket creation operations.
What it assumes
Assumes familiarity with tool execution and external state changes while distinguishing read-only from modifying operations.
What you can do after
Operate/configure managed tools with retry behavior matched to their effect on external state.
How it connects
Connects tool behavior metadata with retries, guardrails, rate limits, and side effects.

Also explained in

Compare how 20 books explain idempotency →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Designing AI Systems. The section links point to the parts of the book it draws on.