Add-on contract reference
This reference describes the contracts between LocalAI and its add-ons. If you install and use add-ons, you don’t need it: see the Add-ons user guide, Install and update add-ons and Manage add-ons, data and updates. If you write add-ons, start with Build your own and use these pages as the reference.
Status and trust
The version-one contracts in pkg/addons/contract define managed-process addons.
The owner installs, verifies, starts and supervises them, and a deployment with
several frontends forwards every addon request to that owner over a pinned mutual
TLS carrier. The routes are described in Public API, the Apps and
Add-ons pages in Apps, and Tables, the first first-party add-on, in
Tables. The first-party package is described in
First-party package and release channels;
CI publishes it, not the tests or acceptance: the master workflow publishes the development channel, and a release tag publishes the pinned entries of the release.
Trust has three parts, and they are different:
- Package identity. A package is installed only after its digest matches the catalog entry and, when the library requires it, its signature matches the identity policy of that library. A library, a channel and a trusted signer never change by themselves, and an upgrade is refused when the trusted identity of the new package differs from the installed one.
- Executable code. An installed executable is trusted code, not sandboxed code. It runs as the owner’s operating system user, with the owner’s file system and network. The host gives it a loopback port, a per-start credential and its own data directory; it does not confine it. Install only packages you trust.
- Authority. An addon never decides who a caller is or whether a change was
approved. The host supplies the actor from the authenticated session or key,
decides every role, and applies a mutation from an API client, an MCP session or
the OpenAI-compatible chat route only after the proposer’s own browser session
confirms it. The one exception is the chats on the server (
/api/chats), their agents and their triggers: turning an add-on on for a chat or an agent is the consent, and the change is applied at once, with the credential of the chat turn, for the user who turned the add-on on, and with an undo where the add-on keeps one (see Proposals and confirmation). Prompt text, a model and an addon cannot supply that approval.
Every addon requires an executable; a UI bundle alone is not an addon.
The owner’s resource policy also serves the resource kinds that are not add-ons.
Share with your team describes their roles, the
grant to @everyone and the /api/shares routes.
Pages of this reference
- Host policy: Host policy and the administrator host operation policy.
- Manifest extensions: The optional typed extensions of the manifest.
- The owner: The singleton owner, and turning it on or off and running it.
- The manifest and the runtime: The manifest, the wire version, the default limits and verification.
- Catalog, packages and the managed runtime: The private catalog, package staging, the durable lifecycle and the managed runtime.
- Host operations, settings and providers: Action tools, host operations, user settings, provider slots and model search sources.
- Connectors, change proposals and context files: Connector add-ons, change proposals and context files.
- Owner forwarding and HTTP relays: How frontends forward requests to the owner and relay HTTP.
- Proposals, resources and file results: Proposals and confirmation, resource management from the UI and private file results.
- Apps, pages and slots: Apps, add-on pages and the extension points of the UI.
- First-party packages and release channels: First-party packages, the release channels, Office and Web.