In this tutorial, we create a MemGPT-inspired Discord agent using LangGraph Cloud, enabling chatbots to remember user interactions across conversations for a more personalized experience.
Key components of the MemGPT agent:
1. Core memories: Persistent user information
2. Recall (semantic memories): Context-based retrieval
3. Management via tool use
We'll cover:
- Implementing the agent graph
- Deploying the agent on LangGraph Cloud
- Creating the Discord bot
- Writing tests and evaluations for the agent
By the end of this tutorial, you'll understand how to build, deploy, and evaluate a Discord bot with long-term memory capabilities.
Chapters:
00:00 MemGPT & LangGraph Cloud
00:36 Agent Overview
01:19 Part 1: Designing the agent
02:05 Forking and Cloning the Repository
02:17 Understanding the Repo Structure
03:05 Code Review: Defining Memory Management Tools
07:15 Part 1b: Deploying on LangGraph Cloud
08:59 Interacting with the Agent in LangGraph Cloud Studio
09:47 Part 2: Deploying a Discord Server
10:31 Setting Up a Discord Bot
12:19 Testing the Discord Bot
14:14 Setting Up Google Cloud Run
15:12 Part 3: Evaluating and Testing the Agent
17:14 Conclusion and Next Steps
Additional Resources:
- GitHub Repository: https://github.com/langchain-ai/lang-memgpt
- LangGraph Cloud Documentation: https://langchain-ai.github.io/langgraph/cloud/
- MemGPT Paper: https://arxiv.org/abs/2310.08560
Presenter: Will Hinthorn (https://twitter.com/WHinthorn)