Mastra

10 articles about mastra - lessons from building and scaling real software.

I Added ACP to My Mastra Agent So It Can Work in Repos

ACP is the layer that lets my Mastra agent hand real repo work to Claude Code instead of stopping at advice.

Agent Loops vs. Workflows: The Boundary That Makes AI Reliable

Most AI demos hand one agent the whole job. When the output touches reputation, money, or outbound email, use a workflow instead of an agent loop. Here's where the boundary goes, built with Mastra.

Stop Giving Your Agent Every Tool

Large tool catalogs break agent context. Tool search fixes that by letting agents discover and load only what they need.

Stop Letting AI Agents Run the Whole Workflow

One inbox agent should not classify, research, score, route, and draft replies in one loose loop.

Human-in-the-Loop Agent Approvals: A Mastra Pattern

Prompt-based approval gates fail because the model decides whether to ask. Mastra's requireApproval primitive removes that decision entirely. Here's how to implement it.

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.

How I Built a Personal AI Assistant with Mastra

A practical guide to building an AI agent with Mastra that researches contacts, schedules follow-ups, integrates with Slack, and uses layered memory.

Build Your Own AI Agent from Scratch (Mastra + TypeScript)

Learn to build your own AI agent that actually does work for you, not just answers questions.