Anatomy of a Production AI Agent: Anthropic's 13-Block System

Anthropic has revealed how its production agents are built: not one magic prompt, but a clearly structured system of 13 independent blocks. We break down two real prompts (research_lead_agent and research_subagent) and extract a full component checklist and a ready-made SKILL.md template. The result is a set of concrete blocks: role, budget, OODA loop, resource ceilings and separation of responsibilities.

AI-processed from Habr AI; edited by Hamidun News
Anatomy of a Production AI Agent: Anthropic's 13-Block System
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Key metric #1Role and persona — defines how the agent thinks and behaves
Key metric #2Goal and context — a clear statement of what needs to be done and why
Key metric #3Call budget and resource ceiling — the line at which the agent must stop

A production AI agent is not just a set of instructions in one long prompt. It is a full system in which each component handles a separate aspect of the work: resource management, the OODA loop, separation of responsibilities between agents, error handling, monitoring. Without a clear architecture, your agent will behave unpredictably.

What Anthropic revealed

The company published two real production prompts that run in live systems: research_lead_agent.md and research_subagent.md. These are not teaching examples, not demos and not simplified versions. They are the actual prompts that do real work. When you take them apart, you see an architecture that prompt engineering courses don't teach.

The main finding: instead of one magic long prompt, Anthropic uses a system of 13 clearly defined, independent blocks. Each block handles one task and can be reused in other agents. That means the architecture scales through composition, not rewriting.

The 13 blocks every production agent needs

Here is the full checklist of components that any production agent should include:

  • Role and persona — defines how the agent thinks and behaves
  • Goal and context — a clear statement of what needs to be done and why
  • Call budget and resource ceiling — the line at which the agent must stop
  • OODA loop — the Observe→Orient→Decide→Act cycle, repeated
  • Error handling and fallback strategies — what to do on failure
  • Separation of responsibilities between agents — how work is distributed
  • Tools and their limits — what the agent can and cannot use
  • Output format and result validation — how to check correctness
  • Monitoring and logging — a way to see what is happening inside
  • Timeouts and retry logic — preventing hangs and repeated errors
  • Self-checking and verification — the agent checks itself before producing output
  • State normalization — turning the result into a readable form
  • Guardrails and safety layer — preventing the agent from crossing boundaries

These are not extras and not "nice to have". If even one component is missing, the agent will run unstably and unpredictably. I have seen it dozens of times: agents lose context, blow through their budget, hang on edge cases.

Lead and Sub: division of labor

The difference between a lead agent and a sub-agent is fundamental. The lead is a strategist and coordinator. It sees the whole big picture, plans the strategy, makes the key decisions and manages a whole team of sub-agents.

A sub-agent is a narrow specialist. It is fast and cheap to call, takes one specific, well-defined task and reports the result. The sub listens to the lead and takes no initiative.

Anthropic uses this setup because it scales. One lead can coordinate five sub-agents. Then you add five more, and the lead copes. Five more, and it still works. You don't rewrite the lead or change the architecture. You just expand the team.

A ready-made template

After breaking down Anthropic's prompts, I extracted the patterns and put together a SKILL.md template. You can use it to walk through your own agent and make sure you haven't missed anything. It works like a pilot's pre-flight checklist, but for AI agents.

The main rule: use it BEFORE going to production. Adding components on the fly and rewriting prompts under live conditions is hellishly painful. Spend one day on architecture and you will be grateful to yourself for months.

What this means

If you are building an agent right now, this architecture can save you weeks of debugging. Usually the components show up in the code by accident, after the disaster has already happened: the agent hung, blew past its budget, or got stuck on an edge case. Now you have a proven template. Use it.

Story

Key Questions Answered

What Anthropic revealed?

The company published two real production prompts that run in live systems: research_lead_agent.md and research_subagent.md. These are not teaching examples, not demos and not simplified versions. They are the actual prompts that do real work. When you take them apart, you see an architecture that prompt engineering courses don't teach. The main finding: instead of one magic long prompt, Anthropic uses a system of 13 clearly defined, independent blocks.

What are the key details on The 13 blocks every production agent needs?

Here is the full checklist of components that any production agent should include: Role and persona — defines how the agent thinks and behaves Goal and context — a clear statement of what needs to be done and why Call budget and resource ceiling — the line at which the agent must stop OODA loop — the Observe→Orient→Decide→Act cycle, repeated Error handling and fallback strategies — what to do on failure Separation of responsibilities between agents — how work is distributed Tools and their…

What are the key details on Lead and Sub: division of labor?

The difference between a lead agent and a sub-agent is fundamental. The lead is a strategist and coordinator. It sees the whole big picture, plans the strategy, makes the key decisions and manages a whole team of sub-agents. A sub-agent is a narrow specialist. It is fast and cheap to call, takes one specific, well-defined task and reports the result. The sub listens to the lead and takes no initiative. Anthropic uses this setup because it scales. One lead can coordinate five sub-agents.

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Hands-On AI Engineering · Hamidun Academy

Build & Ship Production AI Agents Without Boilerplate Code

Start your free 72-hour trial at Hamidun Academy (academy.hamidun.com) — interactive lessons on Claude Code & Cursor, live Tech Radar, and production agent templates.

Start 72h Free Trial →Vibe-Coding Intensive
What do you think?
Loading comments…