Redis OpenAI Agents API#
Reference documentation for the Redis OpenAI Agents API.
Sessions & Memory#
|
Persistent session storage for OpenAI Agents SDK conversations. |
|
Native RedisJSON-based session storage for OpenAI Agents SDK. |
Caching#
Two-level semantic cache for LLM responses. |
|
|
Result from a cache lookup. |
Caching wrapper for OpenAI Agents SDK Model interface. |
|
Cached model response matching ModelResponse structure. |
|
Cached usage information. |
Search#
|
Vector store for document storage and semantic search. |
Full-text search using Redis 8's FT.SEARCH. |
|
Combined BM25 + Vector search using RedisVL. |
|
|
A search result from hybrid search. |
Routing#
|
Semantic router for classifying statements into predefined routes. |
|
Definition of a route for semantic classification. |
|
Result of routing a statement. |
Streaming#
Redis Streams-based event transport for token streaming. |
|
Fault-tolerant stream processor with DLQ support. |
|
Resumable LLM streaming backed by Redis Streams. |
|
High-level helper for publishing SDK streaming events. |
Coordination#
Streams-based coordination for distributed agents. |
|
|
Standard event types for agent coordination. |
Lua script-based atomic operations for Redis. |
|
Raised when a handoff is already in progress for a session. |
Observability#
|
Time-series metrics collector using RedisTimeSeries. |
Exports AgentMetrics in Prometheus text format. |
|
Stores OpenAI Agents SDK traces in Redis for observability. |
SDK Integration#
Integrated runner with automatic caching, metrics, and session management. |
|
|
Result from a cached run. |
|
A callable tool for searching documents using Redis hybrid search. |
Redis-backed rate limiting guardrail for OpenAI Agents SDK. |
|
|
Execute run function with cache checking. |
|
Decorator that records metrics for a run function. |
Factory function to create a Redis file search tool. |
Tool Caching#
|
Decorator that memoizes a callable's return value in Redis. |
Built-in immutable sequence. |
|
frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object |
Middleware#
|
Compose middleware around an OpenAI Agents SDK |
|
Protocol for around-style middleware in the OpenAI Agents SDK. |
|
Snapshot of a |
Cache LLM responses keyed by the semantic similarity of the input. |
|
|
Short-circuit the LLM call when the input matches a known intent. |
|
Prepend semantically relevant past messages into the request. |
Infrastructure#
Shared Redis connection pool for all components. |
|
Configure the default connection pool. |
|
Get the default shared connection pool. |
|
Reset the default pool. |
|
Configuration for retry behavior. |
|
Decorator that adds retry logic to a sync function. |
|
Decorator that adds retry logic to an async function. |
|
Configure the global default retry settings. |
|
Get the default retry configuration. |
|
Sorted set-based ranking for agent operations. |
|
Bloom filter-based deduplication for agent operations. |