Design Principles of Plugin-based Harness Runtimes: Everything is a Reversible Plugin
This article explores the architectural philosophy behind a new open-source Harness project for large language model applications, summarized as "everything is a plugin, and every plugin is reversible." By examining the core formula App = Base + ΣΔ, the article clarifies common misconceptions about reversible computing in software design, differentiates it from traditional plugin systems, and provides practical guidance for developers to adopt a delta-based, reversible architectural mindset in their own systems.
I. Background: Why Harness Matters
As large language model (LLM) applications rapidly proliferate, a consensus has emerged in the industry: the model itself is merely the “engine.” What truly determines application quality is the execution environment wrapped around the model—commonly referred to as the Harness. The Harness is responsible for orchestrating the Agent loop, managing context and memory, registering tool calls, and executing security policies. Recently, an LLM team released an open-source DSH-type Harness project, accompanied by a formal academic paper co-authored with a university, attempting to mathematically prove the design principles of its underlying plugin runtime. This sparked extensive community discussion, with some excited and others confused.
Its architectural philosophy can be summarized in one sentence: everything is a plugin, and every plugin is reversible. This article does not dwell on any specific product but rather analyzes this design as a general architectural paradigm, helping developers understand its essence and consider how to apply it.
II. The Core Formula: App = Base + Δ1 + Δ2 + …
Traditional frameworks operate by building a set of features into the product, with plugins acting as “extension points” to supplement edge capabilities. This type of Harness takes a more radical approach, which can be abstracted into a formula:
App = Base + Δ1 + Δ2 + ... + Δn
That is, the product retains only a minimal kernel (the Agent main loop, scheduler, lifecycle management), and a large number of “seemingly built-in” features—including memory mechanisms, tool systems, context compression strategies, and even the Agent Loop itself—are superimposed as plugins (deltas).
This aligns perfectly with the concept of reversible computing theory: software is not “built from scratch” but is a composite result of “base components + a series of delta corrections.” Here, a plugin is not just a functional module; it is a strictly defined Delta unit in a mathematical sense—describing “a structural modification relative to a baseline state.”
III. Technical Responses to Four Common Skepticisms
Skepticism 1: Agent Loop and Memory are vastly different. Is it meaningful to unify them as “plugins”?
It is meaningful, not because “they are similar,” but because “the way they affect the structural space is the same.” No matter how different their functional semantics are, a plugin is essentially a set of structural modifications to the runtime object graph (adding nodes, replacing nodes, deleting nodes, modifying edges). The value of unified abstraction lies in the fact that scheduling, dependencies, lifecycle, and rollback mechanisms only need to be implemented once. This is a typical “orthogonal decomposition”—separating “business semantics” from “structural operations.”
Skepticism 2: Plugin systems have existed for a long time. Is this a pseudo-innovation?
Traditional plugin systems are “mounting-based”: plugins register callbacks at reserved extension points, and the kernel structure remains unchanged. Delta-based plugins, however, are “refactoring-based”: they can replace or even delete existing components within the kernel, and the system then recomposes the complete application. The former is superposition; the latter is an operation in the sense of delta algebra. The two operate on completely different capability levels.
Skepticism 3: Side effects are inevitable. How can it be “reversible”?
This is the most easily misunderstood point. “Reversible” here does not mean reverse-executing a program or undoing all runtime side effects (such as sending a message or writing a database record, which obviously cannot be undone out of thin air). It refers to: reversing modifications to the runtime structural space. Loading a plugin = applying a delta to the plugin registry/object graph; unloading = applying the inverse operation of that delta to restore the structure to its pre-composite state. The reversible object is the “structure,” not the “world.”
Skepticism 4: Is dynamically updating plugins necessary? Isn’t version upgrading sufficient?
In long-running Agent systems, capabilities require “hot evolution”: a session running for hours might need to introduce new tools or adjust memory strategies midway. If it can only be upgraded via downtime, all state is lost. Delta reversibility enables new plugins to be applied first as deltas; if the effect is unsatisfactory, an inverse delta is applied to roll back, maintaining runtime consistency throughout the process.
IV. Formal Perspective: Complementarity of Compile-time and Runtime
The accompanying paper uses category theory language to formalize plugin composition as a delta algebra on a structural space. It should be noted that to fully implement reversibility, a complete set of engineering practices already matured in the “compile-time structural space” is required: declarative configuration, delta merging, consistency validation, and reconciliation (converging to the desired state through auditing). The implementation of this runtime already reflects parts of this, but the paper mostly remains at the level of mechanism description, without fully formalizing this layer into delta algebra. This is the root cause of the community finding the “math hard to understand”: the symbols discuss composition laws and inverse elements, while the engineering discusses loading and unloading. Readers must bridge the two themselves.
V. How Developers Should Understand and Use It
- Establish delta thinking: When designing a feature, first ask “what structure does it modify relative to the base?” rather than “which hook does it register a callback on?”
- Keep the kernel minimal: Anything that can be expressed as a delta should not be hardcoded into the base, otherwise the integrity of
App = Base + ΣΔis broken. - Ensure deltas are invertible: When registering a plugin, synchronously declare the inverse operation or have the container automatically derive it from the delta description to avoid “installable but uninstallable” situations.
- Prioritize declarative approaches: Use declarative configurations to describe plugin intent, allowing the runtime reconciliation to converge the actual structure, rather than manually assembling it imperatively.
- Isolate side effects outside the structural boundary: Structural modifications are reversible, while business side effects should be managed separately through explicit compensation transactions and idempotent designs.
VI. Conclusion
“Everything is a plugin, and every plugin is reversible” is not a marketing slogan, but a runtime implementation of the ancient ideal of abstracting software construction into delta operations on a structural space. Its fundamental difference from traditional plugin systems lies in the fact that deltas can act on arbitrary structural nodes and be strictly reversed. For developers, even if they do not use similar frameworks, this modeling approach of “base + delta” is worth migrating to their own system designs—it elevates feature composition from “convention” to “algebra,” moving from “happens to run” to “provably correct.”
