Agent-Architecture

18 articles about agent-architecture - 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.

Harness Engineering: The 4 Levers Behind Almost Every Agent Failure

When an agent fails, harness engineering gives you four levers (Context, Tools, Loop, Governance) to find which one broke in under a minute.

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.

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.

Karpathy's LLM Knowledge Base, Wired Into a Real Agent

How to build Karpathy's LLM knowledge base into a production AI agent using Claude Code plan mode, an Obsidian vault, and a local LLM.

Governing AI Agents Without Killing Them: What Actually Works in Production

Most AI agent governance advice targets boards, not builders. Three failure patterns, real TypeScript examples, and what a CTO should do Monday morning.

The Observability Layer Your AI Agent Is Missing

Logs tell you what happened. Traces tell you why. The three layers of agent observability, and where silent failures actually live.

AI Agent Evals: The 4 Layers Most Teams Skip

Most teams evaluate AI agents by vibes. Here are the four layers of evals you actually need to ship agents with confidence.

I Gave My AI Agent Access to My Second Brain

What happens when you wire an AI agent directly into your Obsidian vault? Here's the setup I use to turn notes into real leverage.

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.

How AI Agents Remember Things

How do AI agents remember things between sessions? Every agent forgets everything when a conversation ends, so how do the best ones seem to know you?

How OpenClaw Works: The Architecture Behind the 'Magic'

OpenClaw agent architecture explained: How autonomous AI agents like ClawdBot create the illusion of sentience using just inputs, queues, and a loop.