Plugin Runtime and Reversible Computing: Why "Everything Is a Plugin" Means Everything Is a Delta
This article re-examines the claim "everything is a plugin, and every plugin is reversible" from the perspective of deltas rather than category theory. It explains why agent runtimes can unify the main loop and memory mechanisms, what reversibility actually means (reverting structural changes, not replaying execution), and where the runtime-only approach stops short. It also covers the relationship to reversible computing theory and lists practical engineering recommendations for making structural evolution auditable and rollback-safe.
1. Background: Why Agent Runtimes Need a New Composition Model
Modern AI coding tools and agent frameworks typically rely on highly configurable plugin systems. A paper released alongside a certain plugin-based runtime formalized the design principles of its underlying plugin runtime mathematically. Its core claim comes down to two sentences: everything is a plugin, and every plugin is reversible.
This claim has split the community. Three objections come up most often:
- Is unification necessary? The agent main loop and the memory mechanism are vastly different, so forcing both into the same notion of “plugin” looks like tidiness for its own sake.
- Is this a new invention? Most frameworks already support plugins, so the design is nothing new.
- Does reversibility hold? Side effects are unavoidable, so how could a runtime change be undone? And if version upgrades already exist, why bother with dynamic updates?
The root cause of these doubts is that the original argument is expressed in category theory and functional formalisms, which most developers cannot read past the symbols to reach the engineering meaning. This article re-argues the case using deltas as a general lens and states the engineering constraints that make it actionable.
2. The Core Abstraction: Everything Is a Plugin Equals Everything Is a Delta
The common way to write a plugin system is:
App = Base + Plugin1 + Plugin2 + ...
If you stop at “features are not built in, plugins provide them,” that is just module separation. The valuable reading is to treat the addition as the superposition of deltas in a structural space: each plugin is not a static block of code but a delta unit that can be strictly defined, applied on its own, and withdrawn on its own.
Three engineering properties follow:
- Composability: the result of stacking several deltas does not depend on application order, or any order dependence is explicitly declared and constrained.
- Reversibility: any delta can be removed, and once removed the system returns to a state equivalent to the one before that delta was applied.
- Auditability: the current structure of the system equals the base structure plus an enumerable set of deltas, so the state is explainable.
This also answers the first objection. The main loop and memory can be unified not because they do similar work, but because both modify the runtime structure in ways that can be expressed as deltas. What is unified is not the functionality but the way changes are described.
3. What Reversibility Really Means: Reverting Structural Changes, Not Replaying Execution
The second clarification concerns the definition of “reversible.” Here reversibility does not mean running the program backwards in time. It means reverting changes to the structural space of the runtime: newly added components, connections, subscriptions, and configuration entries are withdrawn in the opposite manner, returning the structure to an equivalent form to the one before the change.
The scope therefore needs to be bounded:
- It does not promise to control every side effect. Writes to the external world and network requests already sent cannot be undone.
- It mainly targets structural side effects that affect the composite interaction of multiple plugins, meaning changes that alter component topology and dependency relationships.
The answer to the third objection is here too: dynamic updates and version upgrades solve different problems. A version upgrade replaces a build-time artifact; it is coarse-grained and needs downtime or a restart. Reverting a structural delta is a runtime-local change; it is fine-grained and takes effect immediately. The two are complementary, not substitutes.
4. Capability Boundary: Runtime Structural Space Versus Compile-Time Structural Space
It should be stated plainly that deltas at the runtime level alone are not enough for complete reversibility. A complete solution also needs the full set of practices for the compile-time structural space: algebra for deltas, merge and conflict-resolution rules, and static validation of dependency constraints.
Mechanisms that commonly correspond in engineering practice include:
- Declarative configuration: describing the desired structure as data instead of mutating it step by step with imperative code.
- Runtime reconciliation: continuously comparing desired state with actual state and converging the difference.
desired:plugins:- id: plannerversion: 3- id: memoryconfig: { scope: session }
This configuration expresses only the desired state; the runtime is responsible for how it is applied. Such mechanisms already appear in part in plugin-based implementations, but without formalization at the level of delta algebra, conflict resolution and rollback boundaries still rest on conventions rather than verifiable rules.
5. Relationship to Reversible Computing Theory
Reversible computing theory treats changes as deltas and provides formalisms in both structural spaces, compile time and runtime. The plugin runtime approach can be seen as one concrete application of that theory in the runtime structural space: plugins here are not merely functional modules but delta units that can be defined rigorously in mathematical terms.
The difference lies in completeness. The theory covers compile-time delta algebra, while the plugin runtime is currently more of a mechanism description. The relationship is that of a special case to a general framework, not two names for the same concept.
6. Engineering Recommendations
- Unify change description: route all structural modifications through a single delta entry point, and forbid direct rewrites that bypass it.
- Declare desired state: keep configuration data-centric and avoid piling up imperative scripts.
- Implement a convergence loop: periodically compare desired and actual state, and emit diff logs.
- Define rollback boundaries: separate reversible structural changes from irreversible external side effects, and mark them in the documentation.
- Pair it with observability: use general-purpose logging services and monitoring and alerting capabilities to record every delta application and withdrawal for auditing.
- Move static validation earlier: validate plugin dependencies and version compatibility at build time to reduce runtime conflicts.
7. Conclusion
The value of “everything is a plugin, and every plugin is reversible” lies not in plugin architecture itself but in raising plugins to composable, revocable delta units, which gives an agent runtime the ability to evolve its structure explainably. Understanding this requires shifting attention from functional categories to the algebra of change. And to actually obtain reversibility in production, the compile-time layer of delta algebra and static validation must be filled in; runtime reconciliation alone is not sufficient.
