AI อะไรเนี่ย
LangChain

LangChain and MongoDB Partner for Integrated AI Agent Backend

Tools

LangChain and MongoDB Partner for Integrated AI Agent Backend

LangChain and MongoDB Join Forces for AI Agents

Exciting news for AI developers! LangChain, a leading framework for building LLM-powered applications, has officially partnered with MongoDB to create a robust, open platform for AI agents. This collaboration deeply integrates LangChain's ecosystem, including LangSmith and LangGraph, with MongoDB Atlas, transforming the popular database into a complete backend for AI agent development and deployment.

This partnership addresses a critical need in the AI space: moving agents from experimental prototypes to reliable, production-ready systems. The integration provides essential features like vector search, persistent agent memory, natural-language data access, full-stack observability, and stateful deployment—all within a single, open, multi-cloud environment. With over 65,000 customers already running mission-critical applications on MongoDB Atlas, this means teams can now build advanced AI agents on a database they already trust. You can dive deeper into the announcement and technical details through the LangChain MongoDB Partnership Announcement.

Why This Partnership Matters for AI Workflows

The journey from an agent prototype to production often hits roadblocks, especially concerning durable state, retrieval over real enterprise data, structured database queries, and end-to-end tracing. This collaboration streamlines that process by offering an integrated solution:

Enhanced Retrieval with Atlas Vector Search

MongoDB Atlas Vector Search is now natively integrated into LangChain's Python and JavaScript SDKs. This means developers can seamlessly implement advanced retrieval-augmented generation (RAG) techniques, including semantic search, hybrid search (combining BM25 with vector search), GraphRAG, and pre-filtered queries directly from their MongoDB deployments. For existing Atlas users, this is a game-changer as it requires no additional infrastructure, keeping vector data alongside operational data with unified access controls.

Persistent Agent Memory with MongoDB Checkpointer

Production agents demand durable state to handle multi-turn conversations, human-in-the-loop workflows, and fault-tolerant execution. The MongoDB Checkpointer in LangSmith offers just that. It centralizes high-volume checkpoint writes for numerous agent deployments into a single shared MongoDB cluster. This significantly reduces infrastructure complexity, collapsing the need for multiple dedicated Postgres instances to just one MongoDB cluster for checkpointing and one Postgres instance for relational endpoints, making scaling much more efficient.

Natural-Language Queries Over Operational Data

A highly requested feature, the MongoDBDatabaseToolkit within the langchain-mongodb package empowers LangGraph agents to perform natural-language queries (Text-to-MQL) over structured business data. Agents can discover collections, inspect schemas, generate, validate, and execute MongoDB Query Language (MQL) queries based on simple English prompts—for example, "show me all orders from the last 30 days with shipping delays." This capability comes with full LangSmith tracing for complete visibility.

Full-Stack Observability with LangSmith

Debugging complex AI agents can be challenging. LangSmith now provides full-stack observability, tracing every agent run from beginning to end. This includes MongoDB retrieval calls, tool invocations, agent routing decisions, and checkpointer writes. When an agent produces an unexpected result, developers can trace back through the exact retrieval results, the model's reasoning, and the state transitions that led to the output, allowing for precise identification and resolution of issues.

Getting Started and Who Benefits Most

This integrated stack is ideal for teams and enterprises looking to bring their AI agent prototypes into production with confidence. It supports any LLM provider, runs on any major cloud (AWS, Azure, GCP), and works with both Atlas cloud deployments and self-managed MongoDB Enterprise Advanced, ensuring zero lock-in. LangChain, LangGraph, and Agents remain open-source, offering flexibility and transparency.

Teams in various industries are already leveraging these integrations. For instance, Kai Security, a cybersecurity company, adopted the MongoDB Checkpointer for LangSmith Deployment to enable persistent agent state for their security workflows, shipping pause-and-resume functionality and crash recovery in a day. Fortune 500 companies are also using this partnership to build agentic workflows for automating compliance, regulatory intake, security operations, and customer experience platforms at scale.

Read more: LangChain MongoDB Partnership Announcement to explore the new capabilities and start building your own agentic workflows today.