Agent Runtime Frameworks Explained: An Everything-as-a-Plugin Architecture
This article breaks down the everything-as-a-plugin architecture used in modern agent runtime frameworks. It explains the Model + Harness = Agent formula, the responsibilities of the meta-framework, the service and event layer, and capability plugins. It also covers four execution modes, reversible side effects for safe rollback, and key engineering practices such as dependency governance, observability, least privilege, and evaluation loops.
1. The Gap Between a Strong Model and a Completed Task
Large language models can reason and generate, but completing an end-to-end task in a real business environment requires an additional layer: a runtime. This runtime turns model output into actions, feeds action results back to the model, and manages context, permissions, state, and failure recovery throughout the process. The industry commonly refers to this layer as the Agent Runtime, which can be abstracted as:
Model + Harness = Agent
The Harness is responsible for four areas: capability assembly (models, tools, skills), execution control (loops, scheduling), environment isolation (sandboxes, storage), and interaction presentation (sessions, interfaces). Without a Harness, a model is only a passive text interface. With a Harness, it becomes an execution entity that can act continuously.
2. Core Design Principle: Everything Is a Plugin
A developer preview released by an open-source community in 2026 uses “everything is a plugin” as its architectural baseline. Model integration, toolsets, skill packs, session management, sandboxes, storage, execution loops, scheduling policies, and user interfaces all exist as plugins that can be freely replaced and recombined.
The key point is not merely “supporting plugins,” but pushing the plugin mechanism down into a meta-framework capability. The meta-framework does only three things: loading and unloading plugins, resolving dependencies, and connecting services and events. Because every concrete capability is a plugin, developers can swap capabilities at the configuration layer without modifying the framework source code.
Illustrative configuration (pseudocode, showing the assembly approach only):
runtime:model: provider_a_chat # Replaceable with any model integration plugintools: [file_io, http_client] # Tool plugin collectionskills: [code_review] # Skill pluginloop: default_react_loop # Execution loop pluginsandbox: container_sandbox # Sandbox pluginstorage: object_storage # Storage pluginui: web_console # Interface plugin
3. Layered Structure: Dividing Responsibilities Between the Meta-Framework and Plugins
Clear boundaries are a prerequisite for maintainability. The system can be understood in three layers:
- Meta-framework layer: manages lifecycle and the dependency graph, with no awareness of specific business semantics.
- Service and event layer: plugins collaborate through service registration and an event bus, avoiding hard-coded calls between plugins.
- Capability plugin layer: concrete implementations such as models, tools, skills, and storage, which can be developed and versioned independently.
The direct benefit of this layering is controlled replacement cost. For example, replacing a local file tool with a remote object storage tool only requires adjusting dependencies and configuration, not modifying the loop logic.
4. Four Execution Modes: Choosing the Right Level of Control
The preview offers four modes—standard, programmatic tool calling, minimal, and creative—which provide a continuous scale between controllability and autonomy:
- Standard mode: the model decides which tool to call, while the framework handles validation and feedback. Suitable for general tasks.
- Programmatic tool calling mode: code explicitly orchestrates the tool chain, and the model participates only at key points. Suitable for production tasks with fixed workflows.
- Minimal mode: keeps only the minimal loop and necessary tools, with fast startup and low overhead. Suitable for evaluation and lightweight scenarios.
- Creative mode: relaxes constraints to encourage exploratory solution generation. Suitable for prototyping and creative tasks, and should be paired with stricter sandboxes.
Selection guidance: prioritize programmatic orchestration for production pipelines; use creative mode during exploration; use minimal mode for evaluation and regression to ensure reproducibility.
5. Reversible Side Effects: Making Plugin Unloading and Rollback First-Class
A common risk in agent frameworks is that “an action has already happened but the state cannot be rolled back.” The reversible side effect mechanism requires plugins to register a compensating action before producing an external impact, and to execute those actions in reverse order during unloading or rollback. Example:
// Pseudocode: side effect registration and compensationconst tx = runtime.beginSideEffect();await tx.apply(() => storage.write(key, value));tx.onRollback(() => storage.delete(key));try {await tx.commit();} catch (e) {await tx.rollback(); // Execute compensations in reverse orderthrow e;}
Combined with sandbox and storage plugins, trial and error can be confined to a disposable environment, significantly reducing the risk of polluting real systems.
6. Key Engineering Practices
- Dependency governance: declare version ranges for plugins to avoid cascading failures when the meta-framework is upgraded.
- Observability: record an input summary, tool calls, elapsed time, and failure reasons for each loop, and connect to common logging services and monitoring alerts.
- Least privilege: grant tool plugins the minimum permissions required for a task, and route sensitive operations through manual confirmation.
- Evaluation loop: run a fixed test set in minimal mode to establish a regression baseline.
- Quick start: on a machine with a Node.js toolchain, a single package manager command can launch the web interface without a prior global installation.
7. Trend Outlook
Competition among runtime frameworks is shifting from the “number of model integrations” to “assembly efficiency and rollback capability.” In related practice, Baidu AI Cloud also emphasizes that enterprise-grade agents need plugin governance, sandbox isolation, and observability provided together as infrastructure. For developers, mastering the mental model of “meta-framework + plugins + reversible side effects” has more long-term value than memorizing a specific product interface.
