Mongo Agent Storage
Agno supports using MongoDB as a storage backend for Agents using the MongoDbAgentStorage
class.
Usage
You need to provide either db_url
or client
. The following example uses db_url
.
storage.py
Params
Parameter | Type | Default | Description |
---|---|---|---|
collection_name | str | - | Name of the collection to be used. |
db_url | Optional[str] | None | Database URL, if provided. |
db_name | str | "agno" | Database Name. |
client | Optional[MongoClient] | None | MongoDB client, if provided. |
Developer Resources
- View Cookbook