{"slug": "bringing-mongodb-atlas-and-voyage-ai-to-dify-build-rag-workflows-and-data-agents", "title": "Bringing MongoDB Atlas and Voyage AI to Dify: Build RAG Workflows and Data Agents Without Heavy Glue Code", "summary": "MongoDB has released new Atlas and Voyage AI extensions for the Dify platform, enabling developers and no-code builders to visually compose AI workflows that connect directly to MongoDB data. The extensions allow users to perform semantic retrieval with Atlas Vector Search, improve result quality with Voyage AI embeddings and reranking, and interact with operational documents through controlled database tools. The integration provides a practical path from idea to working AI application by reducing custom orchestration code and offering reusable building blocks for retrieval-augmented generation workflows and data agents.", "body_md": "AI applications are moving quickly from simple chatbots to systems that can search, reason, recommend, summarize, and act on live business data. For developers, that usually means wiring together databases, embedding models, vector search, rerankers, orchestration logic, and application code. For no-code AI builders, it often means waiting for those integrations to exist before an idea can become a working prototype.\n\nThe MongoDB extensions for [Dify](https://dify.ai) help close that gap.\n\nWith the new [MongoDB Atlas](https://marketplace.dify.ai/plugin/mongodb/mongodb_atlas_tool) and [Voyage AI](https://marketplace.dify.ai/plugin/mongodb/voyage_ai) extensions, Dify builders can visually compose AI workflows and agents that connect directly to MongoDB data, perform semantic retrieval with Atlas Vector Search, improve result quality with Voyage AI embeddings and reranking, and optionally interact with operational documents through controlled database tools.\n\nThe result is a practical path from idea to working AI application: less custom orchestration code, more reusable building blocks, and a smoother experience for both developers and no-code builders.\n\nDify provides a visual environment for building AI apps, workflows, and agents. It makes it easy to connect user input, model calls, tools, prompts, and outputs into a working application. MongoDB Atlas provides the data foundation: flexible documents, operational queries, aggregation, full-text search, and vector search in one platform.\n\nTogether, they create a powerful pattern:\n\nFor a no-code builder, this means you can assemble a retrieval-augmented generation workflow visually. For a developer, it means the integration points are packaged as reusable Dify tools rather than one-off glue code.\n\nThe extension set includes two complementary pieces.\n\nThe MongoDB Atlas tool extension exposes MongoDB operations as Dify tools. These tools let workflows and agents interact with MongoDB collections directly from the Dify canvas.\n\nAvailable capabilities include:\n\nThis is useful for more than just retrieval. It enables agents that can inspect data, summarize records, recommend actions, and — when safely configured — update operational collections.\n\nFor example, a project management agent can search a database of team members, skills, previous projects, and availability, then recommend the best team for a new initiative. With carefully scoped permissions, that same agent could also update a draft team assignment or write a recommendation record back to MongoDB.\n\nThe Voyage AI extension adds embedding and reranking tools to Dify.\n\nEmbeddings convert text into vectors so MongoDB Atlas Vector Search can find semantically similar documents. Reranking takes an initial set of retrieved documents and reorders them by relevance to the user’s query.\n\nThat two-step retrieval pattern matters. Vector search is excellent for finding likely candidates quickly, while reranking helps surface the best candidates before the final answer is generated or returned.\n\nThe included [MongoDB RAG](https://marketplace.dify.ai/template/pash/MongoDB-RAG?templateId=11ddc721-1c90-40e2-b64c-3669c446a129) template demonstrates how these extensions work together in a Dify workflow.\n\nAt a high level, the pipeline does the following:\n\nThis is the core pattern behind many production-grade RAG systems.\n\nInstead of sending a user question directly to an LLM and hoping the model already knows the answer, the workflow first retrieves relevant information from MongoDB. The retrieved context can then be used by a downstream answer node, chat model, or agent to produce a more grounded response.\n\nThe [MongoDB RAG](https://marketplace.dify.ai/template/pash/MongoDB-RAG?templateId=11ddc721-1c90-40e2-b64c-3669c446a129) workflow is intentionally simple and reusable. It separates each retrieval step into a dedicated node so builders can understand, tune, and replace parts of the pipeline as needed.\n\nThe workflow starts with a text input. This could be a question, a search phrase, a support request, a project description, or any natural-language query.\n\nExample:\n\nWhat would be a good team to build scalable Rust applications?\n\nThe input is sent to the Voyage AI embedding tool. The embedding model converts the text into a vector representation that captures semantic meaning.\n\nFor search use cases, the embedding input type should be optimized for queries. This helps improve retrieval quality because the model understands that the text represents a search intent rather than a document to be indexed.\n\nThe generated query vector is passed to the MongoDB Atlas Vector Search tool. Atlas compares the query vector against document embeddings stored in a MongoDB collection and returns the nearest semantic matches.\n\nThe template uses two important retrieval settings:\n\n`numCandidates`\n\n`limit`\n\nIncreasing candidates can improve recall, while lowering them can reduce latency. This gives builders and developers a clear tuning knob depending on the application’s needs.\n\nThe top vector search results are then sent to the Voyage AI reranking tool. Reranking compares the original user query against each candidate document and sorts the documents by relevance.\n\nThis step is especially valuable when the first-stage vector search returns many plausible matches. Reranking helps the workflow prioritize the documents most likely to answer the user’s actual question.\n\nFinally, the template node formats the reranked documents into a structured output. That output can be returned directly, or it can become context for a downstream LLM answer node.\n\nThis makes the template flexible. It can be used as a standalone search pipeline, or as the retrieval layer inside a larger Dify chatbot, workflow, or agent.\n\nFor no-code builders, the biggest advantage is composability. Instead of implementing a RAG backend from scratch, you can drag tools into a Dify workflow and connect them visually.\n\nWith these extensions, builders can create:\n\nThe same building blocks can support simple workflows or more autonomous agents. A workflow might only retrieve and format context. An agent might decide when to search, when to aggregate, and when to update a document — depending on the tools you enable.\n\nDevelopers still benefit from the visual experience, but the value goes deeper.\n\nThese extensions reduce the amount of custom integration code required to connect Dify with MongoDB Atlas and Voyage AI. Instead of hand-building every request, response parser, embedding call, and database operation, developers can rely on packaged tools with clear inputs and outputs.\n\nThe architecture also follows a clean separation of concerns:\n\nThat separation makes the system easier to debug and extend. Developers can tune vector search without changing reranking. They can swap embedding models without rewriting MongoDB logic. They can add an LLM answer node without changing the retrieval pipeline.\n\nOne example use case is a project management agent that recommends a team for a new project.\n\nA user might ask:\n\nWhat would be a good team to build scalable Rust applications?\n\nThe agent can use semantic search to find relevant candidates, previous projects, skills, and experience stored in MongoDB. It can then assemble a recommendation that explains why each person fits the project.\n\nIn a Dify agent setup, MongoDB tools can be made available alongside the RAG workflow. The agent can search documents, inspect structured records, run aggregations, and produce a recommendation grounded in database results.\n\nThis pattern is useful because business data is rarely just static documentation. It often includes operational records: people, cases, accounts, tickets, projects, tasks, products, and events. MongoDB allows that data to remain flexible and queryable, while Dify makes it accessible to AI workflows and agents.\n\nTo get the best results, keep a few practical guidelines in mind.\n\nWhen embedding user questions for retrieval, use query-optimized embeddings. When embedding documents for storage, use document-optimized embeddings if the model supports it. This improves the alignment between search queries and indexed content.\n\nAtlas Vector Search settings such as `numCandidates`\n\nand `limit`\n\naffect both result quality and performance. A larger candidate pool can improve recall, but may increase latency. Start with sensible defaults, then tune based on your dataset and user experience goals.\n\nReranking helps improve the quality of the context that reaches the final model. This can reduce irrelevant context, improve answer accuracy, and make the final output easier to trust.\n\nMongoDB insert, update, and delete tools are powerful. When exposing them to agents, use careful scoping, clear instructions, and appropriate permissions. Many applications should start with read-only tools, then add mutation capabilities only when the workflow and safety boundaries are well understood.\n\nFor vector search, the Atlas index should match the embedding field and embedding dimensions used by your model. For full-text search, index the fields users are likely to search. Good indexing turns a promising prototype into a responsive application.\n\nThe value of these extensions is not just that Dify can call MongoDB or Voyage AI. The value is that builders can now compose a complete AI retrieval and data-interaction pattern inside Dify:\n\nFor no-code builders, this means faster experimentation and fewer blockers. For developers, it means a cleaner integration surface and less repetitive orchestration work.\n\nThe [MongoDB Atlas](https://mongodb.com/atlas) and Voyage AI extensions make Dify a stronger platform for building data-aware AI applications. They bring together visual AI orchestration, operational MongoDB data, Atlas Vector Search, full-text search, embeddings, reranking, and agent tools in a way that is approachable for no-code builders and credible for developers.\n\nThe template shows the foundation: embed a query, retrieve relevant documents from MongoDB Atlas, rerank them, and format the result. From there, teams can build knowledge assistants, recommendation agents, support copilots, document search experiences, and operational AI workflows.\n\nIn short: Dify becomes the place where AI behavior is designed, and MongoDB Atlas becomes the data layer that keeps those AI experiences grounded in real, useful information.", "url": "https://wpnews.pro/news/bringing-mongodb-atlas-and-voyage-ai-to-dify-build-rag-workflows-and-data-agents", "canonical_source": "https://dev.to/mongodb/bringing-mongodb-atlas-and-voyage-ai-to-dify-build-rag-workflows-and-data-agents-without-heavy-1l22", "published_at": "2026-05-31 06:24:29+00:00", "updated_at": "2026-05-31 06:41:10.863106+00:00", "lang": "en", "topics": ["ai-tools", "ai-infrastructure", "ai-agents", "generative-ai", "natural-language-processing"], "entities": ["MongoDB Atlas", "Voyage AI", "Dify", "MongoDB"], "alternates": {"html": "https://wpnews.pro/news/bringing-mongodb-atlas-and-voyage-ai-to-dify-build-rag-workflows-and-data-agents", "markdown": "https://wpnews.pro/news/bringing-mongodb-atlas-and-voyage-ai-to-dify-build-rag-workflows-and-data-agents.md", "text": "https://wpnews.pro/news/bringing-mongodb-atlas-and-voyage-ai-to-dify-build-rag-workflows-and-data-agents.txt", "jsonld": "https://wpnews.pro/news/bringing-mongodb-atlas-and-voyage-ai-to-dify-build-rag-workflows-and-data-agents.jsonld"}}