From Models to Agents: Technical Boundaries and Practice of the Runtime Framework
This article distinguishes models, agents, and runtime frameworks, then explains why agent competition is shifting toward reliable execution. It covers constrained execution loops, explicit state, completion criteria, budgets, context management, tool-call safety, what remains valuable as models improve, general versus vertical agents, multi-agent coordination, infrastructure, and measurable evaluation and rollout.
1. Discussing agents starts by separating three layers
When a system can understand a task, call tools, modify files, and keep work moving, it is easy to credit every capability to the model. From an engineering perspective, at least three layers need to be distinguished: the model, the agent, and the runtime framework.
The model generates output from input. It provides understanding, reasoning, planning, and content generation. It can propose actions and produce structured tool-call requests, but it usually does not hold direct execution rights in business systems.
The agent is a task-execution system organized around a goal. It turns model output into action, reads the result, and then decides whether to continue, revise the plan, ask for help, or end the task.
The runtime framework makes that process happen reliably. It typically handles context assembly, tool registration, call scheduling, state persistence, permission control, failure recovery, and runtime observation. In agent engineering, “harness” is often used for this layer, but implementations do not share a single boundary. It should not be treated as a fully standardized architecture name.
The relationship can be summarized as follows:
The model supplies decision-making ability, the agent carries the task goal, and the runtime framework manages the execution path between decisions and actions.
Discussing the runtime framework is therefore not about writing a longer prompt, or about how many tools are connected to the model. It is about placing probabilistic model behavior inside an execution system that can be controlled and verified.
2. Why agent competition is moving toward the runtime framework
Early agent demos usually focus on “what can be completed”: generating a page, organizing a set of materials, or running one data analysis. Once systems enter real use, the question becomes “under what conditions can this be completed reliably.”
There is a clear gap between those questions. A successful demo may use clean input, a precise goal, and a smooth environment. Real tasks often have different traits:
- Requirements are incomplete and may change during execution.
- Tool results may be empty, timed out, or contradictory.
- The task spans multiple systems with different permission boundaries.
- Intermediate artifacts must be saved; a failure should not force the entire task to be redone.
- Users want more than a result. They also want evidence, process, and a clear boundary of responsibility.
The value of a runtime framework appears inside these constraints.
For example, a model proposing “resubmit the order” does not mean the system should do so immediately. If the earlier submit already succeeded and only the response was lost, a direct retry may create a duplicate order. What is needed is a business-state query, idempotency control, and an execution record—not another round of model reasoning.
Shifts in agent popularity across different forms can be read, from a general technical angle, as a change in demand: from one-shot generation to continued execution, and from showing capability to managing execution risk. This is an analytical view. It should not be taken as proof of why any specific product became popular.
3. The core of the runtime framework: a constrained execution loop
The most basic agent loop can be described as:
- Receive the user goal and execution constraints.
- Read the current task state.
- Assemble the context the model needs.
- Generate the next action.
- Check whether the action is allowed.
- Execute the tool and record the result.
- Decide whether the goal has been met.
- Continue, pause and wait, or stop.
The loop looks simple, but in production the critical work sits between the steps.
3.1 Task state must be managed explicitly
The full conversation history cannot be the only source of state. As a task grows, history may be trimmed, compressed, or reorganized, while business facts must stay stable.
At least three kinds of state should be separated:
- Task state: goal, stage, to-dos, and completion conditions.
- Execution state: call records, retry counts, budget consumption, and error information.
- Business state: records already created, operations already submitted, and confirmations from external systems.
These states should be linked, but they should not be mixed into one blob. A model’s belief that “the operation is done” cannot replace a real confirmation from the external system.
3.2 Completion cannot depend only on the model’s own statement
“I have finished the task” is model output, not acceptance evidence.
For a code-change task, completion may require that specified files were updated, automated checks passed, and the change stayed within the allowed scope. For a data-cleanup task, completion may require consistent record counts, required fields present, and exceptions marked separately.
The model can help judge semantic completeness, but conditions that can be checked programmatically should be checked by deterministic logic first.
3.3 Budget is also an execution constraint
A task system needs limits on time, call count, cost, or resource use. When the budget is insufficient, the system should explicitly deliver a partial result, request more budget, or stop—not loop forever.
Budget control is not only about saving resources. It also stops a bad action from amplifying itself inside the loop.
4. Context management: not more information, but the right information
One of the most common failures in long tasks is that the model misses a key constraint in a complex history, or treats old information as the current fact.
Effective context management should separate information by use:
- Stable system rules and safety constraints
- The current user goal
- Confirmed business facts
- The latest execution result
- Reference material directly relevant to the next action
- Speculation that still needs verification
Facts and speculation especially need to stay apart. A stage summary generated by the model may contain errors. If it is written into long-term memory without review, later decisions will keep citing that error.
For longer tasks, a layered approach can work: keep the full execution record, generate stage summaries, and retrieve only what the current decision needs. A summary cannot replace key evidence. Amounts, permissions, and submission status should be confirmed against the authoritative source.
Long-term memory also needs update, expiry, and deletion. More memory is not automatically better. Stale preferences, revoked permissions, and outdated business rules can all reduce execution accuracy.
5. Tool calls: extending capability must come with safety boundaries
Tools move an agent from “answering questions” to “changing the outside world,” and they make errors produce real consequences.
5.1 Tool interfaces should be clear and checkable
A tool should define its input structure, return structure, error types, and side effects. The execution layer should check required fields, data types, value ranges, and access rights.
High-risk actions cannot be allowed based only on a natural-language description. “Clean up unused records,” for example, must be turned into an explicit data scope, filter conditions, and approval rules.
5.2 Reads and writes should be graded
Looking up information and deleting data do not carry the same risk, so they should not share the same authorization policy.
A common approach is to separate operations into:
- Low-risk reads that can run automatically
- Modifications limited to a defined scope
- High-impact writes that require human confirmation
- Operations that are explicitly forbidden
Grading should follow business impact, not only the tool name. The same update interface may need entirely different approval flows for test data and for core production records.
5.3 External content must not automatically become a system instruction
Web pages, documents, messages, and tool return values may contain text that tries to steer the system. The system should treat them as data to be processed, not as something allowed to change permission rules or override the user’s goal.
Protection cannot rely only on a sentence such as “ignore malicious instructions.” Least privilege, call validation, execution isolation, and approval for sensitive operations are needed to limit the damage a misled model can cause.
5.4 Retries must account for side effects
Limited retries are usually easier for reads. For writes, the system should first determine whether the operation already succeeded. Where an idempotent mechanism exists, it should be implemented with the business interface. Where idempotency cannot be guaranteed, queries, reconciliation, or human confirmation should prevent duplicate execution.
6. If models get stronger, does the runtime framework lose its value?
As model capability improves, some complex prompts, heuristic routing, and hand-written planning logic may become unnecessary. That means certain implementation details inside the framework can be simplified. It does not mean the execution system can disappear.
Capabilities in a runtime framework fall into two groups.
The first is logic that compensates for weak model ability, such as overly fine step splitting or patch rules aimed at a particular output habit. This logic should be reassessed as models improve. Otherwise it raises maintenance cost and can even limit the model.
The second is logic imposed by external system constraints, such as permission checks, audit records, transaction consistency, resource quotas, and human approval. These do not become unnecessary because the model is smarter.
A practical principle is:
Give the model the parts that require semantic understanding, and put constraints that must hold reliably into programs and operating rules.
There is also a sound technical reason to develop models and agent applications together. Real tasks expose weaknesses in tool use, long-running execution, and error recovery, and application feedback can improve evaluation and training. Feedback quality depends on data governance. Not every user action is a valid training signal.
7. General and vertical agents: the difference is the business loop
General agents are good at open goals and adapting across tasks. Vertical agents are built around a specific domain, with clearer inputs, processes, and acceptance standards.
They do not have to be treated as full substitutes.
General capability can be a shared execution base, while a vertical application supplies domain knowledge, dedicated tools, business rules, and a system of responsibility. In contract handling, understanding text is only the start. Clause classification, version tracking, approval flow, and review of conclusions are also required.
The real barrier of a vertical system is usually not an industry prompt. It is a combination of:
- Understanding of business data structures and exception cases
- Tool interfaces that match the actual process
- Measurable acceptance criteria
- Handling of permissions, compliance, and responsibility boundaries
- A continuing set of high-quality evaluation samples
If a vertical application only adds a simple interface around a general model, its differentiation is easy to shrink. If it closes a complete business loop, stronger models alone are not enough to decide that its value has disappeared.
8. Multi-agent collaboration: prove the need before adding roles
A multi-agent system can split planning, execution, and review, and it can let different units handle relatively independent subtasks in parallel. More roles do not automatically mean higher quality.
Collaboration adds cost: task assignment, information sync, conflict resolution, result aggregation, and extra calls. When several agents use similar information and the same judgment path, they may repeat the same mistake instead of checking one another.
Multi-agent designs are usually appropriate when:
- Subtasks can run in parallel with relative independence
- Different tasks need different permissions or tools
- High-risk results need an independent review
- One execution unit cannot manage the full context effectively
Each role should have a defined input, output, tool scope, and completion standard. Shared business state needs clear update rules so multiple units do not modify the same resource at once.
Infinite delegation should be avoided: one role keeps handing work to another without a clear owner or exit condition. A multi-agent architecture is first a coordination design, and only then a decision about how many roles to create.
9. Infrastructure value: make execution traceable, recoverable, and operable
Agent infrastructure should not only connect tools. It should support the full execution lifecycle.
Responsibilities can be split as:
- State storage: task progress and intermediate artifacts
- Scheduling: concurrency, waiting, and timeouts
- Execution environment: isolation of tasks and their resources
- Permission system: identity and allowed actions
- Logs and tracing: links among model decisions, tool calls, and business results
- Evaluation: comparison of models, prompting strategies, and execution flows
- Human intervention: approvals, exceptions, and cases that cannot be judged automatically
These duties can be assembled from general infrastructure such as object storage, databases, message queues, container platforms, logging, and monitoring and alerting. They do not all need to be rebuilt from scratch.
Developers should be careful about the limits of a “unified abstraction.” Tools can differ completely in transaction semantics, error behavior, and permission rules. Over-unifying them hides important differences. The value of infrastructure is not wrapping every call so it looks the same. It is preserving necessary differences while reducing repeated engineering cost.
10. Evaluation and rollout: turn reliability into a measurable target
Agent evaluation cannot stop at whether the final answer reads smoothly. It also has to check whether the execution process was correct.
Metrics can be built on four dimensions:
- Task outcome: whether acceptance conditions were met, and whether rework was required
- Execution efficiency: completion time, call volume, repeated steps, and resource use
- Safety and compliance: unauthorized actions, exposure of sensitive data, and bypassed approvals
- Recovery: whether the system can continue correctly after a tool timeout, missing input, or interruption
The evaluation set should include normal samples and failure cases, such as empty tool results, conflicting data, a user changing the requirement mid-task, and a lost write response. Evaluating only the smooth path makes it easy to overestimate the system.
Production rollout can be gradual:
- Start with read-only operation to verify understanding and retrieval.
- Then let the system propose actions and execute them only after human confirmation.
- Next, open low-risk, reversible automatic operations.
- Finally, widen autonomy according to evaluation results.
Topics such as identity verification, service admission, or public code release should be analyzed separately for security, privacy, maintenance, and intellectual-property risk. Do not infer a specific party’s motives without factual basis. For a technical system, more useful questions are: how identity data is collected with the minimum necessary scope, whether sensitive configuration is separated from code, whether exposed credentials can be revoked quickly, and whether audit records support accountability.
Conclusion: the runtime framework decides whether capability becomes a reliable service
Model capability sets the range of problems an agent can attempt. The runtime framework affects whether those attempts can be completed stably under real constraints.
The engineering worth investing in is not making a system look more autonomous. It is making every action have a clear goal, a permission boundary, execution evidence, and a way out when it fails. Developers can start with one verifiable business task, build a minimal execution loop, and then add state management, tool safety, evaluation, and collaboration as needed.
As agents move from demos to long-running operation, the core question changes. It is no longer only “can it do this,” but “did it do it correctly, can it recover when something goes wrong, and how do we prove that.”
