Skip to main content
Concierge provides per-session key-value storage that persists across stage transitions. State lets your tools share data without passing it through the LLM.

Basic Usage

State is scoped to the session:each connected client has its own isolated state. Two users browsing at the same time won’t see each other’s carts.

API

Values can be strings, numbers, lists, dicts, or any JSON-serializable Python object.

State Lifecycle

  • Persists across stage transitions within a session
  • Cleared when terminate_session() is called
  • Isolated per session:no cross-session leaks

State Backends

In-Memory (Default)

Best for: development, single-process deployments, stateless workflows.

Postgres

Best for: production, distributed deployments, long-running sessions.
With Postgres state, sessions survive server restarts. A user can start a checkout flow, come back hours later, and their cart is still there.

Patterns

Accumulator Pattern

Collect data across multiple stages:

Guard Pattern

Prevent actions unless prerequisites are met: