Skip to main content

Redis CLI

Docker Setup

docker run -d --name redis \
  -p 6379:6379 \
  redis:7

Quick Start

# Test connection
praisonai persistence doctor \
  --state-backend redis \
  --state-url "redis://localhost:6379"

# Run with state persistence
praisonai persistence run \
  --state-backend redis \
  --state-url "$REDIS_URL" \
  "Hello"

Commands

Doctor

praisonai persistence doctor \
  --state-backend redis \
  --state-url "redis://localhost:6379"

Run with State

praisonai persistence run \
  --state-backend redis \
  --state-url "$REDIS_URL" \
  --session-id my-session \
  "Process this task"

Python Test

python3 -c "
from praisonai.persistence import create_state_store
store = create_state_store('redis', url='redis://localhost:6379')
store.set('test', {'value': 1})
print('Redis OK:', store.get('test'))
"