Stop Letting AI Agents Run the Whole Workflow
One inbox agent shouldn’t classify, research, score, route, and draft replies in one loose loop. In this video, I build a Mastra workflow that splits sponsor inbox triage into typed steps — bounded model calls where judgment is actually needed, and deterministic guardrails everywhere else. I walk through normalizing and classifying email with explicit schemas, branching from a parent workflow into nested ones, scoring sponsor fit, and inspecting the whole run in Mastra Studio. The point isn’t one giant agent prompt; it’s deciding which parts need model judgment and where the workflow should own control.
Building an AI agent?
I help teams design and ship agentic systems — from architecture to production.
See how I can help
Harness Engineering: 4 Levers to Diagnose Any AI Agent
Most agent failures aren't model failures. They're harness failures. Here's the 4-lever framework I use to diagnose what broke.

Building Approval Gates AI Agents Can't Route Around
How to wire human-in-the-loop on tool calls — and why system prompt instructions like "always ask before sending" don't actually hold.

Your AI Assistant Doesn't Need a Bigger Model. It Needs Colleagues
The multi-agent supervisor pattern in Mastra: eight specialist agents on one local LLM, one supervisor, structural trust boundaries — using TypeScript.

The Quality Loop Your AI Agent Is Missing (Evals + Tracing)
Add an LLM-as-judge scorer to a Mastra agent, catch a fabricated action item your tests would never flag, and fix the prompt — no custom infra.
Get new videos and posts by email
Weekly videos on AI engineering, plus deeper dives in the newsletter.
Occasional emails, no fluff.