Yes, WREN uses Redis Cloud for persistent session storage. All interview state (messages, turn count, analysis) is stored in Redis with 24-hour TTL.
Configure in your .env file:
REDIS_HOST=your-redis-instance.redis-cloud.com
REDIS_PORT=17887
REDIS_PASSWORD=your-redis-password-hereImportant: Never commit your actual Redis credentials to git. Always use environment variables.
- Go to: https://app.redislabs.com/
- Log in with your Redis Cloud account
- Navigate to your database
In the Redis Cloud dashboard:
- Click on your database
- Go to "Browser" tab
- You'll see all keys in your database
All WREN sessions are prefixed with:
langgraph:checkpoint:{session_id}:*
Example keys:
langgraph:checkpoint:cli_20251108_145739:latest
langgraph:checkpoint:cli_20251108_145739:checkpoint_id_123
redis-cli -u redis://default:YOUR_PASSWORD@your-redis-instance.redis-cloud.com:17887Replace YOUR_PASSWORD and your-redis-instance.redis-cloud.com with your actual credentials from .env.
# List all checkpoint keys
KEYS langgraph:checkpoint:*
# Count total sessions
KEYS langgraph:checkpoint:* | wc -l
# List just session IDs (unique)
KEYS langgraph:checkpoint:* | cut -d: -f3 | sort -u# Get latest state for a session
GET langgraph:checkpoint:cli_20251108_145739:latest
# Check TTL (time to live)
TTL langgraph:checkpoint:cli_20251108_145739:latest
# See all keys for a session
KEYS langgraph:checkpoint:cli_20251108_145739:*The data is stored as pickled Python objects, so it won't be human-readable in redis-cli. To inspect it properly:
import redis
import pickle
import os
from dotenv import load_dotenv
load_dotenv()
# Connect using environment variables
r = redis.Redis(
host=os.getenv('REDIS_HOST'),
port=int(os.getenv('REDIS_PORT')),
password=os.getenv('REDIS_PASSWORD'),
decode_responses=False # Important for pickle
)
# Get session
session_id = "cli_20251108_145739"
key = f"langgraph:checkpoint:{session_id}:latest"
data = r.get(key)
if data:
state = pickle.loads(data)
checkpoint = state.get('checkpoint', {})
print(f"Turn count: {checkpoint.get('turn_count', 0)}")
print(f"Messages: {len(checkpoint.get('messages', []))}")
print(f"Complete: {checkpoint.get('is_complete', False)}")
else:
print("Session not found or expired")WREN includes utility scripts to view sessions without manually connecting to Redis:
# List all active sessions
python scripts/view_redis_sessions.py
# View conversation from Redis checkpoint
python scripts/view_session_conversation.py cli_20251108_145739
# View saved conversation log
python scripts/view_conversation_log.py user_profiles/cli_20251108_145739/logs/conversation.jsonWhen you start an interview:
./run_interview.shWREN creates a new session with ID cli_TIMESTAMP.
After each turn:
- State is updated in memory
- LangGraph automatically persists to Redis
- TTL is refreshed to 24 hours
When interview ends:
- Final state saved to Redis
- Conversation log saved to
user_profiles/{session_id}/logs/ - Profile saved to
user_profiles/{session_id}/profiles/ - Redis session expires after 24 hours (but files remain)
Each session stores:
{
"checkpoint": {
"messages": [HumanMessage, AIMessage, ...],
"turn_count": 8,
"is_complete": True,
"current_analysis": {
"vocabulary_richness": 0.95,
"response_brevity": 0.2,
"engagement_index": 0.95
},
"profile_data": {...}
},
"metadata": {
"timestamp": "2025-11-08T15:03:24",
"version": "1.0"
},
"config": {...}
}- Default TTL: 24 hours
- Purpose: Automatic cleanup of old sessions
- What happens: After 24 hours, Redis automatically deletes the session
- Impact: You can't resume an interview after 24 hours
Note: Even if Redis session expires, your conversation logs and profiles remain in user_profiles/ permanently.
- Each session: ~2-10 KB (depends on message length)
- 100 sessions: ~200 KB - 1 MB
- Pickled format is compact
langgraph:checkpoint:{session_id}:{checkpoint_id}
Examples:
langgraph:checkpoint:cli_20251108_145739:latest- Most recent statelanggraph:checkpoint:cli_20251108_145739:abc123- Specific checkpoint
Check credentials:
redis-cli -u redis://default:YOUR_PASSWORD@your-host.redis-cloud.com:17887 PINGShould return: PONG
Common issues:
- Wrong password in
.env - Firewall blocking port 17887
- Redis instance is down
Possible reasons:
- TTL expired (24+ hours old)
- Wrong session ID
- Redis was cleared/reset
Solution: Check user_profiles/ for permanent logs.
Cause: Incompatible Python versions or corrupted data
Solution: Use the same Python version that created the session.
- ✅ Always use
.envfor credentials - ✅ Never commit
.envto git - ✅ Rotate Redis password periodically
- ✅ Use Redis Cloud's built-in security features
- ✅ Limit access to trusted IPs if possible
If you don't have Redis Cloud configured:
- Sign up at https://redis.com/try-free/
- Create a new database (free tier available)
- Get connection details from dashboard
- Add to
.env:REDIS_HOST=your-instance.redis-cloud.com REDIS_PORT=17887 REDIS_PASSWORD=your-password-here
WREN can run without Redis using in-memory storage:
# Just don't configure Redis in .env
# Or set use_redis=False in codeLimitations:
- Sessions lost on restart
- Can't resume interrupted interviews
- No multi-device support
For more details, see:
- TECHNICAL_DOCUMENTATION.md - Redis integration details
- ../scripts/README.md - Utility scripts documentation