How to Choose an Agent Runtime: Packaged, Semi-Open, and Composable Architectures
An agent runtime is the software layer that wraps a large language model—handling tool calls, session state, sandboxing, and scheduling. This article breaks the runtime into nine evaluation modules, compares three architectural forms (packaged, semi-open, and composable), and offers a practical evaluation method, an interface design example, common pitfalls, and a rollout plan to help teams pick the right agent runtime for their needs.
1. Beyond the Model: The Runtime Layer
A large language model handles understanding and generation, but by itself it cannot read files, execute commands, remember progress from a previous task, or run a check automatically at 2 a.m. To make a model actually do work, you need a software system that wraps around it: the agent runtime. The runtime orchestrates model calls, dispatches tool calls, maintains session state, isolates execution, and decides when tasks start.
Understanding this layer matters because it determines what an agent can do, how it can be modified, and where data and execution permissions live.
2. A Computer Analogy for the Layers
Think of an agent as a desktop computer. The model is the software running on the machine—it determines what the system can “figure out.” The runtime is the machine itself: the processor, motherboard, operating system, and peripherals. It determines what the system can do, where, and to what extent. Swapping the software does not change which peripherals the machine can connect to.
This analogy separates two things: reasoning capability and execution capability. No matter how strong the model is, if the runtime has no file access, it cannot modify code. Conversely, no matter how complete the runtime is, if the model’s reasoning is weak, the task still fails. Evaluate the two parts separately.
3. Nine Modules to Evaluate
When assessing a runtime, check these nine modules one by one:
- Model: How models are plugged in and swapped—whether standard chat-completion API formats are supported, and whether custom model endpoints and inference parameters are allowed.
- Tools: The scope of built-in tools, and how external capabilities can be added through standardized tool-connection protocols.
- Skills: Reusable instruction and workflow templates—whether they can be customized, and whether sub-agents can be spawned to handle subtasks.
- Session: How messages and state are stored. Append-only logs are easy to replay and fork, which improves post-mortem analysis.
- Sandbox: The isolated environment for executing code and commands, including network access, filesystem scope, and resource limits.
- Storage: Where project materials, long-term memory, and retrieval indexes live, and in what format.
- Loop: The main loop logic in which the model reasons, calls tools, observes results, and continues.
- Scheduling: The ability to trigger tasks on a time-based or periodic schedule without human supervision.
- Interface: The presentation layer—command line, web UI, or editor integration.
The value of these nine items is that they turn “is this agent good?” into a set of verifiable questions, instead of relying on demo impressions.
4. Three Architectural Forms and Their Trade-offs
Based on how replaceable each module is, runtimes generally fall into three categories.
Packaged: Delivered as a whole—the kernel, loop, sandbox, and interface are all defined by the provider. Advantages: works out of the box, low maintenance cost, and clear security boundaries. Disadvantages: the model and execution environment are hard to replace, and customization is limited. Best for teams that want to get productive quickly and need standardized workflows.
Semi-open: The model and tools are replaceable, and skills and scheduling are user-configurable, but the loop, sandbox, or storage remain provider-controlled. This strikes a balance between convenience and flexibility, suiting teams with clear automation needs that don’t want to maintain the underlying implementation themselves.
Composable: Every module is a plugin—users can replace the sandbox, storage, loop, and even the interface. This offers maximum freedom, but responsibility for integration, security auditing, and operations shifts to the user. Best for organizations with platform engineering capacity, deep customization needs, or special compliance requirements.
Each form fits different scenarios. The choice should be driven mainly by the team’s available engineering effort, compliance requirements, and how fast requirements change.
5. Evaluation Method
Use a comparison table to record each candidate’s status across the nine modules, tagging each with one of three labels: replaceable, configurable, or fixed.
| Module | Evaluation Question | How to Record |
|---|---|---|
| Model | Can it switch to a custom model service? | Replaceable / Fixed |
| Tools | Can external tools be connected? | Built-in / Extensible |
| Sandbox | Can network and file access scope be controlled? | Fixed / Configurable |
| Scheduling | Can it run unattended on a schedule? | Yes / No |
Base your answers on the official documentation and hands-on testing. For security-sensitive scenarios, also examine the sandbox’s isolation boundaries, the granularity of permission controls, and log retention policies.
6. Interface Design Example
If you build your own composable architecture, the key is defining a stable interface for each module so implementations can be swapped. The simplified example below shows how the loop depends only on interfaces, not on concrete implementations:
from typing import Protocolclass ChatModel(Protocol):def complete(self, messages: list[dict], tools: list[dict] | None = None) -> dict:...class Sandbox(Protocol):def run(self, command: str, timeout_s: int) -> str:...def run_turn(model: ChatModel, sandbox: Sandbox, messages: list[dict]) -> list[dict]:reply = model.complete(messages)messages.append(reply)for call in reply.get("tool_calls", []):output = sandbox.run(call["arguments"]["command"], timeout_s=30)messages.append({"role": "tool", "content": output})return messages
Three points stand out in this code. First, the loop depends only on interfaces—swapping the model just requires an adapter that conforms to the interface. Second, all command execution must go through the sandbox with a timeout, preventing runaway processes from holding resources indefinitely. Third, the session is stored as a list, making it easy to write to an append-only log later. A production system also needs to validate tool arguments, restrict the range of executable commands, and truncate outputs so oversized content doesn’t blow up the context window.
7. Common Pitfalls in Practice
Equating model capability with agent capability. Tasks that look great in a demo can fail in a real project due to insufficient permissions, inconsistent data formats, or environment differences. Evaluate with real tasks.
Neglecting session records. Append-only session logs support retrospectives—when something goes wrong, you can pinpoint which step’s reasoning went off track. Systems without records are hard to improve continuously.
Chasing full freedom too early. The maintenance cost of a composable architecture is often underestimated. If the team lacks the capacity to keep up with security patches and interface changes, a packaged or semi-open solution is usually the safer choice.
Enabling scheduling too quickly. An unattended scheduled task with overly broad permissions will repeat its mistakes. Run in read-only mode first, and only open write permissions after results prove stable.
8. Rollout Recommendations
Teams can proceed in the following order:
- Define task types and risk levels, distinguishing read-only tasks from tasks that modify data.
- Evaluate candidates against the nine-module checklist, recording the degree of replaceability.
- Run small-scale trials with real tasks in an isolated environment, collecting success rates and failure causes.
- Adjust permissions, skills, and scheduling policies based on session logs, then gradually expand the scope of use.
The goal of the whole process is to let the choice of runtime follow business needs—rather than letting demo impressions drive the decision.
