AsyncMongoDb stores Agent, Team, and Workflow sessions, memories, knowledge, evaluations, and traces asynchronously in MongoDB.
The v1-to-v2 migration script supports MongoDB. See the migration guide.
Usage
Install thepymongo (4.9 or later, for the async client) and openai packages:
motor clients are also supported, but motor is deprecated. Use PyMongo’s async client instead.async_mongodb_for_agent.py
Agent.arun() and Agent.aprint_response() with this database.
Run MongoDB
Install Docker Desktop, then start MongoDB on port27017: