Workshop materials for building AI agents with advanced memory capabilities using Mastra.
Date: July 24, 2025
Time: 11:00 AM - 12:00 PM Central Time
Duration: 1 hour
Event: Lu.ma
- Memory Fundamentals: Understanding Working Memory vs Semantic Recall
- Benchmark Performance: How Mastra achieved 80% accuracy on LongMemEval
- Practical Implementation: Building agents that remember users across conversations
- Node.js v20+ installed
- OpenAI API key
For the longmemeval example there's a huggingface git submodule in ./examples/03-longmemeval-exploration/src/data/ To run this example you must clone the submodule.
You can do that when you clone this repo by running:
git clone --recurse-submodules https://github.com/mastra-ai/workshop-longmemeval.git
or
git clone --recurse-submodules git@github.com:mastra-ai/workshop-longmemeval.git
Note: the longmemeval subrepo is ~9GB! If you don't want all that data, a regular git clone will skip it.
If you clone the repo and want the longmemeval data later:
cd examples/03-longmemeval-exploration/src/data/
git submodule update --init --recursive
- Choose an example to explore:
cd examples/01-basic-memory
pnpm install
- Add your OpenAI API key to
.env
:
# Uncomment and add your key
OPENAI_API_KEY=your_key_here
- Seed some data:
pnpm seed
- Run the example:
pnpm dev
Learn the fundamentals of adding memory to Mastra agents:
- Setting up LibSQL storage
- Configuring working memory and semantic recall
- Thread-scoped conversations
Build agents that remember users across multiple conversations:
- Resource-scoped memory
- Persistent user profiles
- Cross-thread information retrieval
Interactive exploration of 500 real LongMemEval benchmark questions:
- Each agent has isolated memory with pre-loaded history
- Test different question types interactively
- Understand real-world memory challenges
Build a practical restaurant recommendation agent:
- Structured working memory templates
- Real-world application patterns
- Persistent storage for user information
- Can be thread-scoped or resource-scoped
- Supports structured templates
- Vector-based retrieval of relevant messages
- Configurable search scope and result count
- Includes surrounding context
- Discord: Join our community
- GitHub Issues: Report bugs or request features
- Twitter: @mastra_ai
Built with ❤️ by the Mastra team