RedisDb is a class that implements the Db interface using Redis as the backend storage system. It provides high-performance, distributed storage for agent sessions with support for JSON data types and schema versioning.
ParameterTypeDefaultDescription
redis_clientOptional[Redis]-Redis client instance to use. If not provided a new client will be created.
db_urlOptional[str]-Redis connection URL (e.g., "redis://localhost:6379/0" or "rediss://user:pass@host:port/db")
db_prefixstr"agno"Prefix for all Redis keys.
expireOptional[int]-TTL for Redis keys in seconds.
session_tableOptional[str]-Name of the table to store sessions.
memory_tableOptional[str]-Name of the table to store memories.
metrics_tableOptional[str]-Name of the table to store metrics.
eval_tableOptional[str]-Name of the table to store evaluation runs.
knowledge_tableOptional[str]-Name of the table to store knowledge documents.