Skip to content

Add Redis Configuration for Background Streaming Support #3

@actuallyrizzn

Description

@actuallyrizzn

Issue: Redis Configuration Required for Background Streaming

Problem

The Letta server requires Redis to be running for background streaming functionality. Without Redis configured, users will encounter 503 errors when attempting to use features that require background streaming (such as letta-code CLI tool).

Error Message:

503 {"detail":"INTERNAL_SERVER_ERROR: Background streaming requires Redis to be running. 
Please ensure Redis is properly configured. LETTA_REDIS_HOST: None, LETTA_REDIS_PORT: 6379"}

Current Situation

The bootstrap/installer script does not set up Redis, leaving users to manually configure it after installation.

Proposed Solution

Add automatic Redis setup to the bootstrap script:

  1. Start Redis container (or install Redis if not using Docker)
  2. Configure Redis environment variables in .env file:
    LETTA_REDIS_HOST=host.docker.internal
    LETTA_REDIS_PORT=6379
  3. Ensure Redis persists across reboots

Implementation Options

Option 1: Docker Compose (Recommended)

If using Docker Compose, add Redis service:

services:
  redis:
    image: redis:7-alpine
    container_name: letta-redis
    restart: unless-stopped
    ports:
      - "6379:6379"
  
  letta:
    # ... existing config ...
    environment:
      - LETTA_REDIS_HOST=redis
      - LETTA_REDIS_PORT=6379
    depends_on:
      - redis

Option 2: Standalone Docker Container

If using standalone Docker, add Redis container:

docker run -d \
  --name letta-redis \
  --restart unless-stopped \
  -p 6379:6379 \
  redis:7-alpine

Then add to .env:

LETTA_REDIS_HOST=host.docker.internal
LETTA_REDIS_PORT=6379

Option 3: System Redis Installation

For non-Docker installations, install and configure Redis on the host system.

Benefits

  • Prevents 503 errors for background streaming features
  • Improves user experience (no manual configuration needed)
  • Enables full functionality of Letta CLI tools
  • Reduces support requests

Impact

  • Severity: Medium-High
  • User Impact: CLI tools and background streaming features fail without Redis
  • Workaround: Manual Redis setup (documented but not ideal)

Testing

After implementation, verify:

  1. Redis container/service is running
  2. Letta server can connect to Redis
  3. Background streaming works (test with letta-code CLI)
  4. Redis persists across reboots

References

  • Letta server requires Redis for background streaming
  • Error occurs when LETTA_REDIS_HOST is not set
  • Default Redis port is 6379

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions