From Model to Agent: Understanding the Evolution of AI Agent Architecture
This article explains why the definition of an AI agent remains debated, traces the shift from "the foundation model is the agent" to a layered consensus, and lays out a practical five-layer reference architecture covering the model, context, tool, state, and governance layers. It also offers three criteria for deciding when a system should not be called an agent, four engineering details that determine whether an agent works in production, and recommendations for teams building reusable agent infrastructure.
1. Why the Debate Persists: Three Sources of Ambiguity
The long-running argument over “what an agent actually is” is not caused by a shortage of terminology. It is caused by the same term being used at three different levels.
The first level is capability. When a model can break down a goal on its own, choose a path, call external capabilities, and revise its output based on feedback, people tend to call it an agent. The second level is the product. A system that presents itself as a conversational entry point but is actually driven by a fixed workflow is also commonly called an agent. The third level is research. In evaluation benchmarks, trajectory datasets, and reinforcement learning environments, an “agent” refers to an executable unit that can be scored and replayed. Mixing the three levels makes the discussion hard to converge.
The blurring of boundaries makes things harder. Once a foundation model has been trained on tool-call trajectory data, ask it for today’s date and weather and it will decide on its own whether to read local information or retrieve external data, then organize an answer. Is it a model or an agent at that point? From an engineering perspective, this behavior already shows the beginnings of a “perceive-decide-act” loop. From an architecture perspective, however, the loop is not carried by the model weights themselves but by a whole set of mechanisms around the model. That is the crux of the debate: we conflate “intelligence that is displayed” with “the structure that carries intelligence.”
2. How the View Evolved: From Model-as-Agent to a Layered Consensus
Early discussions held a simple view: a sufficiently capable model is itself an agent, or “the foundation model is the agent.” This holds up reasonably well for single-turn, closed, offline question answering, because such tasks need no external state and no long-range memory.
As task chains grow longer, the problems surface. The model needs stable context organization, rollback-able execution state, retry and compensation after failures, permission boundaries, and audit records. This led to the phrasing “model plus runtime,” which emphasizes that surrounding components release the model’s capability and extend the application boundary. Note that “runtime” here is not the same concept as a traditional operating system: it does not handle hardware abstraction or process scheduling, but context assembly, tool integration, state persistence, and lifecycle management.
The discussion later converged on the engineering paradigm of “model plus hosting framework”: treat an agent as a model plus a pluggable hosting structure, where the model handles reasoning and decisions and the hosting structure turns decisions reliably into verifiable results. The two phrasings do not conflict. The former answers “what is missing,” the latter answers “how it is assembled.” The real consensus is that the quality of the foundation model sets the ceiling, while the maturity of the surrounding structure sets the floor and the variance.
3. Capability Layers: A Reference Architecture You Can Build On
To keep the concepts from spinning in place, split an agent system into five layers, each with clear inputs, outputs, and failure modes.
- Model layer: responsible for understanding, planning, generation, and selection. Input is context; output is a structured decision.
- Context layer: responsible for retrieval, trimming, compression, and ranking. It determines what the model “sees.”
- Tool layer: responsible for capability integration, including reading and writing storage, calling APIs, executing computation, and operating container platform tasks.
- State layer: responsible for sessions, tasks, checkpoints, and rollback points. It determines whether the system can run over long horizons.
- Governance layer: responsible for permissions, auditing, rate limiting, cost, and evaluation. It determines whether the system can be trusted.
A schematic decision structure can be expressed as follows; the point is the separation of decision from execution:
{"goal": "Summarize this week's service error rate changes and recommend actions","plan": ["pull monitoring metrics", "locate anomalous windows", "search change records", "produce conclusions"],"tool_calls": [{"name": "query_metrics", "args": {"window": "7d"}},{"name": "search_logs", "args": {"level": "error"}}],"state": {"checkpoint": "after_metrics", "retry": 0},"constraints": {"readonly": true, "max_steps": 12}}
The benefit of this structure is that the model only produces intent, while the governance layer decides whether execution is allowed; any failed step can resume from a checkpoint instead of restarting the whole run.
4. Drawing the Boundary: When Not to Call It an Agent
Three actionable criteria help a team align on terminology.
First, is there a dependency on external state? If the answer can be produced entirely from parameterized knowledge, it is model capability. If it must read the current state of an external system, it is at least a “model plus tools” combination. Second, is there multi-step decision making and self-correction? If the flow is fixed and the branches are enumerated in advance by people, it is orchestration. Only when the model produces branches at runtime based on feedback does it show agent characteristics. Third, does it bear consequences? Read-only question answering and execution that can write to production carry completely different risk levels; the latter must have permission isolation and auditing.
By these criteria, the earlier behavior of “reading local information to answer date and weather questions” is more accurately described as “a model service with tool-calling capability.” It enters agent territory only when it must span multiple systems and change its subsequent plan based on intermediate results. The value of a definition lies not in arguing over nouns but in keeping permissions, evaluation, and cost consistent.
5. Engineering Practice: Four Details That Decide Success
First, manage the context budget explicitly. Treat context as a finite resource: set limits on the number of retrieved items, summarization levels, and eviction policies so that key information is not diluted in long conversations. A “summary plus pointer to the original” approach works well, letting the model read the summary first and fetch fragments on demand.
Second, keep tool contracts small and stable. Tool descriptions should state the applicable scenarios, parameter constraints, and failure semantics, and return structures should stay uniform, for example a consistent status code, data body, and traceable identifier, so the model can correct itself.
def call_tool(name, args, ctx):result = registry[name].invoke(args)return {"ok": result.ok, "data": result.data,"error": None if result.ok else result.reason,"trace": ctx.trace_id}
Third, design state and rollback up front. Long tasks should set checkpoints, write operations should follow “plan first, then confirm,” and high-risk actions should include a human confirmation step.
Fourth, evaluate trajectories, not just final answers. Beyond final answer accuracy, track step count, tool failure rate, repeated call rate, and cost, and use trajectory replay to determine whether a problem lies in context, tools, or planning. For observability, record an input summary, tool calls, and elapsed time for each decision, and close the loop with logging services and monitoring alerts.
6. Trends and Recommendations for Teams
Three trends are fairly clear. First, capabilities are moving down into the model: more tool use and planning ability is absorbed into foundation models, and the focus of the surrounding structure shifts toward governance and verification. Second, runtimes are being standardized: interfaces and state formats are converging, lowering migration costs. Third, evaluation is moving earlier: task environments, trajectory data, and replay mechanisms are becoming part of the infrastructure. On general capabilities such as container platforms, object storage, and log monitoring offered by cloud platforms like Baidu AI Cloud, teams can build reusable agent infrastructure faster.
For teams getting started, the recommendation is to first get a closed loop running with fixed orchestration, then gradually loosen the model’s decision freedom; read-only before write, internal before external; and build permissions, auditing, and evaluation alongside features rather than filling them in afterward. In the end, the model determines what an agent can think of, and the surrounding structure determines what it can reliably get done. Missing either one, and the discussion stays at the level of concepts.
