

Context Engienering clearly explained (with examples)
Context engineering is a balancing act. An agent needs enough context to do the job well, but not so much that the prompt becomes noisy, harder to reason over, or expensive to reuse. The challenge is deciding what to include, what to leave out, and how to keep the right information current without breaking the prompt cache.
In this workshop, Brandon and Alex will show how to handle context in Mastra with concrete examples. We’ll use a production-style scenario inspired by real customer work to show how teams keep the right state visible to the agent, update it when reality changes, and avoid overpacking the prompt with unnecessary information.
We’ll cover:
Instructions for stable identity, behavior, and constraints
Inline context and request-scoped data for current application state
Tools and direct fetches for fresh data from APIs or databases
Memory and observational memory for recent and long-running conversations
Signals and dynamic context for information that changes during a run
Processors for shaping model context and keeping authoritative data current
Prompt caching considerations and how to preserve stable prefixes while still updating runtime context
Join us for a live demo, real code, and the chance to ask questions directly to Brandon and Alex.
Hosted by
Brandon Barros, Product, Mastra
Alex Booker, Developer Experience, Mastra
Recording and code examples will be available to everyone who registers.