Architecture

The agent is a shell. Everything else is a module.

Darkspyre keeps a small host and loads the rest as modules and plugins. Any of them can be replaced while the app runs, which lets the agent extend itself with far less risk of taking itself down.

Layers

How it fits together.

The host owns the window, permissions, connections and the bus. Everything you see and every tool the agent calls comes from a module, a plugin or an extension.

Darkspyre layers The host contains the message bus, permissions and sandbox, and connectors. Six core modules and bundled plugins run inside the host process. C# and Python extensions each run in their own isolated process and connect over JSON-RPC. Host process Host: window, permissions and sandbox, connectors, message bus Core modules, replaceable while running Sessions Tools Navigation Conversation Plugin management Themes C# plugins, in process Memory, Orchestrator, Build Tool, File Viewer, MCP Client, RightSize, Design Debate, and your own Isolated extension host C# (Roslyn) Tickets, Todo, your own Isolated extension host Python 3.12+ Your own tools RPC RPC

Live replacement

Swap any part while it runs.

The sidebar, the transcript, the session manager and the tools are all modules. Replace one with your own version, or let the agent build a new one and swap it in with the core_upgrade tool.

  1. Check

    One module, checked first

    An upgrade replaces a single module inside the running app. The new module is verified before anything changes. A bad one is rejected, and the running module never notices.

  2. Swap

    State carried across

    The swap waits for the current turn to end. Sessions, queued prompts, drafts, attachments, scroll position and open dialogs pass to the new version, and the old code unloads.

  3. Resume

    Falls back on failure

    A health check confirms the new version. If it fails, the previous healthy version comes back. The outcome is posted into the same conversation, and every attempt is recorded.

Plugins and extensions

Two ways to extend it.

Both use the same SDK contracts: commands, tools, turn context, settings, storage, secure store, files, processes, web, sessions, workers, models, prompts and the bus.

C# plugins

  • In process. Full access to the internals, in a load context that unloads cleanly.
  • Real interface. Add right-dock panels, settings tabs and surfaces in the composer, status bar, transcript and sidebar. They follow the current theme automatically.
  • Fallback. A plugin that fails at startup is skipped next launch, and an earlier version can load in its place.

C# and Python extensions

  • Isolated. Each extension runs in its own host process over JSON-RPC. A crash affects only that extension.
  • Self-healing. A crashed extension restarts after 5 and then 10 seconds. A third crash in a row quarantines it.
  • No build step. C# extensions compile from source with Roslyn when they load, so the agent can write a tool and use it at once. Python extensions use asyncio on Python 3.12 or later.

Message bus

Every layer can talk.

An internal message bus connects the host, the modules, plugins and extensions. Manifests declare their topics. Subscribers can use wildcards, and messages can be retained for late joiners. Plugin management shows every topic in use.

.NET native

.NET 11 and Blazor. No Python required.

  • One process. The agent loop, tools, sessions and plugin runtime run together in a C# application on .NET 11.
  • Native window. The Blazor interface renders in the operating system's own web view. No Chromium is bundled.
  • Local inference built in. TensorSharp and ONNX Runtime run models in process, so hosting a model locally needs no Python.
  • One signed app. Self-contained, with the core modules and bundled plugins inside its signature.