Explore Developer Center's New Chatbot! MongoDB AI Chatbot can be accessed at the top of your navigation to answer all your MongoDB questions.

Introducing MongoDB 8.0, the fastest MongoDB ever!
MongoDB Developer
TypeScript
plus
Sign in to follow topics
MongoDB Developer Centerchevron-right
Developer Topicschevron-right
Languageschevron-right
TypeScriptchevron-right

Build a JavaScript AI Agent With LangGraph.js and MongoDB

31 min • Published Sep 06, 2024
Node.jsTypeScriptJavaScript
Facebook Icontwitter iconlinkedin icon
Rate this video
star-empty
star-empty
star-empty
star-empty
star-empty
✅ Written tutorial → https://mdb.link/article-qXDrWKVSx1w ✅ Create your free Atlas cluster → https://mdb.link/free-qXDrWKVSx1w ✅ Get help on our Community Forums → https://mdb.link/forums-qXDrWKVSx1w As a web developer, the idea of integrating AI into your applications might seem overwhelming. But don't worry—I've been there! In this tutorial, I'll walk you through building an AI agent using LangGraph.js and MongoDB, making it way simpler than it sounds. We'll cover the following: ⭐ Understanding what AI agents are and how they work. ⭐ Using LangGraph.js to create agents that can remember past conversations and use "tools" to gather more information. ⭐ Integrating MongoDB for storing conversation history and data retrieval, specifically leveraging MongoDB Atlas Vector Search for context-aware responses. By the end of this video, you'll have built an AI agent capable of managing HR-related queries, looking up employee info from a database, and continuing conversations across multiple sessions. It's like creating your own J.A.R.V.I.S., but for practical, real-world applications! What You'll Learn: ⭐ How to set up LangGraph.js for AI workflows. ⭐ How to integrate MongoDB Atlas to store and retrieve data. ⭐ How to build an AI agent that can manage conversations, look up data, and persist state across sessions. Prerequisites: ✔︎ Node.js and npm ✔︎ Free MongoDB Atlas account ✔︎ OpenAI and Anthropic API keys Clone the project repo and follow along as we create this powerful AI tool. Let’s get started! 🔗 Project Repo: https://github.com/mongodb-developer/LangGraph.js-MongoDB-Example ⏱️ Timestamps ⏱️ 00:00 - Intro 02:50 - Setting up the project 04:29 - Configure MongoDB 05:36 - Seeding the database 12:45 - MongoDB Atlas Vector Search Index 13:50 - Building the AI agent with LangGraph.js 22:47 - Creating the Express.js server 25:44 - Testing the AI agent Subscribe to MongoDB YouTube→ https://mdb.link/subscribe
All MongoDB Videos

Facebook Icontwitter iconlinkedin icon
Rate this video
star-empty
star-empty
star-empty
star-empty
star-empty
Related
Tutorial

Build a JavaScript AI Agent With LangGraph.js and MongoDB


Sep 18, 2024 | 15 min read
Tutorial

NextAuth.js Authentication With MongoDB


Aug 30, 2024 | 10 min read
Tutorial

Type Safety With Prisma & MongoDB


Aug 09, 2024 | 4 min read
Code Example

myLeG


Jul 07, 2022 | 1 min read