How to Build an Agent (or: The Emperor Has No Clothes)

BlogThorsten BallApr 15, 2025

AI Summary

A working code-editing agent in about 300 lines of Go with three tools — demonstrating that the core loop behind coding agents is genuinely simple, and the sophistication lives in the harness.

Original excerpt

Ball's demystification essay: he builds a functioning code-editing agent in roughly 300 lines of Go, using three tools (read_file, list_files, edit_file) and a plain loop that feeds tool results back to the model. That's the whole trick. The essay's subtitle says the rest.

The point is not that agents are trivial — it's that the magic isn't where people think. The model plus a loop gets you a demo; everything that makes an agent trustworthy (sandboxing, verification, context management, failure recovery) lives in the harness around that loop.

This is the most-ported essay in the genre — recreated in Python, Rust, TypeScript and more — and it pairs naturally with Böckeler's harness engineering…

Frequently asked questions

What is "How to Build an Agent (or: The Emperor Has No Clothes)" about?

A working code-editing agent in about 300 lines of Go with three tools — demonstrating that the core loop behind coding agents is genuinely simple, and the sophistication lives in the harness.

Who wrote "How to Build an Agent (or: The Emperor Has No Clothes)"?

"How to Build an Agent (or: The Emperor Has No Clothes)" was written by Thorsten Ball. It is curated in the Agentic Engineering vault on Burn 451, which covers engineering with ai coding agents.

How can I read more content from Agentic Engineering?

The complete Agentic Engineering reading list is available at burn451.cloud/vault/agentic-engineering. Each article includes an AI-generated summary so you can decide what to read in seconds. Connect the Burn 451 MCP server to Claude or Cursor to query all Agentic Engineering articles as live AI context.

Can I use "How to Build an Agent (or: The Emperor Has No Clothes)" with Claude or Cursor?

Yes. Install the burn-mcp-server npm package and connect it to Claude Desktop, Claude Code, or Cursor. Once connected, your AI can search and reference this article and the full Agentic Engineering vault in real time — no manual copy-paste required.

15 more articles in this vault.

Import the full Agentic Engineering vault to Burn 451 and build your own knowledge base.

Content attributed to the original author (Thorsten Ball). Burn 451 curates publicly available writing as a reading index. For removal requests, contact @hawking520.