An agent is a loop with a contract, not a persona
Strip away the branding and an “AI agent architecture” is a small number of mechanical parts wired into a cycle: something that gathers what the model can see, something that lets the model decide, something that carries the decision into the world, and something that brings the consequence back before the model decides again. Anthropic’s documentation for the Claude Agent SDK states the loop in exactly these terms: the system “evaluates your prompt, calls tools to take action, receives the results, and repeats until the task is complete,” expanded into five concrete stages — receive the prompt, evaluate and respond, execute tools, repeat, and return a result [1]. None of that requires a model with a personality. It requires only that each stage hand something well-defined to the next one.
That contract is the actual unit of engineering. A more capable model dropped into a loop with no defined stopping point, no record of what has already been tried, and no gate before consequential actions is not a more capable agent — it is the same underspecified loop running faster. The rest of this briefing walks the loop stage by stage, using two documented production architectures, Anthropic’s Claude Agent SDK and OpenAI’s Agents SDK, plus two research papers that named the underlying mechanics before either SDK formalized them.
Plan becomes act: how a tool call actually happens
The step separating “the model has an idea” from “something happened” is a single, narrow exchange, and both major SDKs implement it the same way. The model does not execute anything itself; it emits a structured request, a tool name and its arguments, as part of its response. The harness intercepts that request, runs the corresponding function outside the model, and appends the result to the conversation before asking the model to continue. In the Claude Agent SDK this exchange is a “turn”: the model produces a request, “the SDK executes those tools, and the results feed back to Claude automatically,” and the cycle repeats until a response arrives with no further tool calls attached [1]. OpenAI’s Agents SDK documents the identical shape from its own side: “the Agents SDK runner performs the tool loop… and stops when the run finishes or pauses for approval” [2].
Neither company invented this pattern. Interleaving a reasoning step with an action and the observation it produces was named and tested in ReAct, which showed that letting a model alternate short “Thought,” “Action,” and “Observation” segments let it correct a reasoning error using something it had just perceived, rather than compounding an unsupported guess across an entire answer [5]. The SDK-level “turn” is that same three-part cycle with the bookkeeping made explicit and made reliable enough to run unattended for dozens of turns.
What actually persists between one step and the next
A tool result is only useful if the next planning step can see it, and here the two things people casually call “memory” turn out to be mechanically different. The first is the running transcript itself: the Claude Agent SDK is explicit that its context window “does not reset between turns,” accumulates every prior prompt, tool input, and tool output, and, once it nears its limit, is automatically compacted by summarizing older exchanges while keeping the most recent turns intact [1]. That transcript is not a faithful record of the task’s true state; it is a running, lossy estimate the agent updates as each new observation arrives, in essentially the structure that decision theory gives an actor working under partial observation, where a belief about the true state is revised with each new piece of evidence rather than read off directly [7].
The second kind of memory is kept deliberately separate from that transcript. Reflexion keeps a distinct episodic buffer holding the agent’s own verbal self-critique after a failed attempt, a sentence or two on what went wrong, and carries only that forward into the next attempt rather than fine-tuning any weights or replaying the whole failed transcript [6]. Anthropic’s published multi-agent research system uses the same move for a related reason: before delegating work, its lead agent writes its plan to external memory specifically because the working transcript can be truncated, so the plan survives a compaction event that the raw conversation history would not [4, 1].
One agent becomes several
Long or wide tasks are routinely split rather than run inside one ballooning transcript. Anthropic’s research system uses what it calls an orchestrator-worker pattern: a lead agent plans and delegates to subagents that run in parallel, each starting from a clean context rather than inheriting the parent’s full history, and each returning a condensed finding rather than its entire working transcript back to the coordinator [4]. The Claude Agent SDK implements the identical constraint mechanically: a subagent “does not see the parent’s turns, and only its final response returns to the parent as a tool result,” which is precisely what keeps the coordinator’s own context from growing by the full size of every subtask it delegates [1]. Multi-agent coordination, in other words, is a context-isolation rule before it is anything resembling delegation between personalities.
Where a human has to sign off
A checkpoint fits at exactly one point in the cycle: after the model has proposed a tool call and before the harness has executed it. Both SDKs implement a pause at that specific seam rather than at some other point in the loop. The Claude Agent SDK’s permission modes route a proposed call through a callback that must return an explicit approval before execution proceeds, and a separate hook can inspect or block the same call even earlier, running in the application’s own process rather than inside the model’s context [1]. OpenAI’s Agents SDK marks individual tools as requiring approval; when one of them fires, the run halts, surfaces the pending call as an interruption a reviewer can approve or reject, and the paused state itself can be serialized to storage and resumed later from that exact point rather than replayed from the start [3].
That serialization detail matters mechanically more than it looks: a human-approval gate that cannot survive being left closed for an hour is not really a gate, because anything else in the loop’s budget would have run out waiting on it anyway.
Long-horizon control is a stopping rule, not a virtue
The property separating a bounded agent from a runaway one is not caution located somewhere in the model; it is an explicit limit located somewhere in the harness. The Claude Agent SDK caps a run by number of turns, by a dollar budget, or by both, and a subagent’s spend counts against its parent’s total rather than running on some separate allowance of its own [1]. Reflexion’s retry loop is bounded the same way in miniature: a fixed number of attempts, each one seeded with the prior attempt’s self-critique, not an open-ended search for improvement that stops only when it happens to succeed [6]. In every documented case examined here, the loop that keeps going too long is the loop with an undefined stopping condition, not simply a loop that was given more turns to work with. Observe, plan, act, and reflect describe what happens inside a single pass through the cycle; what makes an architecture safe to leave running unattended lives entirely in the parts wrapped around that pass — the budget, the approval gate, and the record of what has already been tried.