Skip to main content
Redis stores agent state in memory for sub-millisecond access — pair it with a SQL backend for conversation history.
The user updates session state; Redis serves fast reads while SQL can hold conversation history.

Quick Start

1

Simple Usage

2

With Configuration

Hybrid setup — SQL for conversations, Redis for state:

How It Works

Redis is a state store — fast key-value access for agent preferences and runtime data. Conversation history uses database_url separately.

Configuration Options

URL formats


Best Practices

Use database_url for chat history and state_url for fast ephemeral state.
Pass ttl when storing session-scoped data that should expire automatically.
Set prefix="prod:" vs prefix="staging:" to isolate keys on a shared Redis instance.
Configure Redis AOF or RDB snapshots if state must survive Redis restarts.

MongoDB State Store

Document-based state with flexible schemas

Database Persistence

Overview of conversation and state backends