Writing
Agents Need a Runtime, Not a Prompt Loop
An agent is no longer well described as a prompt inside a while loop. The useful abstraction owns execution around the model.
Writing
An agent is no longer well described as a prompt inside a while loop. The useful abstraction owns execution around the model.
Notes
Last June, I wrote that the model was starting to behave less like a text generator and more like a control layer. Tool calling, code execution and structured outputs were turning inference into a loop: inspect state, choose an operation, execute it, observe the result, continue.
That loop is now becoming a software layer of its own.
OpenAI's March 11 release makes the shift unusually visible. The new Responses API combines model calls with built-in web search, file search and computer use. The Agents SDK adds handoffs, guardrails and tracing around single-agent and multi-agent workflows. OpenAI describes the problem directly: teams were spending large amounts of effort on prompt iteration and custom orchestration without enough visibility into what the agent was doing.
My takeaway is that an agent is no longer well described as a prompt inside a while(tool_call) loop. The useful abstraction is moving toward a runtime, or at least an agent harness, that owns execution around the model.
The first version of an agent is easy to build: send the model a prompt, execute any requested tool, append the result and call the model again. It is the same basic function-calling loop many of us have been using since 2023.
The problems start when the task lasts longer than a few turns.
The system has to know which tool calls succeeded and which failed while returning plausible text, which intermediate results should stay in context, how much of the job is already done, whether a retry is permitted, when a specialist agent should take over, and how to inspect a run that failed yesterday when the same prompt works today.
None of that is solved by making the system prompt longer.
They belong to execution infrastructure.
OpenAI's Responses API is interesting for this reason. It is designed around multiple model turns and built-in tools rather than treating every request as one isolated completion. The API can combine web search, file search, computer use and developer-defined functions inside the same interaction. That moves some orchestration responsibility out of ad hoc application code and into a more explicit agent primitive.
I use "runtime" carefully here. The model itself is still not an operating system, and the SDK does not magically make an autonomous worker reliable.
The useful comparison is about responsibilities.
A runtime coordinates execution. It decides how operations are invoked, carries state between steps, exposes errors, applies boundaries and gives developers a way to inspect what happened.
The new Agents SDK is built around those concerns. OpenAI lists four core pieces: agents with instructions and tools, handoffs between agents, guardrails for input and output checks, and tracing for inspecting execution.
That is a different object from a prompt template. A prompt describes behaviour. A runtime has to manage behaviour after the model begins interacting with the world.
Anthropic reached a similar conclusion from another direction in its December guidance on agents. It separates predefined workflows from agents that dynamically choose tools and actions, while recommending simple, composable patterns over unnecessary framework complexity.
Once an agent can take several actions, observability becomes part of development.
With ordinary software, I would not debug a production pipeline by looking only at the final error message. I want logs, state transitions, timings and the inputs and outputs around the failing step.
Agents need the same treatment.
OpenAI is shipping tracing and observability as part of the Agents SDK rather than leaving it as an external add-on. That choice says something about the maturity of the problem. If an agent hands work to another agent, calls several tools and returns an incorrect result, developers need to reconstruct the execution path.
This is especially relevant because model behaviour is probabilistic. A conventional function usually fails in reproducible ways. An agent may choose a different route on the next run.
The trace becomes the equivalent of a production timeline: which model ran, what it saw, what tool it selected, what the tool returned, when control moved elsewhere and where the final state diverged from expectation.
Without that, prompt tuning turns into guesswork.
The second runtime responsibility is control.
Giving an agent more tools does not automatically make it more useful. It increases the action surface that has to be constrained.
The Agents SDK's guardrails are an early version of that boundary. A production system still needs deterministic checks outside the model: schema validation, permission checks, confirmation before destructive actions and verification after operations that change external state.
I would design a Blender or game-production agent the same way.
The model might decide that an asset needs to be re-exported. It should not invent the export path or silently overwrite the approved file. A tool can expose a typed operation with allowed presets and destination rules. After execution, another check can confirm that the expected artifact exists and matches the project constraints.
For a render pipeline, the agent can decide what needs investigation. The runtime should know which job IDs exist, which outputs were produced and whether a retry is safe.
For development work, the model can propose or apply a code change. The surrounding system should run tests, preserve the diff and keep enough execution history to explain what changed.
Models are good at interpreting intent and choosing among possibilities. Software remains better at enforcing invariants.
Handoffs are another signal that the abstraction is moving beyond one prompt loop.
OpenAI's SDK lets one agent transfer control to another. A triage agent can route a task to a specialist with different instructions and tools. The code example in the launch post is simple, but the architecture raises familiar distributed-system questions.
State has to cross the handoff in a defined shape, ownership of the task has to move with it, control may or may not be allowed to return, each role needs its own tool set, and the final result still has to be attributed and evaluated.
Not every application needs multiple agents; many will be easier to reason about with one model and a small tool set. But once specialisation becomes useful, orchestration stops being an implementation detail and becomes part of product behaviour.
For founders and developers, I would now separate three layers when designing an agentic product.
The model handles interpretation and decisions that benefit from learned reasoning. Tools expose controlled capabilities. The runtime manages state, execution, tracing, retries, handoffs and validation around them.
Keeping those layers separate makes model changes less disruptive. A better model can replace the reasoning component without forcing the application to redesign its permissions or execution logs. A new tool can be added without rewriting the entire prompt architecture. Evaluation can target the full run instead of one final message.
This resembles production pipelines I already trust in 3D and software work. Blender is not the asset pipeline. A renderer is not the render farm. A compiler is not the build system. Each powerful component sits inside infrastructure that manages inputs, execution state, errors and outputs.
Agents are heading toward the same separation.
I think the next phase of agent development will be less about discovering one perfect prompt pattern and more about building better execution environments around models.
The model will remain the flexible part of the system. The surrounding runtime will become the place where reliability is engineered.
That runtime will probably stay fragmented for a while. Some teams will use vendor SDKs; others will build narrow internal loops. I expect the useful abstractions to converge around state, tools, permissions, handoffs, traces, evaluation and recovery.
The important change is conceptual.
An agent is not a chatbot that happens to call functions.
It is a program whose control flow is partly decided at inference time. Once that is true, it needs the same thing every non-trivial program eventually needs: a runtime around the part doing the execution.
More