> ## 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.

# Callback Payload Store Protocol • AI Agent SDK

> CallbackPayloadStoreProtocol: Protocol for durable, reference-addressable interactive callback values.

# CallbackPayloadStoreProtocol

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

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

Protocol for durable, reference-addressable interactive callback values.

Some channels hard-cap inline callback payloads (e.g. Telegram's 64-byte
inline-callback limit). When an interactive `reply`/`select` value is
too long to travel inline, the framework persists the canonical value under
a short, collision-resistant reference and emits that reference in the
callback instead. On click the registry resolves the reference back to the
exact value — so long option values (URLs, file paths, free-text choices)
round-trip losslessly on every channel.

This mirrors :class:`ApprovalStoreProtocol`: the contract lives in core so
any backend and any channel can interoperate; core ships a bounded
in-memory default (:class:`InMemoryCallbackPayloadStore`) and heavier
durable backends (e.g. SQLite) live in the `praisonai-bot` runtime.

Behaviour is unchanged when no store is configured — values that fit inline
are always sent inline, so this is additive and backward compatible.

## Methods

<CardGroup cols={2}>
  <Card title="put()" icon="function" href="../functions/CallbackPayloadStoreProtocol-put">
    Persist `value` under `ref` until `expires_at` (epoch seconds).
  </Card>

  <Card title="get()" icon="function" href="../functions/CallbackPayloadStoreProtocol-get">
    Return the value stored for `ref`, or `None` if unknown/expired.
  </Card>
</CardGroup>

## Source

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