Voxta docs
DevelopersModules

Installing and live reload

Load a module you are writing as a dev folder and reload it without restarting Voxta, install a built module from a .zip or .dll, and find out why one does not load.

Modules that are not built into Voxta are custom modules: dev folders, which you build yourself, and installed packages. You add both on Settings → AI Setup → Module Sources and manage them on Local Development Modules (the Local development modules row, then Manage). They load without a restart. For the pages as a user sees them, see Local development modules. For installing from a source, see Module sources.

Custom modules are Voxta Full only, for an administrator, without an API key, and with either a password on the account or a browser on the server's machine. Lite loads its built-in modules and the official modules Voxta Cloud lists for Lite, such as the Cyberpunk and Elite Dangerous integrations. Hosted servers load built-in modules only.

Dev folders

A dev folder is a module you are working on, loaded from where you build it.

  1. dotnet build.
  2. On Module Sources, click Add source, type or browse to the folder under Module source and click Add. It can be the project folder, its build output, or a repository holding one module project (a Voxta.Modules.* project is preferred). Voxta opens Local Development Modules.
  3. Install now: it loads and opens its modules in Add Modules, with a Dev badge. Install there runs the install flow.

From a project folder, Voxta uses the newest build under bin/. A dev folder only warns when it is outside its voxta range.

The Module Development augmentation does these steps from a chat: an assistant builds, loads and reloads the module in its workspace.

Live reload

Change the code, dotnet build again with Voxta still running, then Apply on Local Development Modules (the folder shows New build). Voxta loads a copy of the build, so the build can overwrite the folder while it runs.

On Apply, for each changed module:

  1. Chats running its augmentations stop. Other chats wait until it is done.
  2. The old build unloads.
  3. The new build loads and configures, and its services start again with their settings.

If something still references the old build (a static event, a thread that never ends), the page says it is still in memory. It goes at the next restart.

Some modules cannot reload in place. Set AllowReload = false in Configure when unloading would leave things behind: native libraries, process-wide state.

public void Configure(IVoxtaModuleBuilder builder)
{
    builder.AllowReload = false;
    // ...
}

Apply then asks for a Restart. It is quick and in-process. A module that replaces a built-in one, or two copies of the same id, also need a restart.

Installing a package

Without the source: Install a .zip or .dll, in Add source on Module Sources. It loads at once and shows under From a file on Local Development Modules.

  • A .dll: a module with no dependencies of its own.
  • A .zip of its dotnet publish output: a module that ships libraries. The plain build output of a library leaves its NuGet dependencies out. Natives go where publish puts them (runtimes/<rid>/native/).

The DLL carries its module.json, so Voxta knows its id and version before loading it. Installed packages live in Data/Plugins/Modules/<id>/<version>/. A module from a source installs the same way, downloaded.

Per installed package:

ButtonDoes
Install modulesOpens its modules in Add Modules, to add and configure.
Revert to …Goes back to the version an update replaced.
Load anywayLoads a package marked Incompatible (outside its voxta range).
Disable / EnableKeeps it installed without loading it.
UninstallRemoves it, and uninstalls the modules you added from it.

A dev folder replaces an installed package of the same id, and a package replaces a built-in module of the same id. Built-in modules' names are reserved (Voxta.Modules.BuiltIn.*, and the others Voxta ships): no package can take them.

Dependencies

Each custom module loads in its own load context.

  • From Voxta, always: Voxta.* (but not Voxta.Modules.*), System.*, Microsoft.Extensions.*, Microsoft.AspNetCore.*. Reference Voxta.Sdk.Modules with ExcludeAssets="runtime". A copy you ship is ignored.
  • Everything else you ship stays private. Your Newtonsoft or ImageSharp version never clashes with Voxta's.

Set <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> so the build output holds your dependencies and works as a dev folder.

Python

A module that runs Python lists its pip requirements in module.json. Each time modules load, Voxta compares every module's requirements with what was installed and offers Install when they changed.

Why it doesn't load

Local Development Modules shows each package's state and error, with a Details section.

ShownCause
IncompatibleOutside its voxta range. Rebuild against this Voxta, or Load anyway.
Missing member (MissingMethodException, TypeLoadException)Built against a newer Voxta.Sdk.Modules than the running Voxta. The page names the member. Build against the oldest Voxta you support.
Configure threwThe error and stack trace are on the page. Nothing of the module is kept.
Unable to resolve serviceEach module has its own container: register what you use in builder.Services. Another module's registrations are not visible.

The module loads but its service is not in its category's list. The type is in Supports but its Add…Service call is missing, or the other way around. See Service types.

The server log has more: the Module Development tools read it from a chat, with file logging off.

On this page