The Core Difference in Plugin-Based Agent Frameworks: Understanding the Extension Coordinate Model
“Everything is a plugin” can describe very different architectures. This article explains how predefined extension points differ from runtime-generated coordinates, and how shared service tables, fiber trees, and proxy-based context views enable extensibility, isolation, dependency injection, and reliable lifecycle management in agent systems.
When building an AI agent system, many teams adopt the slogan “everything is a plugin.” However, the meaning of that slogan can vary significantly between frameworks. Some frameworks provide a predefined set of extension points that plugins implement. Others treat plugins as dynamic producers of runtime structure: plugins can register services, participate in dependency injection, and continuously create new extension coordinates for other plugins to use.
Understanding who defines the extension coordinates is one of the most important steps when evaluating or selecting an agent framework. This article examines that question in detail.
1. “Everything Is a Plugin” Does Not Mean the Architecture Is Equivalent
At a high level, most plugin-based frameworks provide similar capabilities: tool registration, event subscriptions, service provisioning, and lifecycle management. But simply counting the number of plugins or extension points does not reveal the fundamental architectural differences.
The key question is:
Is the extension coordinate system predefined by the core, or can plugins continue to generate it at runtime?
- Core-defined coordinates: The framework fixes a set of extension points during startup, such as a tool registry, event bus, or service container. Plugins can only write values into these existing slots. In this model, the system’s capability boundary is largely determined when the core code is designed.
- Plugin-generated coordinates: A plugin can register new service names, introduce new isolation labels, or derive new child contexts. Other plugins can then depend on and extend these dynamically created coordinates. The coordinate space remains open and can continue to grow.
The second model represents the deeper meaning of “everything is a plugin”: plugins do not merely consume structural space; they can also produce structural space.
2. The Three Components of Runtime Structural Space
To understand plugin-generated coordinates, it helps to first examine the structure of the runtime space. It can be abstracted into three components.
2.1 A Shared Coordinate Table
The runtime contains a single global service table, typically owned by the root context. Child contexts share this table through a prototype chain. Each slot is uniquely identified by two dimensions:
- Service name: A logical name such as
ctx.databaseorctx.shell - Isolation label: A label used to distinguish implementations of the same service in different isolation domains
Each slot stores two pieces of information: the current implementation value and the fiber, or plugin instance, that owns the implementation.
Using the two-dimensional coordinate of “service name + isolation label,” the same logical service can expose different implementations in different isolation domains without interfering with one another.
2.2 The Fiber Tree: The Lifecycle Unit of Structural Space
Whenever a plugin is mounted, the runtime creates a fiber, representing the plugin instance, along with a dedicated child context derived from the parent context. This derivation is typically implemented through an operation similar to:
parent.extend({ fiber: this })
The fiber is responsible for the plugin’s lifecycle:
- Dependency resolution: When a plugin declares dependencies, the fiber schedules its startup according to those dependencies.
- Activation and unloading: When a plugin is activated, it writes values into coordinates. When it is unloaded, the values it created are removed.
- Resource cleanup: When a fiber is destroyed, resources derived by the plugin—such as timers, listeners, and child processes—are collected together and released to prevent leaks.
The fiber tree can be viewed as the lifecycle skeleton of structural space. The coordinate table records what value exists at a given location, while the fiber tree records who owns that value and when it should be created or removed.
2.3 Context Chains and Proxy Views
The context object exposed to a plugin is typically a Proxy. Property access and assignment are intercepted and translated into coordinate-table operations. Each context carries a view that maps service names to isolation labels:
- When evaluating
ctx.database, the current view first maps the service name to a specific coordinate in the table. - A child context inherits names that it does not override from the parent view through the prototype chain.
- A child context can replace the label associated with a name, creating local isolation.
For example, a parent agent’s ctx.shell might point to the full local environment, while a child agent’s ctx.shell is overridden to point to a restricted sandbox. The tool consumer continues to use the same logical key, ctx.shell, but the concrete implementation depends on the active view.
This is the core value of keeping the logical interface stable while allowing the physical implementation to vary.
3. A Layered Delta Model for Coordinate Space
Taken together, the runtime’s structural space can be understood as a stack of Delta layers:
Coordinate table (globally shared)└── Fiber tree (lifecycle ownership)└── Context chain (Proxy views + label inheritance)└── Registration entry (value at a coordinate + disposer)
Every plugin operation—registering a tool, subscribing to an event, or providing a service—is fundamentally an operation that writes a value to a coordinate. At the same time, the plugin provides a disposer that can erase that value. This model has several important properties.
Tool Registration Is Coordinate Registration
The tool registry is effectively a coordinate table in which each tool occupies a slot keyed by its name.
- Registering the same name in the same layer produces an error, preventing silent overwrites and the debugging problems they create.
- Registering the same name across layers follows a nearest-layer-wins rule. A child plugin’s tool can shadow a parent plugin’s tool, while the parent implementation remains explicitly accessible through the parent view.
Events Use Event Names as Coordinates
An event bus can be understood as a key-value space that maps an event name to a set of handlers. Subscribing writes an entry into that space, and unsubscribing removes it.
Services Use Service Names as Coordinates
Service lookup follows the same isolation and shadowing rules. A service name is resolved through the active context view and then mapped to the corresponding service coordinate.
In this sense, the common element unified by “everything is a plugin” is a keyed coordinate space. Isolation, shadowing, lifecycle management, and dependency resolution all become rules for reading from and writing to this coordinate table.
4. Understanding the Mechanism with Code
The following pseudocode illustrates how a context Proxy works together with a label view:
// Core coordinate lookup logic (illustrative)function resolveService(ctx: Context, serviceName: string) {// 1. Find the nearest view that defines a label for this service nameconst scope = ctx.views[serviceName] ?? inheritFromParent(ctx, serviceName);// 2. Locate the slot in the global coordinate table by service name + isolation labelconst slot = rootServiceTable.get(`${serviceName}@${scope}`);// 3. Return the implementation stored in the slotreturn slot?.value;}
When a plugin registers a tool, it writes a value to a coordinate and returns a disposer:
// Write a coordinate and return a disposer during tool registration (illustrative)function registerTool(ctx: Context, name: string, handler: ToolHandler) {const slot = NamedEntries.insert(ctx.layer, name, handler); // Throws on duplicate names in the same layerreturn () => slot.remove(); // The fiber manages the disposer}
A child context can override the isolation label for a specific service:
const childCtx = parentCtx.extend({fiber: childFiber,views: { shell: 'sandbox' }, // Override only shell; inherit everything else});
Together, these examples show the complete cycle:
coordinate resolution → value registration → lifecycle cleanup
5. Design Implications and Engineering Practices
Once the coordinate model is understood, several practical architecture principles follow.
Extension points should form an open coordinate system rather than a closed enumeration. When evaluating a framework, do not only ask how many extension points it provides. Ask whether a plugin can define a new service name that other plugins can depend on, and whether it can derive a child context with an independent isolation label.
Name-conflict behavior must be clear and predictable. Same-layer registration errors, cross-layer shadowing, and explicit access to parent implementations together provide safer composition and better debuggability.
Lifecycle management must be bound to coordinate writes. Every registration operation should return a disposer that is owned by the fiber. This is the fundamental safeguard against resource leaks and stale registrations.
Isolation labels provide a foundation for sandboxing and multi-tenancy. With label-based views, different child agents, sessions, or tenants can receive different implementations without changing the tool-consumer code. Examples include a restricted shell, isolated storage, or separate quotas.
Proxy views keep dependency injection stable. Consumers depend only on logical names and do not need to know which layer or isolation domain provides the implementation. This significantly reduces coupling between plugins.
6. Conclusion
The real dividing line between plugin-based agent frameworks is not the number of plugins they support, but the openness of their coordinate system.
Are extension coordinates predefined by the core, or can plugins continuously create them through service registration, dependency injection, and context derivation?
The latter model combines a shared coordinate table, a fiber tree, and Proxy-based context views to create runtime structural space that can grow, isolate implementations, and reclaim resources reliably. Thinking in terms of coordinates makes it easier to evaluate existing frameworks or design agent infrastructure from scratch. It also helps reveal the underlying architecture instead of being misled by the apparent number of plugins or extension points.
