

What is an Agent Harness? And How to Build a Great One!
Most agent frameworks give you a way to call an agent. What they don't give you is a way to manage the full lifecycle around it — modes, threads, state, tool approvals, subagents, and the event system your UI needs to actually render what's happening. That's where the harness comes in.
Mastra's Harness is a control layer that sits above your agents and orchestrates everything a real agent-powered application needs: multiple agent modes you can switch between, shared state with schema validation, thread management with locking, tool permission systems, subagent spawning (including forked subagents that inherit conversation context), observational memory, and a rich event stream your UI can subscribe to.
The coding agent is the harness most people know — tools like Claude Code have made it mainstream. But that's just the beginning. A co-working harness. A security scanner harness. Harnesses for accounting, law, designing computer chips. Mastra's harness primitive is designed to enable all of it. It already powers Mastra Code, and the same primitive can unlock agentic use cases you might not have previously thought possible.
Mastra's CTO Abhi Aiyer has been meticulously iterating on this API with the team and will walk you through where it's headed, how it works, and how to start building with it.
If you're not sure what a harness is, come. By the end, you'll have a tangible understanding and lots of ideas for how to use it.
Q and A throughout and at the end.
Hosted by
Abhi Aiyer, Founder and CTO, Mastra