Skip to content

mastra-ai/workshop-longmemeval

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mastra Agent Memory Workshop

Workshop materials for building AI agents with advanced memory capabilities using Mastra.

📅 Workshop Info

Date: July 24, 2025
Time: 11:00 AM - 12:00 PM Central Time
Duration: 1 hour
Event: Lu.ma

🎯 What You'll Learn

🛠️ Prerequisites

  • Node.js v20+ installed
  • OpenAI API key

LongMemEval setup

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

🚀 Quick Start

  1. Choose an example to explore:
cd examples/01-basic-memory
pnpm install
  1. Add your OpenAI API key to .env:
# Uncomment and add your key
OPENAI_API_KEY=your_key_here
  1. Seed some data:
pnpm seed
  1. Run the example:
pnpm dev

📁 Workshop Examples

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

🧠 Memory Concepts

Working Memory

  • Persistent storage for user information
  • Can be thread-scoped or resource-scoped
  • Supports structured templates

Semantic Recall

  • Vector-based retrieval of relevant messages
  • Configurable search scope and result count
  • Includes surrounding context

📚 Resources

💬 Get Help


Built with ❤️ by the Mastra team

About

Memory examples for the Mastra Memory workshop on Jul 24, 2025

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published