Voxta docs
DevelopersModules

Modules

A Voxta module is a .NET class library loaded inside the server. How modules register services, their lifecycle, and when to write an integration instead.

A Voxta module is a .NET class library that runs inside the Voxta server process. Every AI service Voxta runs in-process is a module: OpenAI text generation, ElevenLabs TTS, Vosk transcription, vision providers, the Elite Dangerous COVAS. Your own modules sit alongside them.

Modules vs. integrations

A module runs in-process, as a .NET DLL loaded by Voxta. Modules are for services that benefit from running inside the server: providers that wrap an AI API, services that need fast access to chat state, integrations that can be expressed in pure .NET (file watchers, HTTP calls, Win32 input).

An integration runs in its own process and connects to Voxta over the WebSocket / SignalR API. Voxta Minecraft Companion (Electron + Node.js + Mineflayer), the Virt-A-Mate plugin (in-game C# script), and Voxy (desktop avatar app) are all integrations. They live where their host runtime lives, outside the Voxta server.

Rule of thumb: if your code needs to live in another runtime (Node.js, a game's scripting engine, a browser), write an integration. If it can run as in-process .NET code, write a module.

Anatomy of a module

A module is a project with a module.json and a class implementing IVoxtaModule. Voxta calls Configure(IVoxtaModuleBuilder) once, and from then on the module is wired into the server.

public class VoxtaModule : IVoxtaModule
{
    public void Configure(IVoxtaModuleBuilder builder)
    {
        builder.Register(new ModuleDefinition { /* who I am */ });
        builder.AddChatAugmentationsService<MyService>(/* what I do */);
        builder.Services.AddSingleton<MyHelper>();
    }
}

What Configure does:

  1. builder.Register(...): declares the module: name, label, version, what kinds of services it provides, hosting model, logo, pricing tier, skills.
  2. builder.AddXxxService<T>(...): registers your service implementation. Xxx matches the service type (TextGen, SpeechToText, ChatAugmentations, etc.).
  3. builder.Services: the module's own IServiceCollection. Voxta's services are visible to it. Other modules' services are not, so register what you use.
  4. builder.Contribute<TContract, TImpl>(): gives the host something it asks every module for:

Nothing reaches Voxta until Configure returns, so a module that throws leaves nothing behind and is reported as failed.

Installing smoothly

Users add a module through the install flow: settings, install, models, setup steps, defaults. Steps a module has nothing for are skipped.

  • ModuleFlag.InstallsWithoutSettings: the module works on its defaults for everyone, so installing skips its settings step (unless it has a sign-in).
  • Setup steps: what the user must do outside Voxta before the module works, such as installing a game mod. Write them in an Onboarding.md next to the .csproj, one step per ## heading. Text before the first heading introduces them. Embed the file and point the definition at it. Voxta walks the user through them in the install flow's Setup step, and links to them from the module's settings. Leave out what Voxta's own pages already ask for.
<EmbeddedResource Include="Onboarding.md" />
Onboarding = ModuleOnboarding.EmbeddedResource(typeof(VoxtaModule), "Onboarding.md"),
  • Python: list pip requirements in module.json. The install step sets them up.

Lifecycle

PhaseWhat happens
LoadingVoxta loads its built-in modules, then custom modules: dev folders and installed packages, each in its own load context.
ConfigurationEach module's VoxtaModule.Configure(...) is called once, with a builder and container of its own.
Service initWhen the user enables your service in the UI, Voxta instantiates it via DI and calls InitializeAsync.
Instance creationWhen a chat session opens, Voxta calls CreateInstanceAsync on the service. The returned instance is per-chat. It has its own state and is disposed when the chat ends.
Configuration changeIf the user changes a setting flagged in ModuleConfigurationFieldsRequiringReload, the service is torn down and re-initialized. Other field changes are picked up on the next instance.
ReloadA new build of a custom module, or an update, is applied while Voxta runs: chats using its augmentations stop, the old build unloads, the new one loads. builder.AllowReload = false asks for a restart instead.

Distribution

  • While developing: add the project as a dev folder, rebuild, Apply. See Installing and live reload. An assistant in Voxta, or a coding agent through MCP, can do these steps for you. See Module Development.
  • Without the source: upload the DLL, or a zip of its dotnet publish output, on Module Sources (.zip or .dll).
  • Published: a GitHub release made with Voxta.Sdk.Modules. Users add your repository as a module source and install and update from there. See Publishing a module.

Next steps

Worked example

On this page