ОБ ЭТОМ ЭПИЗОДЕ
Tyler Barnes is a founding engineer at Mastra and the person behind its memory systems. In this chat with Shane, he explains observational memory - Mastra's fix for the thing every coding agent does where it fills up its context, compacts, and forgets what you were doing.
The idea came from how people remember. You don't consciously save memories while you work; something in the background just does it. Observational memory runs a second agent that watches the conversation and writes short observations of what's happening. Once those pile up, they replace the bulky tool calls and messages in context, so you keep what matters and drop the noise. Because the context stays stable, it's fully prompt-cacheable. It scored state-of-the-art on the LongMemEval benchmark, and the team ran it inside Mastra Code, their open-source coding agent, for months before shipping. Shane's had an email agent going on the same thread for months without a reset.
Tyler also talks about recall, which enables the agent to search its own past; extractors that pull out structured data, which is how thread titles now rename themselves; and subconscious memory that builds a knowledge graph in the background. Plus agent signals, which let you drop context into a running agent without hijacking its loop, so you can steer it mid-task or wire up a GitHub webhook that wakes it when CI fails.
Recorded live on Agents Hour, a weekly livestream by Mastra CPO Shane Thomas and CTO Abhi Aiyer. Mondays 12PM Pacific.
📚 OBSERVATIONAL MEMORY
Announcing Observational Memory: https://mastra.ai/blog/observational-memory
The research breakdown (SoTA on LongMemEval): https://mastra.ai/research/observational-memory
Mastra Code, the coding agent that never compacts: https://mastra.ai/blog/announcing-mastra-code
Tyler Barnes on X: https://x.com/tylbar
📚 MASTRA RESOURCES
Mastra: https://mastra.ai
Mastra on X: https://x.com/mastra_ai
Mastra Discord: https://mastra.ai/community/discord
Mastra GitHub: https://github.com/mastra-ai
Learn Mastra: https://mastra.ai/learn
Principles of Building AI Agents (Book): https://mastra.ai/books/principles-of-building-ai-agents
Patterns for Building AI Agents (New Book): https://mastra.ai/books/patterns-of-building-ai-agents
WHAT IS MASTRA?
Mastra is an open-source TypeScript framework designed for building and shipping AI-powered applications and agents with minimal friction. It supports the full lifecycle of agent development—from prototype to production. You can integrate it with frontend and backend stacks (e.g., React, Next.js, Node) or run agents as standalone services. If you're a JavaScript or TypeScript developer looking to build an agentic or AI-powered product without starting from first principles, Mastra provides the scaffolding, tools, and integrations to accelerate that process.
⏱️ CHAPTERS
00:00 The compaction problem
00:19 Meet Tyler Barnes, Mastra founding engineer
01:39 Mastra Memory v1
03:47 The jump to observational memory
04:24 What is LongMemEval?
05:07 How OM works
11:00 Recall: searching your own history
12:09 Observational memory extractors
14:01 Subconscious OM & the knowledge graph
16:49 Agent signals: decoupling the loop
20:23 State signals & connecting the graph
21:26 The "dungeon" days