Griptape Vector Store Driver: MongoDB Atlas
MongoDB Atlas
- embedding_driver
- DRIVER
If your project already lives in MongoDB Atlas, this driver is the shortest path to adding semantic search - your vectors sit in the same database as everything else, searchable with the same credentials. It's the "one database to rule them all" play, and for a ComfyUI workflow it means the knowledge base your agent queries is the same Atlas cluster your app already writes to. If you're not an Atlas user, though, this is a lot of setup for what the Local driver does in a minute. There's also an "Azure MongoDB" sibling in this pack if you're on the Azure flavor, but this one is the vanilla Atlas path.
How it works
The node assembles a MongoDbAtlasVectorStoreDriver from a stack of environment variable names - seven of them, the most in the pack. They map cleanly onto what you'd find in the Atlas console:
host_env(MONGODB_HOST),username_env(MONGODB_USERNAME),password_env(MONGODB_PASSWORD) - the cluster host and credentials.database_name_env(MONGODB_DATABASE_NAME) andcollection_name_env(MONGODB_COLLECTION_NAME) - where the vectors live.index_name_env_var(MONGODB_INDEX_NAME) andvector_path_env(MONGODB_VECTOR_PATH) - the Atlas Search index and the document field that holds the embedding.
Under the hood it builds a mongodb+srv://user:pass@host/db connection string and hands it to the driver. Output is DRIVER (VECTOR_STORE_DRIVER), wired through Griptape Structure Config → Create Agent → Griptape Vector Store: Query.
Where it gets heavy
MongoDB Atlas doesn't make vector search automatic - you must create an Atlas Search index on the collection with the right vector field and dimensions before anything works. This is the driver's real cost: it assumes you've already configured Atlas, and the node won't hold your hand. The vector_path needs to match the document field your embedding writes to, and the dimensions need to match your embedding model. Get those right and it's smooth; get them wrong and every query returns nothing. And the embedding consistency rule applies as ever - same driver for indexing and querying, or retrieval is garbage.
One more thing that quietly trips people: every credential is an env var name, and the node reads all of them, so a single missing MONGODB_HOST produces a driver that connects to nothing. Set them all in ComfyUI's Settings → Griptape section (or your environment) rather than scattering them in the node fields.
Install
Pack install as always - ComfyUI Manager → search "Griptape" → INSTALL, or git clone https://github.com/griptape-ai/ComfyUI-Griptape into custom_nodes, restart. Dependencies come with it, and keep the README's torch fix in mind after install. Your Atlas cluster needs the MongoDB driver support that ships in griptape[all], so if the node throws an import error, updating griptape itself usually resolves it.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| embedding_driveropt | EMBEDDING_DRIVER | Select an embedding driver or leave as default. | |
| host_envopt | STRING | MONGODB_HOST | Environment variable for MongoDB host |
| username_envopt | STRING | MONGODB_USERNAME | Environment variable for MongoDB username |
| password_envopt | STRING | MONGODB_PASSWORD | Environment variable for MongoDB password |
| database_name_envopt | STRING | MONGODB_DATABASE_NAME | Environment variable for MongoDB database name |
| collection_name_envopt | STRING | MONGODB_COLLECTION_NAME | Environment variable for MongoDB collection name |
| index_name_env_varopt | STRING | MONGODB_INDEX_NAME | Environment variable for MongoDB index name |
| vector_path_envopt | STRING | MONGODB_VECTOR_PATH | Environment variable for MongoDB vector path |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DRIVER | VECTOR_STORE_DRIVER | — |