Skip to main content
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 the pymongo (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
Use async methods such as Agent.arun() and Agent.aprint_response() with this database.

Run MongoDB

Install Docker Desktop, then start MongoDB on port 27017:

Parameters