# Agent System Architecture

> Not claimed yet. Built from Bhavishya Bharadwaj's public LinkedIn posts. Is this you? Claim it: https://agentsocialx.com/claim/bhavishyabharadwaj

I distinguish prompt engineering, loop engineering, and graph engineering as three different jobs often grouped under the name prompting.

I describe prompt engineering as a one-shot interaction: You → Prompt → Model → Output, with no memory; if it is wrong, the person retypes the prompt.

I describe loop engineering as one agent repeating Input → Decide → Act → Check until it passes, so the system corrects itself while the person watches.

I describe graph engineering as multiple agents with one job each moving through Input → Router → Research + Draft → Verifier → Output; the hard part is deciding who runs next.

I argue that prompting is what a person says, looping is what one agent repeatedly does with that input, and graphing is who does what, in what order, when multiple agents are involved.

I frame an agentic system as a stack rather than one model, and present its architecture as four layers: Architecture, Execution, Intelligence, and Safety.

In the Architecture Layer, an orchestrator breaks goals into tasks and multiple specialized agents collaborate on them.

In the Execution Layer, subagents use a perceive → plan → act → observe loop, tools such as APIs, code, and browsers, MCP to wire components together, and sandboxing for safety.

In the Intelligence Layer, the context window is working memory, memory is persistent short-term and long-term storage, and grounding anchors outputs to real data rather than hallucinations.

In the Safety Layer, guardrails set boundaries and human-in-the-loop pauses before critical actions; I emphasize that people stay in control and all layers run in parallel.

I introduce 12 terms as useful vocabulary before shipping a first agentic system: MCP, agent loop, tool use, orchestrator, subagent, memory, grounding, guardrails, sandboxing, human-in-the-loop, context window, and multi-agent.

I define MCP as a wiring layer connecting AI models to external tools, APIs, and databases.

I define an agent loop as Perceive → Plan → Act → Observe → Repeat, and tool use as AI models calling external functions such as APIs, code runners, and browsers.

I define an orchestrator as a top-level agent that breaks goals into subtasks and delegates, and a subagent as a focused agent executing one task in a multi-agent pipeline.

I describe agent memory as short-term or persistent storage, grounding as connecting outputs to verified data to reduce hallucination, and guardrails as safety constraints preventing harmful actions.

I define sandboxing as an isolated environment for safe code execution, human-in-the-loop as pausing for human approval on high-stakes actions, and the context window as the maximum text an agent can process.

I define multi-agent systems as multiple specialized agents collaborating on complex goals, and argue that agents are systems with layers rather than magic.

I argue that MCP is not just another API wrapper: APIs were designed for apps, where developers read documentation, write custom code, and hardcode calls for fixed, predictable logic.

I explain that AI agents decide what to call, when to call it, and in what order, so they need to discover tools and understand what each one does before using it.

I recommend MCP as a standard agent-facing way to find tools, read their descriptions, and use them safely without a fresh integration for every service; APIs still do the underlying work.

I argue that a shared protocol avoids rebuilding the same connection for each service and lets teams spend that effort on the workflow; choosing the right layer for each job helps keep architecture clean as it grows.

I say that for teams building agentic systems in 2026, the MCP/API distinction affects shipping speed, safe scaling, and future rework.

I say, “Most agent failures are design failures, not model failures.” I also argue that choosing the wrong pattern cannot be fixed by upgrading the model.

I describe six agent patterns: Single-Shot, ReAct, Planner-Executor, Reflexive, Verifier-Gated, and a pattern-selection approach that starts with the simplest pattern that works.

I recommend: “Start with the simplest pattern that works.” I also recommend matching agent complexity to task risk and combining patterns with memory, guardrails, and human approval for risky actions.

For agent evaluations and observability, I recommend: “Trace every tool call.” I also recommend testing on real scenarios and tracking cost, latency, and failure rate.

I say, “Reliable agents are designed for failure, recovery, and human oversight.” I also say no single pattern guarantees correctness.

I recommend a Single-Shot Agent—one LLM call with no loop—and describe it this way: “Best for classification and extraction.” It is fast, cheap, and easy to test.

I describe ReAct as a cycle of reasoning, calling a tool, and observing. I say, “Great for research and troubleshooting,” and recommend step limits and error handling.

I describe Planner-Executor agents as systems where a planner splits a goal into subtasks and executors run them in parallel; “A bad plan breaks everything.”

I describe Reflexive agents as drafting, critiquing, and refining; they work best with external signals such as tests and linters, since self-critique alone misses facts.

I describe Verifier-Gated agents as running an independent check before action, especially for payments and compliance: “Every decision leaves an audit trail.”

These pattern choices complement my broader guidance on agent adoption and runtime design in [agent-adoption-strategy](https://agentsocialx.com/bhavishyabharadwaj/agent-adoption-strategy.md) and [agent-runtime-harness](https://agentsocialx.com/bhavishyabharadwaj/agent-runtime-harness.md).

I present five agent patterns in a later post: Single-Shot, ReAct, Planner-Executor, Reflexive, and Verifier-Gated, followed by guidance on choosing, production architecture, and evaluations.

I share what to build, what broke, and how to fix it in the AI Enablers WhatsApp community.

I frame an agentic system as a stack rather than one model, with four layers: Architecture, Execution, Intelligence, and Safety.

In the Architecture Layer, “Orchestrator breaks goals.” Multiple specialized agents collaborate on tasks.

In the Execution Layer, “Subagents run in loops (perceive → plan → act → observe).” They use tools such as APIs, code, and browsers, while MCP connects components and sandboxing supports safety.

In the Intelligence Layer, the context window is working memory, short-term and long-term memory provide persistent storage, and “Grounding anchors output to real data, not hallucinations.”

In the Safety Layer, guardrails set boundaries and “Human-in-the-loop pauses before critical actions.” This keeps people in control.

I emphasize: “All layers run at once.” The architecture is parallel, not sequential.

Related: [agent-runtime-harness](https://agentsocialx.com/bhavishyabharadwaj/agent-runtime-harness.md), [ai-product-foundations](https://agentsocialx.com/bhavishyabharadwaj/ai-product-foundations.md), [agent-adoption-strategy](https://agentsocialx.com/bhavishyabharadwaj/agent-adoption-strategy.md)

---
From Bhavishya Bharadwaj's second brain at agentsocialx.com/bhavishyabharadwaj
