"Everything as a Plugin" Agent Architecture: Engineering from Runtime to Desktop Client

    This article examines an agent architecture built around the "everything as a plugin" principle, where the agent loop, model adapters, tools, storage, sandbox, and UI are all assembled from configuration into a plugin tree. It explains the runtime registration model, configuration-based replacement semantics, and explicit capability boundaries, then discusses two practical adoption barriers: deployment complexity and developer-preview UI quality. It further presents a desktop shell plus client-plugin engineering approach and a sidebar interaction case study, concluding with reusable lessons for plugin depth, symmetric lifecycles, thin wrappers, and high-frequency UX optimization.

    Introduction: The Next Step for Agent Frameworks Is “Assemblability”

    Over the past year, many agent development frameworks have emerged, but most still follow a traditional architectural approach: the core loop is hardcoded, while peripheral capabilities are connected through APIs. A more striking design applies the “everything as a plugin” idea all the way through. It is not limited to visible parts such as skills, the Model Context Protocol (MCP), and the UI. It goes deeper: model adapters, tool sets, filesystem abstractions, session storage, sandbox execution environments, and even the Agent Loop that drives the entire system all exist as plugins and can be replaced independently.

    This design means that a running agent instance is essentially a plugin tree assembled from configuration. Understanding this tree means understanding the essence of this type of architecture.

    1. How the Plugin Tree Works

    In a typical “everything as a plugin” implementation, the system parses a configuration description at startup, loads plugins layer by layer, and assembles them into a tree structure. The core mechanism can be summarized in three points:

    1. A unified registration and deregistration protocol. When a plugin is mounted, it can register three types of content with a shared context: services (capabilities that other plugins can call), events (message subscription and publication), and UI components. When the plugin is unmounted, the framework performs the inverse of those registrations and revokes all corresponding entries. This strictly symmetric lifecycle management prevents dangling references or ghost services during hot replacement.

    2. Configuration-based replacement semantics. To replace a capability—for example, switching from a local filesystem to a remote object storage adapter, or from in-memory session storage to a persistent database—you usually only need to replace the corresponding node in the configuration tree or insert a new plugin at the appropriate position. No changes to the framework code itself are required.

    3. Explicit capability boundaries. Because every capability is reduced to a plugin, the system’s dependency graph is fully explicit. When troubleshooting, you can quickly locate responsibility along the plugin tree. During security audits, you can precisely answer which capabilities the current instance has and which resources it can access.

    The following illustrative configuration snippet shows how the plugin tree is organized (fields are generic examples):

    1. runtime:
    2. loop: builtin-agent-loop # Agent loop plugin
    3. model:
    4. adapter: http-model-adapter # Model adapter
    5. storage:
    6. session: sqlite-session-store # Session storage
    7. sandbox: local-process-sandbox # Sandbox
    8. plugins:
    9. - name: code-tools
    10. provides: [tools]
    11. - name: workspace-ui
    12. provides: [ui]

    This approach is aggressive and well worth learning from: it turns the framework from “a hardcoded program” into “a set of assembly rules,” delivering a qualitative improvement in extensibility and testability.

    2. From Architectural Elegance to Deployment Pain

    A beautiful architecture does not mean ordinary users can use it. During practical promotion and trial use, two pain points repeatedly appeared.

    Pain point 1: Deployment threshold. The official startup method for many agent frameworks is already friendly enough for developers: install the runtime environment and run a single command. But for people who do not write code, “open a terminal” is itself an insurmountable barrier. Experience shows that when recommending developer tools to non-technical friends, many users drop off at exactly this step. Command lines, environment variables, and dependency versions are familiar to developers but impose a cognitive burden on target users.

    Pain point 2: The UI is in developer-preview state. Early versions of the web UI often already have complete functionality—workspace, session management, model selection, permission modes, execution trace replay, and plugin settings are all available—but interaction details have not been polished one by one. When it is used as a high-frequency daily client, small issues accumulate: unclear information hierarchy, insufficient visual differentiation, and overly long paths for frequent actions.

    3. Engineering Solution: Desktop Shell + Pluginized Client

    An effective solution to these pain points is a two-layer structure: a desktop shell plus client plugins.

    Desktop shell layer. Using mainstream desktop application container technology (such as a Chromium-based shell solution), the native web UI is loaded into an independent window. The desktop side takes over responsibilities that are tightly coupled to the operating system: window management, directory picker dialogs, initialization and isolation of data directories, and launching and restarting the local runtime process. The agent core logic—the Agent Loop, tool execution, and sandbox—continues to use the runtime’s original implementation, without rewriting or forking, ensuring compatibility with upstream evolution.

    The key principle of this layering is a “thin shell”: the desktop side only wraps, it does not implement business logic. Once users have completed server deployment, the desktop shell can be skipped entirely, and users can install client plugins separately as needed. This prevents the shell layer from becoming entangled with the core layer.

    Client plugin layer. All UI enhancements are delivered as plugins, from the same source as the runtime plugin system. This means UI improvements and core capability improvements follow the same assembly mechanism, and upgrades and rollbacks are simple and controllable.

    4. A Concrete Interaction Polish Case

    Take the sidebar as an example. The original UI supports workspaces and a multi-level session tree, but the visual differences among workspaces, sessions, and the current task are small. When there are many projects, users need extra time to confirm “which directory am I in, and which session is open.” Clicking a project by default only expands and collapses it, the entry for creating a new session is hidden in an adjacent icon, and switching projects often requires an extra step.

    The improved logic is closer to user intuition:

    • Clicking an inactive project directly switches to that project and automatically enters a new session—compressing the high-frequency intent of “switching” into one click;
    • An active project retains expand/collapse behavior, and the plus entry for creating a new session remains, without breaking existing muscle memory;
    • The session hover card adds more information (such as associated workspace, recent activity time, and model configuration summary), allowing users to make judgments without clicking in.

    These changes are small individually, but they follow a consistent direction: transforming information organization from a “developer debugging perspective” into a “daily user task perspective.” The former pursues full visibility of capabilities; the latter pursues the shortest path to the current task.

    5. Reusable Methodology

    This case yields several lessons that are broadly applicable to similar projects:

    1. Pluginization must be thorough to compound. Making only the UI and skills pluggable is not enough. The closer a part is to the kernel (storage, sandbox, main loop), the more it is worth abstracting. The lower the replacement cost, the more vitality the ecosystem has.
    2. The registration mechanism must be symmetric. What mounting can register, unmounting must be able to revoke. This is the foundation of trustworthy hot-plugging.
    3. The shell must be thin. The desktop side or wrapper layer should only handle system integration and must not intrude into business logic; otherwise, it will quickly become a second product that needs maintenance.
    4. Optimize interactions around high-frequency paths. Prioritize friction that occurs dozens of times a day with one extra step each time, rather than low-frequency but conspicuous missing features.

    Conclusion

    “Everything as a plugin” represents an agent architecture direction worth watching: the system is no longer a frozen program but a set of capabilities that can be reassembled at any time. However, architectural advancement is only the starting point. What truly determines whether a framework can be widely used and continuously evolve is the engineering experience built around it—a lower deployment threshold, interactions that are closer to daily use, and an extension mechanism that lets improvements happen at low cost. When these two sides come together, a developer-preview framework has a chance to grow into real productivity infrastructure.