Overview
MongoStorage provides a MongoDB-based storage backend. Ideal for document-based applications, flexible schemas, and horizontally scalable deployments.
Install
Install the MongoDB storage optional dependency group:
Basic Usage
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
db_url | str | None | None | MongoDB connection URL |
db_client | MongoClient | None | None | Pre-existing pymongo client |
db_name | str | None | "upsonic" | Database name |
session_collection | str | None | "upsonic_sessions" | Sessions collection name |
user_memory_collection | str | None | "upsonic_user_memories" | User memory collection name |
id | str | None | auto-generated | Storage instance ID |
Storage Type
MongoStorage is a synchronous storage implementation using pymongo driver.
