Train your AI on MongoDB
Connect your MongoDB database to train your AI agent on document collections. Open syncs collections using Change Data Capture (CDC) for real-time updates or full refresh for complete snapshots.
Connect once, and Open automatically keeps your AI agent's knowledge up to date. When you update content in MongoDB, the changes sync automatically—no manual retraining required.
What can be synced
Collections — Full collection data with all documents and their nested structures.
Documents — Individual documents with all fields, including nested objects and arrays.
Change Streams — Real-time capture of inserts, updates, and deletes via CDC (requires replica set).
Features
- •CDC Replication — Change Data Capture for real-time incremental sync of inserts, updates, and deletes.
- •Schema-less Mode — Read documents without assuming a fixed schema - handles varying document structures.
- •Collection Sync — Sync entire collections or filter by specific criteria.
- •Cluster Support — Works with MongoDB Atlas and self-hosted replica set clusters.
Requirements
- •MongoDB replica set cluster (Atlas or self-hosted)
- •Database user with read permissions
- •For CDC: oplog access for the user
- •Network access to MongoDB (whitelist IPs if needed)
How to connect
- 1.Create a database user with read access (and oplog access for CDC)
- 2.Get your MongoDB connection string from Atlas or your cluster
- 3.Ensure your cluster is a replica set (required for CDC)
- 4.In Open, go to AI Training → Sources → Connect MongoDB
- 5.Enter your connection string and credentials
- 6.Select collections to sync and choose sync mode
Good to know
- CDC requires a replica set - standalone MongoDB instances only support full refresh
- Schema-less mode handles documents with varying structures
- For large collections, initial sync may take significant time
- MongoDB 3.6+ required for Change Streams
- Atlas M10+ clusters recommended for production CDC
Common questions
Security: Open only requires read access to your MongoDB. We never write, modify, or delete your content. All data is encrypted in transit and at rest. GDPR compliant, working toward SOC 2 Type II.
Ready to connect MongoDB?
AI Training → Sources → MongoDB
Other training sources