User Guides# User guides provide helpful resources for using Redis OpenAI Agents and its different components. User Guides Session Management Overview Prerequisites AgentSession JSONSession Best Practices Cleanup Semantic Caching Overview Prerequisites Basic Usage Integration with Agent Runs RedisCachingModel Cache Statistics Cleanup Semantic Routing Overview Basic Usage Distance Thresholds Integration with Agents Dynamic Route Management Multi-Match Routing Best Practices Cleanup Vector Search (RAG) Overview Basic Usage Building a RAG Agent Document Management Batch Operations Caching embeddings Best Practices Cleanup Token Streaming Overview Basic Streaming Streaming Agent Output Multiple Consumers Resumable Streaming Event Types Best Practices Cleanup Metrics & Observability Overview AgentMetrics Integration with Agent Runs Prometheus Export Custom Metrics Tracing Best Practices Cleanup Agent Coordination Overview Basic Coordination Multi-Agent System Example Subscribing to Events Atomic Operations State Management Best Practices Cleanup Hybrid Search Overview HybridSearchService Individual Search Components Filtering When to Use Each Approach Best Practices Cleanup Middleware When to use middleware Prerequisites The protocol MiddlewareStack Short-circuiting with SemanticRouterMiddleware Caching with SemanticCacheMiddleware Composing the stack Using the stack with an Agent Injecting history with ConversationMemoryMiddleware text_response helper Summary Tool Result Caching When to use When not to use Basic usage Volatile arguments Ignored arguments Side-effecting tool names Async tools