> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# In Memory Idempotency Store • AI Agent SDK

> InMemoryIdempotencyStore: Bounded, zero-dependency in-memory :class:`IdempotencyStoreProtocol`.

# InMemoryIdempotencyStore

> Defined in the [**protocols**](../modules/protocols) module.

<Badge color="blue">AI Agent</Badge>

Bounded, zero-dependency in-memory :class:`IdempotencyStoreProtocol`.

The default store for single-replica deployments — identical behaviour to
the gateway's original per-process `OrderedDict` + in-flight `set`. It
is *not* durable: after a process restart the store is empty, so a durable
backend (SQLite/redis) must be injected for the restart/multi-replica case.

## Methods

<CardGroup cols={2}>
  <Card title="reserve()" icon="function" href="../functions/InMemoryIdempotencyStore-reserve">
    Instance method.
  </Card>

  <Card title="record()" icon="function" href="../functions/InMemoryIdempotencyStore-record">
    Instance method.
  </Card>

  <Card title="release()" icon="function" href="../functions/InMemoryIdempotencyStore-release">
    Instance method.
  </Card>
</CardGroup>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L1774">
  `praisonaiagents/gateway/protocols.py` at line 1774
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Memory Concept" icon="brain" href="/docs/docs/concepts/memory" />

  <Card title="Memory Overview" icon="database" href="/docs/docs/memory/overview" />

  <Card title="Memory Configuration" icon="gear" href="/docs/docs/configuration/memory-config" />

  <Card title="Session Resume" icon="rotate-right" href="/docs/docs/memory/session-resume" />
</CardGroup>
