← Back to Insights

AI Engineering

The Architecture of Agentic AI Systems

A primer on reasoning loops, memory, multi-agent topologies and protocols, plus the risks to plan for in production.

By Dzung Tran  ·  Published October 29, 2026

A visual primer on how agentic AI systems work: the reasoning loop, agent memory, multi-agent topologies, the protocol stack that connects applications, agents, and tools, and the risks to design for in production.

Prefer to read offline? Download the PDF.

The Architecture of Agentic AI Systems. A primer on reasoning loops, memory, multi-agent topologies and protocols, plus the risks to plan for in production. Dzung Tran, Founder, ZeroHarmAI, LLC.

Why AI Agents: From Software to Autonomy

Comparison of traditional software (input, logic, output; deterministic, no autonomy), LLM applications (prompt to response; probabilistic, no memory between calls, limited autonomy), and AI agents (reason, plan, choose tool, execute, observe, reflect, repeating until the goal is met; goal-driven, dynamic tool orchestration, high autonomy).

How an Agent Works: The Reasoning Loop

The agent reasoning loop: Goal, Reason, Plan, Choose tool, Execute, Observe and check, Reflect, Done? If the goal is not met, the agent loops back and reasons again.

How an Agent Works: Agent Memory

Agent memory from volatile to durable: short-term memory in the context window, working memory as an in-process scratchpad, long-term memory in vector databases and knowledge stores, and external systems of record such as files, SQL databases, CRMs, and calendars accessed via tools like MCP.

Scaling Topologies: The Orchestrator

Orchestrator-worker topology: a top-level orchestrator agent breaks down the goal and delegates to specialist agents 1 through n. The most common pattern.

Scaling Topologies: Agent Mesh

Agent mesh topology: five agents discover and call each other directly, with no fixed hierarchy. Emerging and less common.

The Agent Protocol Stack: Apps, Agents & Tools

Three-layer agent protocol stack. Layer 3, application to agent, over REST, WebSocket, or gRPC. Layer 2, agent to agent, over the A2A protocol, where Agent Cards advertise capabilities. Layer 1, agent to tool, over MCP, the Model Context Protocol, using JSON-RPC.

System in Practice: Personal Assistant AI

Example personal assistant system: the user talks to an application UI, which calls a personal assistant agent running a reasoning loop. Through an MCP protocol layer it uses Gmail, Calendar, and text message MCP servers for tasks such as turning flight confirmations into calendar events and texting the daily schedule.

Production Reality: Risks to Design For

Production risks: trust boundaries, infinite loops, context fragmentation, accountability, and hallucination and security. Key takeaways: one agent, one job; MCP standardizes tool access and A2A standardizes collaboration; production-ready agents validate every input, output, and handoff.

Building or securing AI agents?

Zero Harm AI designs and builds production AI agents, and the AI security that keeps them safe.

Talk to Zero Harm AI