storage • AI Agents Framework

Storage adapter implementations for PraisonAI.

storage

AI Agents Framework

Storage adapter implementations for PraisonAI.

Heavy implementations that follow StorageBackendProtocol for:

  • Redis (praisonai[redis])
  • MongoDB (praisonai[mongodb])
  • PostgreSQL (praisonai[postgresql])
  • DynamoDB (praisonai[dynamodb])
  • Valkey (praisonai[valkey])

NOTE: `praisonai.storage holds the canonical, low-level storage adapters. It is NOT dead code — praisonai.persistence builds on top of it. For example praisonai.persistence.state.redis.RedisStateStore is a thin wrapper around RedisStorageAdapter defined here, and MongoDBStateStore obtains its pymongo client from MongoDBStorageAdapter, so this module is load-bearing and canonical for the backends that persistence wraps. Valkey shares driver init via persistence._valkey_client`.

Note on remaining duplication: `persistence.state.dynamodb keeps its own boto3 setup because it uses a different partition-key schema (pk) than the adapter (key); collapsing it would change stored-data layout. The persistence.state stores layer per-key TTL, hash operations (hget/hset`) and counters on top of the KV/blob adapters here.

Application code that just needs a persistence layer should use `create_state_store, create_conversation_store, or create_knowledge_store from praisonai.persistence.factory`.

Import

python
from praisonai import storage

Related Documentation