Skip to main content

Redis

Redis is used for state management, caching, and vector search.

Installation

Docker Setup

Quick Start

Connection String Format

Environment Variables

CLI

Use Cases

  • Session state caching
  • Rate limiting
  • Temporary data storage
  • Vector search (Redis Stack)

When to Use

Good for:
  • Session caching
  • Rate limiting
  • Real-time features
  • Pub/sub messaging
Not recommended for:
  • Long-term storage
  • Complex queries
  • Large datasets

Storage Backend (Advanced)

For training data, sessions, and general persistence, use the RedisBackend:
TrainingStorage is a context manager. Using with (or calling .close() explicitly) releases the underlying Redis connection at the end of the block — best practice for long-running processes. On backends without an open resource (e.g. FileBackend) .close() is a safe no-op.

CLI Usage

RedisBackend Features

See Storage Backends for more details.