You need to provide either db_url or client. The following example uses db_url.
mongodb_storage_for_agent.py
from agno.storage.mongodb import MongoDbStoragedb_url = "mongodb://ai:ai@localhost:27017/agno"# Create a storage backend using the Mongo databasestorage = MongoDbStorage( # store sessions in the agent_sessions collection collection_name="agent_sessions", db_url=db_url,)# Add storage to the Agentagent = Agent(storage=storage)