Skip to main content
LocalAI docs > Add-ons

Add-on catalogue

Pick an add-on below. An administrator installs it, and anyone with the addons feature uses it. The user guide has the steps, and each page says what that add-on needs.

Chat apps

Add-onWhat it adds
TelegramTalk to a saved agent from Telegram.
SlackTalk to a saved agent from Slack.
DiscordTalk to a saved agent from Discord.

Work tools

Add-onWhat it adds
Simple OfficeMake, read and edit Word, Excel, PowerPoint and PDF files, with no sandbox.
SandboxRun commands and code in an isolated sandbox with your files mounted.
TablesDatabases of tables that a chat can read and change, and that you can share.
CalendarA calendar that chats and agents can read and change.
ContactsAn address book that chats and agents can search and change.
Web searchSearch providers with a key, and PDF reading, for the web tools of a chat.

Services and devices

Add-onWhat it adds
GmailRead mail, and save and send drafts with your approval.
MailRead a mailbox over IMAP and write mail over SMTP.
Google DriveRead Drive folders you choose, and write text files if you allow it.
GitHubRead repositories, issues and pull requests, and comment if you allow it.
JellyfinSearch a Jellyfin library and see what is playing.
Home AssistantRead a smart home, and switch things within limits you set.
PiKVMCheck the status of a PiKVM. If you allow it, press its power buttons and type on its keyboard.
SSHRun a command on a remote machine, with a confirmation each time.
KubernetesRead a Kubernetes cluster, and change it with a confirmation and a policy for each cluster.

Models and media

Add-onWhat it adds
StudioA page to make images, video, 3D, speech and sound, and keep what you make.
TalkA spoken conversation with a model.
VoiceVoice recognition, the voice library and text to speech.
FaceIdentify a face in a photo, or check whether two photos show the same person.
Fine-tuningThe Fine-Tune page and chat tools for fine-tuning jobs.
QuantizationThe Quantize page and chat tools for quantization jobs.
Ollama searchSearch the Ollama library for models from the Models page.
Pirate Face searchSearch Pirate Face for open models from the Models page.

To build an add-on, see Build your own add-on.

Subsections of Catalogue

LocalAI docs > Add-ons > Catalogue

Chat apps

Each chat app connects a bot to one saved agent, so people can talk to the agent from that app.

  • Telegram

    Bind a Telegram bot to a saved agent, so people can talk to the agent from Telegram.

  • Slack

    Bind a Slack app to a saved agent, so people can talk to the agent from Slack.

  • Discord

    Bind a Discord bot to a saved agent, so people can talk to the agent from Discord.

Subsections of Chat apps

LocalAI docs > Add-ons > Catalogue > Chat apps

Telegram

Connect a Telegram bot to one of your saved agents. Anyone who messages the bot talks to that agent, and the answer comes back in Telegram.

At a glance

TopicDetail
What it addsA Telegram bot for one saved agent. Each sender gets their own conversation. It shows in the agent owner’s chats.
NeedsThe Saved agents (agents) and Chat connectors (connectors) permissions. Both are off by default for new users on a server with accounts. A new bot answers nobody until you add its allowed senders.
GuideTelegram in Chat apps and connections
LocalAI docs > Add-ons > Catalogue > Chat apps

Slack

Connect a Slack app to one of your saved agents. People talk to the agent in a direct message with the app, or by mentioning the app in a channel.

At a glance

TopicDetail
What it addsA Slack app for one saved agent. It uses Socket Mode, so LocalAI needs no public address.
NeedsThe Saved agents (agents) and Chat connectors (connectors) permissions, both off by default for new users on a server with accounts. A Slack app with Socket Mode on, and its two tokens. A new bot answers nobody until you add its allowed senders.
GuideSlack in Chat apps and connections
LocalAI docs > Add-ons > Catalogue > Chat apps

Discord

Connect a Discord bot to one of your saved agents. People talk to the agent in a direct message with the bot, or by mentioning the bot in a channel or thread of a server.

At a glance

TopicDetail
What it addsA Discord bot for one saved agent. The add-on keeps a Gateway link to Discord, so LocalAI needs no public address.
NeedsThe Saved agents (agents) and Chat connectors (connectors) permissions, both off by default for new users on a server with accounts. A Discord bot token with the Message Content Intent on. A new bot answers nobody until you add its allowed senders.
GuideDiscord in Chat apps and connections
LocalAI docs > Add-ons > Catalogue

Work tools

These add-ons give a chat tools for your work. None of them needs an outside account. Web search needs an API key only if you want a keyed provider.

  • Simple Office

    Make, read and edit Word, Excel, PowerPoint and PDF files from a chat, with no sandbox.

  • Sandbox: run Python on your files

    An add-on that runs commands and code for a chat in an isolated runtime.

  • Sandbox backends, profiles and network

    Choose where the Sandbox add-on runs commands, which profiles it offers, what the network rules are, and how it is packaged and upgraded.

  • Tables

    Tables is an add-on with databases that a chat can read and change, and that you can share.

  • Calendar

    At a glance Topic Detail What it adds One calendar for each user, inside LocalAI. A chat or a saved agent reads and changes events. There is no account to connect. Needs Nothing. There’s no account to connect. Ask a chat or a saved agent “what is on Thursday?” or “add dinner with Sam at 8” and it reads or changes your calendar. Install it and ask. There’s nothing to connect. Writes run at once, with no confirmation card.

  • Contacts

    At a glance Topic Detail What it adds One address book for each user, inside LocalAI. A chat or a saved agent looks up and keeps contacts. There is no account to connect. Needs Nothing. There’s no account to connect. Ask a chat or a saved agent “what is Marco’s number?” or “add Anna, anna@example.org” and it reads or changes your address book. Install it and ask. There’s nothing to connect. Writes run at once, with no confirmation card.

  • Web search

    Add search providers with a key and PDF reading to the web tools of a chat.

Subsections of Work tools

LocalAI docs > Add-ons > Catalogue > Work tools

Simple Office

Ask a chat to make, read and edit Word, Excel, PowerPoint and PDF files. It doesn’t need Sandbox.

At a glance

TopicDetail
What it adds11 tools: read, edit and create for Word, Excel and PowerPoint, and read and create for PDF. Results land in your Files. It runs on Linux and macOS.
NeedsNothing else. It doesn’t need Sandbox.
GuideOffice documents

If you need exact control of the layout, Sandbox can build the same files with Python. You can install either one without the other. See Sandbox: run Python on your files.

LocalAI docs > Add-ons > Catalogue > Work tools

Sandbox: run Python on your files

At a glance

TopicDetail
What it addsA bash tool that runs commands and code in an isolated sandbox with your files mounted. It makes charts, converts files and runs scripts.
NeedsA Linux host that can run KVM or gVisor, or a Mac with Apple silicon, and the chats and their files turned on.

Ask a chat to make a bar chart from sales.csv. It runs the code in an isolated sandbox with your files mounted and saves the PNG in your files. Sandbox can also convert a file or run a script. It runs on Linux, and on macOS with Apple silicon.

What you need

  • An administrator who installs the add-on. See the user guide.
  • A host that can run an isolated backend. The add-on tries KVM (Cloud Hypervisor) first, then gVisor. KVM needs /dev/kvm. gVisor needs runsc and permission to create a user namespace. If neither works, no command runs, and the chat says so.
  • The chats and their files turned on, because the sandbox works on your files.

Turn it on for a chat

  1. Open the Tools menu of the chat.
  2. Switch Sandbox on.

When it is on, the bash tool of the chat runs in the sandbox. Without it, a chat can run commands on the server only if an administrator allows it, and then nothing isolates them. See Running commands.

How it works

  • Each user and chat has its own sandbox. The model cannot name another user or chat.
  • Your files are mounted under /workspace/home. Each command starts there.
  • After each command, what changed is saved to your files as one change. You can undo it in the history of Files. If someone else changed the same file, their version stays and the sandbox version is saved as a copy.
  • A sandbox is suspended after 10 minutes without use.
  • An answer is cut at 64 KiB. A command stops after 120 seconds by default, and after 28 minutes at most.

Network

A sandbox has no network device. HTTP and HTTPS go through a proxy that asks LocalAI for each connection. The Network row in the Tools menu has three choices: Off, Custom (the package registries and the domains an administrator added) and All public sites. An administrator sets the most a chat can choose. On a fresh installation of the official Sandbox, new chats start at All public sites: commands can download from public sites and send data to them. To disconnect just one chat, choose Off in its Tools menu. That choice stays with the chat when you reopen it; other chats keep their own settings. Upgrading an existing installation does not widen its policy.

When a command asks for a host that the chat does not allow but the limit allows, the chat shows a card. Choose Allow once, Allow for this chat or Deny. See Network of the Sandbox commands.

What is installed

The base profile has Python with pandas, matplotlib, openpyxl, python-docx, python-pptx, pypdf and Pillow, and tools such as jq, ripgrep, sqlite3, zip, git and curl. The media profile adds ffmpeg, sox and ImageMagick. The opt-in office profile adds LibreOffice Impress, Writer and Calc, so a presentation or a document can be rendered to images and a workbook recalculated. With the media profile, the built-in assemble-media skill can join, trim and subtitle clips and build short videos with ffmpeg (a title card, a slideshow) as MP4. Look at the result before you use it. You pick the profile in the Tools menu, unless an administrator limits the choice. Programs cannot be installed with apt. See Sandbox profiles.

Troubleshooting

You seeDo this
The chat says it cannot run commandsOpen the Sandbox page. It names the backend that runs, or why none works. An administrator sees the reason for each backend.
gVisor fails with cannot read client sync fileThe host needs an AppArmor profile that allows user namespaces, and a container that may create them.
pip install failsThe network is Off. Ask an administrator to raise the most a chat can choose.

For the settings and the host backend, see Sandbox backends and settings.

LocalAI docs > Add-ons > Catalogue > Work tools

Sandbox backends, profiles and network

Set up the Sandbox add-on: where it runs commands, which profiles it offers, what its network rules are, and how it is packaged and upgraded. For what the Sandbox is for and how a chat uses it, see Sandbox.

Sandbox

The Sandbox add-on lets a chat run commands and code in isolation. It has one tool for the model, the action tool bash, which replaces the chat’s built-in bash ("shadows": "bash"), so a chat with the Sandbox sees one bash and it runs isolated. The model reads and changes files with the chat’s own file tools (read_file, write_file, edit_file, list_files, search_files and the others; see Chats): they work on the same files, so a script written with write_file runs with bash at once, and what bash writes is in the user’s files after the call. bash runs inside an isolated sandbox of the user and the chat, with the user’s files mounted under /workspace/home. Each call, and each background job, starts in the chat’s work folder (/workspace/home/Chats/<chat>/work, made before the call) and gets its path as $WORK; a chat with no work folder yet starts in /workspace/home. The description of bash tells the model to use $WORK or relative paths, to quote every path with double quotes, and never to type out a name with spaces or non-ASCII characters. The skill folders are not mounted in the sandbox. User-written scripts must be saved in the home with the file tools before execution. The status tool keeps its add-on name (addon__sandbox__status). Without the Sandbox, or with it off or unable to run, a chat may still run commands on the server itself, without isolation, when an administrator allows it; see Commands on this machine.

Sandbox also owns the docx, pptx, pdf, and xlsx Python/Paper procedures, references, and applicable license notices. They require the selected Sandbox provider to offer usable isolated commands, with explicit chat or agent grants. Their packaged skill trees contain text only; executable PDF helpers belong to the guest image. Invoke /usr/local/lib/localai/document-skills/pdf/content_qa.py and /usr/local/lib/localai/document-skills/pdf/verify_pdf.py with python3 through Sandbox bash. No host skill-folder mount is required. Dependency pins remain part of the guest image. Simple Office keeps its own tool-based procedures and needs no exec grant.

An older package of the add-on also served read, write, edit, glob and grep. They are gone: reinstall the package to drop them. A chat’s switch for the add-on is kept by add-on ID, so nothing a chat stored changes.

  • One sandbox per user and chat. The key is the pair of the user and the conversation. The user comes from the host. Nobody else reaches the sandbox, and the model cannot name another user or chat.
  • Changes are one change set. After every call the add-on commits what the code changed, as one change set in the history of the user’s files, so it can be undone there. If someone else changed the same file meanwhile, their version stays and the sandbox’s version is saved as a copy; the answer names the file and the copy. A file written outside /workspace/home (where bash starts) is not saved, and the answer names it too. In a chat whose agent works in one folder, /workspace/home is that folder (read only when the agent can only read it), and the chat’s own folder is at /workspace/chat, where files are saved as well; nothing else of the user’s files is in the sandbox. The change set belongs to the chat that ran the command, so the chat lists the files it saved (see Files that a command saved). A file change by someone else makes the sandbox rebuild its view of the files before the next call.
  • Limits. At most 4 sandboxes for a user (the oldest idle one gives way to a new one) and 16 in all. When the 16 are used, the oldest suspended sandbox of any user gives way to a new one, so sleeping sandboxes never keep a user out; a call is refused with a busy answer only when every sandbox is running. A sandbox that is idle for 10 minutes is suspended and wakes on the next call. A sandbox is removed 24 hours after it was made. An add-on restart removes every sandbox it left, suspended ones too. When the add-on stops (it is disabled, or the server shuts down) it first stops all its sandboxes, for at most 8 seconds. The supervisor waits for that before it kills the add-on process; a server that is killed with SIGKILL cannot do this, and the next start removes what was left. When a suspended sandbox is removed, the host backend also stops the processes it left running.
  • Background jobs. The add-on runs the jobs of the chat’s job tool (see Execution provider and status payload) in the chat’s sandbox, in the add-on process. A job’s output (stdout and stderr together, the last 256 KiB, with absolute byte offsets) and its exit status come from the process, not from any connection of the host, so they stay when the call that started the job returns. While a job runs, its sandbox is not given way to another chat, not suspended, not refreshed and not removed at its age. Input goes to the job’s standard input; a call waits at most 5 seconds for the job to read it. A kill sends SIGTERM (or SIGINT) to the job’s process group and SIGKILL 10 seconds later; a job ends after 2 hours the same way. When a job ends, what it wrote is committed as one change set (Job job-3: build) before the sandbox is let go; a file it writes is also in the next bash call’s change set. At most 32 jobs run in the add-on process; the host keeps the limits per chat and per user. A finished job stays readable for 30 minutes, at most 16 per chat. An add-on restart ends every job: the host reads the jobs as gone. A call that must make the sandbox again (a new profile, agent folder or mode) ends the chat’s jobs first and says so at the top of its output.
  • The network of a job. While no call of the chat runs, the proxy lets a connection through under the operation of the oldest live job of the sandbox (the proxy cannot tell which process opened it; during a call, every connection counts against the call). Each job has its own 64 MiB up and 4 GiB down. A host that the chat’s preset or an always-allowed rule allows passes. A host that needs the person’s yes is blocked, since nobody is there to answer a card: the job’s output gets Blocked by LocalAI: host:port needs the user’s approval, and nobody can be asked while no turn of this chat runs (a background job), and the audit line has the reason unattended. With neither a call nor a job, every connection is refused as before.
  • Output. A tool answer is cut at 64 KiB, and a bash call stops after its timeout (120 seconds by default, 28 minutes at most, so the answer is back before the 30-minute limit of an action call).
  • Without a backend. When the host has no way to run sandboxes, nothing runs. A chat is not offered the Sandbox tools then: it gets one stand-in tool that tells the model why, so the model answers that it cannot run code instead of trying. Without the add-on, or with it switched off for a chat, the chat’s model is told that it cannot run commands, and the chat’s Tools menu says so to the user; see Running commands. A tool that is called anyway answers “This host cannot run commands.” The same happens when the Files workspace is off, because a sandbox needs the user’s files.
  • Where you see the state. The Sandbox page tells every user which backend runs the code, or that no backend works, or, while the host backend is in use, that commands run directly on this machine with no isolation. An administrator also sees, on that page and in Settings, the reason each backend does not work and what to do. An administrator can choose the host backend there: the page shows the warning that commands then run on this machine without isolation, and asks for the typed confirmation before it saves. A user who is not an administrator is told that only an administrator can change this.
  • Undo. Each bash call that changes files is one change set in the history of the user’s files (Files, History), and it is undone there, one call at a time. A whole turn is not one change set: the sandbox runs in the add-on process and the Files service commits each write of a tool on its own. The file tools of the chat itself work the same way, with an Undo note under the call.
  • Shared code. The Host backend, the manager that keeps one sandbox per user and chat, and bash live in core/services/studio/sandbox (host, runner). The add-on runs them over its host operations; the chats’ built-in bash runs the same code over the workspace store directly.

Sandbox backends and settings

The add-on runs commands in one of these backends, chosen by an administrator on the Settings tab of the Sandbox details on the Add-ons page (the Sandbox page links to it):

ChoiceWhat it is
AutomaticKVM (Cloud Hypervisor) when the host has it, then gVisor, then a macOS virtual machine (on a Mac with Apple silicon), otherwise nothing. It never picks the host backend, not even as a last resort.
gVisorrunsc with user namespaces. Needs runsc (the package carries it), taskset, and on Ubuntu 24.04 and later an AppArmor profile (the package carries gvisor-profile, which prints it).
KVMCloud Hypervisor with virtiofsd, mke2fs, debugfs and /dev/kvm. The package carries Cloud Hypervisor and, on amd64, virtiofsd. bwrap is used when present and not in a container.
macOS virtual machine (vz)One Linux VM for each chat, run by the Virtualization.framework of macOS. Needs a Mac with Apple silicon and the add-on package for macOS, whose executable carries the virtualization entitlement. The Settings tab shows it only on a Mac, or when it is the saved choice.
OffNo sandbox. Every tool answers that the host cannot run commands.
HostRuns commands on the host as the user LocalAI runs as, with no isolation.

What the Sandbox needs to run isolated

The Sandbox reports a backend as isolated or as host (see Execution provider and status payload). Only gVisor, KVM and the macOS virtual machine report isolated. The host backend runs the command as a normal process of the user LocalAI runs as. No kernel boundary separates it from the rest of the machine, so it is never isolated.

  • Document skills. The docx, xlsx and pdf skills of the Sandbox are offered only when the Sandbox reports an isolated backend. With the host backend, with Off, or when no backend works, the chat does not get them.
  • gVisor. The add-on starts runsc with --network=none, a root file system in memory (--overlay2=root:memory), --directfs=false and --ignore-cgroups. It sets no --platform flag, so runsc uses its default platform and not the KVM platform. gVisor needs no /dev/kvm, no cgroup and no extra capability. It needs a non-root user, runsc and taskset, and permission to create a user namespace: the container seccomp profile and, on Ubuntu 24.04 and later, AppArmor must allow it. The add-on checks this at start with a small test sandbox.
  • KVM. Cloud Hypervisor needs /dev/kvm for the user LocalAI runs as. Pass the device to the owner container only when you choose or expect this backend.
  • macOS virtual machine. The add-on runs each sandbox as a VM of Apple’s Virtualization.framework, with the same guest image, kernel and guest agent as KVM, so the guest has a kernel of its own and no network device. It needs a Mac with Apple silicon, the linux/arm64 variant of the guest image, and the com.apple.security.virtualization entitlement on the add-on executable (the macOS package is signed ad hoc with it). The add-on needs no other program: it converts the image and reads and makes the disk images in its own code. The limits of a sandbox become the CPU count and the memory of the VM, within what the Mac allows. Two differences from KVM matter. First, the VMs belong to the add-on process: when the add-on stops or crashes, every VM stops with it, and the next start removes the sandboxes it left. Second, a sleeping sandbox keeps its files but not its running programs: macOS does not let the add-on save the memory of a VM, so a sandbox that sleeps after 10 minutes of idle time (see Limits above) wakes with a fresh guest over the same files. A command or a background job that was still running in it is gone, as after a refresh. A sandbox that runs a background job does not sleep. The Mac needs no setting and no manual download for the guest image: the add-on pulls the linux/arm64 image of each profile when it prepares that profile, with the progress shown in the status of the profile, and keeps it in its data folder. The base image is about 220 MB to download and needs about 0.8 GB of disk once converted; media is about 370 MB and 1.1 GB; office is about 365 MB and 1.4 GB. The first sandbox of a profile also converts the image, which takes a few seconds. After that a sandbox is ready in under a second.
  • Automatic. The add-on tries KVM, then gVisor, then the macOS virtual machine. If /dev/kvm is missing, it uses gVisor, so an owner container without /dev/kvm still has an isolated sandbox. On a Mac the first two are not available, so it uses the macOS virtual machine.

When the owner runs in a container, the container that runs the add-on must meet these needs. In a split deployment that container is the owner, not the frontends.

The network limit and the presets (Off, Custom, Allow all) apply to the commands of the Sandbox because every connection goes through its proxy, which asks the host with egress.check. On current master, the host shows the limit as applied to an add-on’s commands only when the provider reports that it enforces it. A provider that only reports isolation does not count. This behavior can change in a later release.

The Settings tab lists the backends of the host, each with its state (in use, ready or unavailable); the reason a backend does not work is under Details. When gVisor fails with exit status 128 and cannot read client sync file, the row also says that gVisor needs an AppArmor profile that allows user namespaces and a container that may create them, and links to The Sandbox in the LocalAI container. The add-on asks for the network-policy, tool-providers and sandbox-profiles host controls, so the same tab also holds the sandbox profile policy, the network of the Sandbox commands (the limit, the preset of a new chat, the ports, the extra registries, the always allowed hosts, private networks, the audit retention and the audit) and the bash row of Settings > Tools, and saves them like the Settings page. An explicit choice is never replaced by another when it does not work: the tools say they cannot run.

The Host backend is for a machine that can run neither of the others. It is not available when the add-on runs in WSL 2 for LocalAI on Windows. Choosing it takes two steps. The page shows a plain warning and asks the administrator to type the sentence I understand that commands run on this host without isolation. The add-on then saves the choice. The confirmation is forgotten when another backend is chosen. The backend refuses to start when LocalAI runs as root. Every command is logged with the name of the chat user, in the LocalAI log with the prefix [sandbox] (LocalAI writes everything an add-on prints to its output or error into its own log, one line at a time, cut at 4096 bytes), and the Settings tab of the Sandbox details (for administrators) shows a notice for as long as the host backend is the one in use. The model sees it in the answer of the status tool. Treat the machine as one that code can harm.

The choice is kept in the add-on’s data directory. Changing it removes the running sandboxes; what they did is already in the users’ files.

The guest image, runsc and the KVM programs are not part of the add-on’s source. A release sets main.guestImage (the image of the base profile, by digest) at build time. It sets main.profileImages (media=<ref>,office=<ref>) for the images of the media and office profiles. A profile without an image is not offered by that release. The checksums of the runsc and of the Cloud Hypervisor and virtiofsd it was tested with are compiled into the add-on (runscPins and kvmPins in addons/sandbox/cmd/sandbox), and tests keep them equal to package/runsc.json and package/kvm.json. A build without a guest image reports that on the page, and only the host backend can run.

Sandbox profiles

A profile is an environment a sandbox can run in: a name, what it is for, the limits of one sandbox (CPUs, memory, disk) and the programs it has. The Sandbox add-on declares its profiles in its manifest, in the execution.profiles list of the bash tool. Each profile it declares has an image the release built and pinned by digest. An administrator can add more with images of their own (see Custom profiles); users and models cannot. The release ships these:

ProfileForProgramsCPUsMemoryDisk
basePython, documents, PDF and the usual command-line tools.python3 (pandas, matplotlib, openpyxl, docx, pptx, pypdf, Pillow), pip, jq, ripgrep (rg), sqlite3, zip, unzip, file, tree, poppler (pdftotext, pdftoppm), git, curl22048 MiB10240 MiB
mediaBase plus ffmpeg, sox and ImageMagick to cut and convert audio, video and images.python3 (pandas, matplotlib, openpyxl, docx, pptx, pypdf, Pillow), pip, jq, ripgrep (rg), sqlite3, zip, unzip, file, tree, poppler (pdftotext, pdftoppm), git, curl, ffmpeg (with ffprobe), sox, ImageMagick (magick, convert), rsvg-convert (renders SVG to PNG, also the SVG reader of ImageMagick)24096 MiB20480 MiB
officeBase plus LibreOffice Impress, Writer and Calc and fonts to render presentations and documents to images and to recalculate workbooks.python3 (pandas, matplotlib, openpyxl, docx, pptx, pypdf, Pillow), pip, jq, ripgrep (rg), sqlite3, zip, unzip, file, tree, poppler (pdftotext, pdftoppm), git, curl, LibreOffice Impress (soffice, renders .pptx to PDF), LibreOffice Writer (soffice, renders .docx to PDF), LibreOffice Calc (soffice, recalculates .xlsx and renders it to PDF), fonts (DejaVu, Liberation, Carlito (as Calibri), Caladea (as Cambria))24096 MiB20480 MiB

base is the fallback and is always allowed. The model is told the profile its chat runs, the programs it has and the programs the other profiles add, in the prompt of each turn, and the description of bash names the profile. The text is built from the manifest, so it never differs from the image. The command line runs as an unprivileged user and apt is blocked by the proxy, so nothing can be installed from inside the guest with a system package manager. pip can install Python packages within the chat’s network setting (see Network access). Adding a program means a new guest image. The build of each image fails when a program of its profile is missing or does not start (addons/sandbox/images/guest/check-tools.sh <profile> reads the checks from the manifest).

The office profile. It is base plus LibreOffice Impress, Writer and Calc (no Java) and the fonts DejaVu, Liberation, Carlito and Caladea, so a presentation or a document can be rendered to a PDF and to images and looked at, and a workbook can be recalculated. Carlito and Caladea have the metrics of Calibri and Cambria, so line breaks match Office. It is opt-in: it is not the default, it is not part of media, and it needs no policy entry (with no policy every user may use it). The pptx, docx and xlsx skills tell the model to switch to it before it builds a file, and give it helpers, which every profile has in /usr/local/lib/localai/document-skills/<format>/: pptx/pptx_guard.py, which checks the sizes, the place and the text fit of the shapes with pure Python; render.sh in each of the three folders, which renders the slides or pages to PNG files with a private LibreOffice profile directory; and xlsx/recalc.sh, which recalculates a workbook and saves a copy with the cached values (openpyxl.oracle.recalc does the same and keeps the original package). A sandbox that runs the profile reserves 2 CPUs, 4 GiB of memory and 20 GiB of disk. Rendering a 10-slide deck, rendering a 20-page document and recalculating a workbook each used under 200 MiB, so a host that needs the room can cap memory_mib far lower.

matplotlib draws charts without a display: it writes PNG and SVG files, and the model can save them in the user’s files. Its font cache is kept in /tmp.

Choosing a profile. The profile of a chat is the first of these that exists and that the user may use:

  1. The profile the person picked in the chat. The picker sits next to the network switcher in the Tools menu of the chat.
  2. The profile of the saved agent of the chat (sandbox_profile). Unattended runs of an agent (triggers, jobs, connectors) use it too.
  3. The default profile of the administrator (default of the policy below), then media, then base. With media as the default, each sandbox reserves the limits of media (2 CPUs, 4 GiB of memory, 20 GiB of disk); an administrator who wants the smaller base sets it as the default.

Switching the profile restarts the sandbox at the next command. The user’s files stay. Running processes and installed packages are lost, and the picker says so before you switch. The model can switch too with one tool, sandbox_profile: the action list shows the profiles with their programs, and the action use switches. It is in the Run commands group of the chat and follows the rules of the picker: the user’s own chat and the policy of the administrator. A skill can name the profile it wants with the frontmatter field sandbox: media (see Chats). It is a hint: the model is told, may offer the switch and never switches without the person’s yes.

Policy. The administrator sets the policy on the Settings tab of the add-on (the owner host setting sandbox_profiles, with the same owner rules as the network settings). Everything is open by default: with no policy every user may use every profile.

KeyMeaning
defaultThe profile a new chat gets. Empty: media, or base when the add-on has no media profile.
accessFor a profile, the roles (admin, user) and the users who may use it. A profile that is not listed, or has no roles and no users, is open to everyone.
memory_mib, disk_mibThe most memory and disk one sandbox may have, whatever the profile asks. 0 is no cap.
pin_previousThe profiles that run their previous image. See below.

Images. When the Sandbox add-on starts, it prepares the default image in the background. Selecting an optional profile starts its download without running a command. Opening the picker does not start a download. If a command needs an image that is not ready yet, it shares the download. The picker and the waiting tool call show progress (for example, “Preparing the Media image, 40%”). Ordinary chat does not wait. After an add-on upgrade, the add-on pulls the new image of each profile this host used before in the background, so the first command after the upgrade does not wait. A chat keeps its sandbox, and its image, until the sandbox restarts. The picker then shows that a newer image is available. The add-on keeps the current and the previous image of each profile and deletes the older ones, except an image that a running sandbox still uses. If a new image breaks something, an administrator can add the profile to pin_previous: new sandboxes of the profile then start from the previous image.

If a profile is missing in the release, or its image cannot be pulled, the command runs in base. The output of the command says so (“The media sandbox profile is not available (…), so this command ran in the base profile”), and the picker shows the same notice. The add-on never runs a command in a different profile without saying so. A failed pull is not retried for five minutes, so a broken registry does not stall every command. The images are kept on each machine that runs the add-on: in a cluster every node pulls its own, while the choice of the chat and the policy are shared.

API. GET and PUT /api/chats/{id}/sandbox-profile read and set the profile of a chat, GET /api/chats/sandbox-profiles lists the profiles for a saved agent, and GET /api/chats/admin/sandbox-profiles is the administrator’s view with the state of the images. There custom marks a custom profile and custom_supported says that the add-on takes them. POST /api/chats/admin/sandbox-profiles/{profile}/prepare (administrators) prepares the image of a custom profile now: it answers 202 and the view shows how it went. It takes a profile ID only. A shipped or unknown ID is 400; 409 means that the add-on takes no custom profiles, or that its backend cannot run one. The real error of a custom image that failed is shown only in this administrator view. Chats, the model and users read only its image could not be prepared, also in the chat of an administrator. The Sandbox gives the real error only for the hostImageErrors argument of its status read, which the server sends for this view; /api/addons/dispatch and /api/addons/relay refuse a request that carries it. With an older server or add-on the error can stay hidden.

Custom profiles

An administrator can add up to 5 profiles of their own, each with an image that has the toolchain their users need. A custom profile appears after the shipped ones in the chat picker, the profile of a saved agent, the sandbox_profile tool and the note for the model, and the policy above applies to it the same way: access, memory_mib and disk_mib. With no access entry every user may use it. pin_previous does nothing for a custom profile, which has no previous image: to go back, put the old digest in image.

In the Settings tab. Under Custom profiles, select Add profile and fill in the fields. Write the programs of the image as one list separated by commas. A new profile appears in the list of profiles at once, so you can limit who may use it before you save. One Save writes the profiles and the policy together. A saved profile keeps its ID. It shows the state of its image, the error when the image could not be prepared, and Prepare now. A backend that runs no images shows the saved profiles as not offered. With an add-on that does not take custom profiles, the tab asks you to update it.

The list is the owner host setting sandbox_custom_profiles. A change replaces the whole list, and [] removes it. Every key of an entry is required:

KeyMeaning and limit
idLower case letters, digits and -, starting with a letter, at most 32 characters. Not base, media or office, and not repeated.
title, descriptionOne line of plain text, at most 40 and 200 characters.
imageA registry image by digest (name@sha256:...), at most 512 characters. A tag is refused.
cpus0 (the provider’s default) to 64.
memory_mib0 (the provider’s default) or 256 to 262144.
disk_mib0 (the provider’s default) or 64 to 1048576.
toolsAt most 24 tool names that the image adds to those of base, each at most 40 characters, not repeated. It can be empty.

The picker, the note for the model and the results of sandbox_profile do not show the image reference. In the error text of a failed image it reads “the image”.

Requirements of the image.

  • It is built FROM the base guest image of a Sandbox release. Other images are not supported.
  • It is for linux and the CPU architecture of the machine that runs the add-on.
  • It keeps the user agent (uid 1000) with the home /home/agent, and bash.
  • It is in a registry that allows an anonymous pull. LocalAI uses no registry login, and a refused pull says so.
  • On the gVisor backend, the unpacked files of the image can be at most 16 GiB.
  • The programs you name in tools are not checked. The model is told they are there.

The host backend runs no images, and off runs no commands. While the add-on uses one of them, custom profiles are not offered, and the list is kept. If the server cannot tell which backend runs, it offers them, and a command that cannot run one runs in base and says so.

Build one. The base image of a release has the tag of the release, for example quay.io/go-skynet/sandbox-guest:v<version>. Read its digest with:

docker buildx imagetools inspect quay.io/go-skynet/sandbox-guest:v<version> --format '{{.Manifest.Digest}}'

This example adds Go. We have not built it against a published guest image, so check the result before you rely on it:

# Use the digest of the base guest image of your release.
FROM quay.io/go-skynet/sandbox-guest@sha256:<digest>
# The image sends apt to the proxy of a running sandbox, which a build does
# not have: DIRECT turns the proxy off for these two commands.
RUN apt-get -o Acquire::http::Proxy=DIRECT -o Acquire::https::Proxy=DIRECT update \
 && apt-get -o Acquire::http::Proxy=DIRECT -o Acquire::https::Proxy=DIRECT install -y --no-install-recommends golang \
 && rm -rf /var/lib/apt/lists/*

Other tools that download during a build may read the proxy variables of the image (HTTP_PROXY, HTTPS_PROXY and their lower case forms): unset them in that RUN. Do not change them with ENV, because a running sandbox needs them. Push the image and put its reference by digest in image.

Preparation and upgrades. Choosing the profile in a chat starts the download, and so does the first command that needs it. Every machine that runs the add-on keeps its own cache and pulls for itself; the add-on does not pull custom profiles in the background after an upgrade. When a custom image is prepared, the guest agent, the kernel and /usr/local/lib/localai (the document skill helpers) are taken from the base image of the installed release, so an upgrade prepares the image again. Your packages, Python libraries and proxy settings stay as you built them.

Failure and removal. If the image cannot be prepared, commands run in base and say so; an older prepared copy is not run. A chat or an agent that names a removed profile gets the profile it would get for an unknown one. The add-on learns of a removed or changed profile at the next command or preparation that reaches it, and then deletes the old image once no sandbox runs it.

Shared state. The list is part of the owner’s host policy: every frontend reads it from the owner each time it needs it, and only an administrator can change it. One change can set both sandbox_custom_profiles and the access rules in sandbox_profiles. When a frontend cannot read the list, it offers no custom profile, commands run in base, and the chat shows base with the reason.

Upgrade first. This release of the Sandbox needs a LocalAI with add-on feature level 22: an older LocalAI refuses to install it. When you run several frontends, upgrade every one of them before you first set sandbox_custom_profiles. A frontend that is not yet upgraded cannot read the owner’s host policy once the key is set, so its network rules for commands, its tool provider pins and its sandbox profile policy fail closed.

A LocalAI older than the release that added this key cannot read the host settings document once the key is set. Setting the list to [] does not undo this: the document also keeps the earlier states of the policy, for the replay of repeated writes. If you may need to downgrade, copy the host settings document before you first set this key. Restoring that copy also reverts every other owner setting changed since the copy.

Network access

The guest of a sandbox has no network device: no NIC, no TAP device and no user-mode network stack. A command reaches the network only through one proxy, on guest port 3128, which the guest image sets in HTTP_PROXY, HTTPS_PROXY, pip, apt, git, npm and GOPROXY. The guest agent forwards each connection to that port to the add-on, over vsock (KVM) or a Unix socket (gVisor), and the add-on’s proxy asks LocalAI about each connection with the host operation egress.check. LocalAI decides; the add-on dials. The proxy never decrypts TLS and holds no certificate the guest trusts.

The guest image has curl, git, pip and the CA certificates, and all of them use the proxy (the programs of each profile are under Sandbox profiles). The model is told so at each turn, with the chat’s preset. To read or search web pages it is told to prefer web_fetch and web_search when the chat has them (the built-in ones or the Web add-on’s), and to use curl for APIs, downloads and installs. With the network off, the note says that nothing is reachable.

Commands that run on this machine (the host backend, or the chats’ built-in bash) have the network of the server: none of this applies to them, and the settings say so.

On a fresh installation of the official Sandbox, both the limit and the new-chat preset start at Allow all. For example, curl https://example.com works without an approval card. Commands can also send data to public sites, including data they can read in the workspace. Under Add-ons → Host access → Sandbox, the network-check permission is granted; blanket host access stays off. Upgrades preserve the existing policy, including an implicit Off.

To restrict all chats, open Add-ons → Sandbox → Settings and set the limit to Custom or Off. If host policy withholds the network control, this section explains the restriction without offering an editor. A chat cannot approve a connection that the host forbids. To restrict just one chat, use Tools → Network in that chat; its choice persists without changing any other chat or the new-chat default.

Presets. A chat has one of three presets, and an administrator sets the ceiling, the widest preset any chat may use:

PresetWhat a command reaches
OffNothing.
CustomThe HTTPS hosts of the package registries below, on port 443, plus the domains an administrator listed (extra registries, always allowed hosts and exact destinations, see below). The preset is stored as registries in chats, agents and the API.
Allow allEvery public host on a globally allowed port, plus individually granted destinations.

The preset of a chat is the lower of its own choice and the ceiling (chats_egress_ceiling). A new chat starts with chats_egress_default, capped by the ceiling. The preset lives in the chat’s record on the server, never in a file of the workspace: the sandbox can write the home, so a file there could be changed by the code it is meant to confine. A preset never reaches a private, loopback or link-local address, nor the server’s own addresses, nor a cloud metadata address. The server’s own addresses are the same list for web_fetch and the Sandbox: the interfaces of the server, loopback, and the addresses that the host of the external base URL resolves to (read again every 60 seconds); the add-on also refuses the interfaces of its own machine. With chats_egress_allow_private on, a host that an administrator allowed by a rule or a card answer may reach private addresses; the metadata addresses stay refused. See Runtime settings for the chats_egress_* settings.

Allowed destinations. In Add-ons → Sandbox → Settings → Allowed destinations, an administrator can grant an exact DNS hostname and TCP port, for example git.example.com:22 and git.example.com:8080. Enter each pair separately. Ports 1–65535 are valid, including 22 and 25. Bare names, URLs, ranges and wildcards are not entries. An empty list leaves the existing policy unchanged. A grant applies to the isolated Sandbox only: it does not add a port to the global list, cover another hostname on the same IP, or grant any other add-on access.

The host checks each new proxy request. Remove git.example.com:8080 and the SSH grant on git.example.com:22 still works. Removing an entry withdraws that exception; access independently permitted by ordinary policy is unchanged. To block just one pair in your chat, deny that host and port in Tools → Network. A chat denial, chat Off, or ceiling Off takes precedence over a grant. Address checks, connection limits and auditing still apply.

Using the proxy. If the service speaks HTTP, curl http://git.example.com:8080/status uses the guest HTTP proxy. For other TCP protocols the client must support HTTP CONNECT through 127.0.0.1:3128 or use a compatible transport helper. A grant does not give the guest a network interface. Port 80 requires ordinary proxied HTTP, not CONNECT; a tunnel to port 443 requires TLS with the matching server name. On other tunnel ports the server may speak first, but TLS clients must still send the matching server name. Grant only endpoints you trust: a grant permits connections to a service, not just one URL, repository or read operation.

Git over SSH. With github.com:22 granted, git clone git@github.com:OWNER/REPO.git uses the guest’s proxy-configured SSH client. Use a repository-scoped, read-only deploy key if the guest only needs to read.

The grant supplies neither a login nor a trusted host key. Provision the verified server public host key in the guest user’s ~/.ssh/known_hosts using a fingerprint from a trusted source. Provision a separate guest identity (for example ~/.ssh/id_ed25519, mode 0600) and authorize its public key on the Git server. Do not copy the LocalAI server’s keys, paste private keys into chat, or store them in shared workspace files. Guest commands can read credentials accessible to the guest user. The Sandbox does not forward the server’s agent or import its credentials. A proxy 403 means the tunnel was denied; Host key verification failed means the server is not trusted; Permission denied (publickey) means SSH reached the server but authentication failed.

Package registries. The list ships with LocalAI (core/services/studio/egress/registries.json) and changes only by a reviewed pull request that also changes this table and is named in the release notes. Every entry is an exact host name, HTTPS on port 443, with no pattern. Upload hosts (such as upload.pypi.org) are not on it, and neither is raw.githubusercontent.com, which serves any user’s content. An administrator adds exact hosts with chats_egress_extra_registries, for example an internal mirror (which is private and so also needs the private switch and an administrator’s rule). Extra registries are registries: they follow the registry rules (HTTPS only, and only with the Custom preset or a card). To allow one more host for any request, use the list below.

Always allowed hosts. An administrator can list exact hosts or whole-label patterns in chats_egress_allowed_hosts (at most 64; an optional :port pins the port). A host on the list is allowed, with no card, in every chat whose effective preset is Custom or Allow all, on any request kind (plain HTTP as well as HTTPS) and on the allowed ports (chats_egress_ports), or only on the pinned port. With the preset off in a chat nothing on the list is allowed there, and with the ceiling off the list does nothing at all. The list does not widen the guard: a private, loopback, link-local, metadata or server address is not allowed by it, only by the private switch together with an administrator’s rule or card answer, and the TLS server name must still match, on the pinned port as on 443. An administrator’s entry also wins over a deny the person stored in one chat before the host was listed. The audit line of a request this way has the reason allowed_host. The chat’s Network panel shows this list, with the extra registries, to the person under Custom domains, as written (patterns such as *.example.com and * included). An administrator gets an Edit domains link there that opens the Settings tab of the add-on at the network section; everyone else sees a note that an administrator manages the list. The list is not a second store: the panel reads chats_egress_extra_registries and chats_egress_allowed_hosts.

Patterns are *.example.com (every descendant, including a.b.example.com, but not example.com) or * (any public destination). List the apex separately when needed. Names normalize case, IDNA and a trailing dot. Patterns support an exact port, such as *.example.com:8443 or *:443; the configured allowed ports still apply. Partial-label globs, wildcard ports, URLs and paths are invalid. Extra registries remain exact hosts only.

Wildcard grants remain inside the administrator’s ceiling: a Custom ceiling (registries) requires a listed registry and TLS, Allow all permits public destinations, and Off blocks them all. For compatibility, existing exact entries retain their exception for non-registry public hosts under the Custom ceiling, including plain HTTP. Wildcards never grant private access, even with the private switch enabled. DNS resolution, rebinding protection, metadata/server exclusions and TLS server-name checks still apply; a name match alone never authorizes a dial.

RegistryHosts
Python (PyPI)pypi.org, files.pythonhosted.org
JavaScript (npm)registry.npmjs.org, registry.yarnpkg.com
Go modulesproxy.golang.org, sum.golang.org
Rust (crates.io)index.crates.io, static.crates.io, crates.io
Ruby (RubyGems)rubygems.org, index.rubygems.org
Java (Maven Central)repo.maven.apache.org, repo1.maven.org
GitHub releases and archivesgithub.com, codeload.github.com, objects.githubusercontent.com, release-assets.githubusercontent.com

What the proxy checks. The host of a request goes through the same guard as web_fetch (Addresses inside your network): a canonical name or literal, no address zone, no numeric tricks, no localhost. A host the guard refuses is never resolved, so it does not leak through DNS. A name is resolved once; when any answer is not allowed the connection is refused, and the proxy dials the address it checked. The addresses of the node’s own interfaces, the whole loopback range and the server’s own addresses that LocalAI sends with each allow (see egress.check) are refused even when public. Only ports 80 and 443 by default (chats_egress_ports; 22 and 25 cannot be granted by this list; either needs its own exact destination grant). HTTPS goes as CONNECT host:443: after the tunnel opens, the first TLS record must be a ClientHello whose server name is the CONNECT host, or the tunnel is closed (this stops a tunnel to one tenant of a CDN that talks to another). A CONNECT to another allowed port (an always-allowed host:8443, or a port added to chats_egress_ports) may carry any protocol, and the server may speak first, so the proxy waits for nothing; but when the first bytes the command sends are a TLS record, they must be a ClientHello whose server name is the CONNECT host too, or the tunnel is closed with the audit reason sni. Plain HTTP goes as an absolute http:// URL: each request of a kept-alive connection is decided on its own, the Proxy-* and hop-by-hop headers are dropped, a Host header that names another host is refused, and every request gets a new upstream connection. CONNECT to port 80, the origin form, https:// in absolute form and Upgrade are refused with 400. The proxy follows no redirect: the guest’s client follows it with a new request, which is checked again.

Cards. When a command asks for a host that the chat’s preset does not admit but the ceiling would, and a person watches the chat, LocalAI stores a card in the chat and the person sees it in the chat: A command in this chat wants to reach host:port (an international host name is checked and shown in its ASCII form, so a look-alike name such as pаypal.com with a Cyrillic а reads xn--pypal-4ve.com; a name with no valid ASCII form is refused), with Allow once (the rest of that command), Allow for this chat (a rule) and Deny (a deny rule, so the host does not ask again; it can be removed in the network panel). The connection waits for the answer for up to 60 seconds, and never past the call’s own timeout, so pip goes on by itself after the click; without an answer it gets the 403 line with the user did not answer. A late answer still counts: Allow for this chat stores the rule, and Allow once lets the next call of the chat reach the host within ten minutes. A card nobody answered expires when the chat’s turn ends; it stays visible as Not answered and can still be answered, with the same buttons, under the call that asked and in the network panel of the Tools menu. Ceiling off never shows a card; ceiling registries shows one only for a registry host (so a chat on Off can approve pypi.org); ceiling all for any public host. A host inside your network shows a card only with chats_egress_allow_private on, and only an administrator can allow it. A chat shows at most three cards at a time and one per host and port; a second connection to the same host waits on the same card. A card names the turn that asked it, and waits only while that turn holds the chat and its 60 seconds have not run out. When the frontend that ran a turn dies, its cards do not stay pending: they read as Not answered at once, do not count toward the three, and expire in the chat record when the reaper ends that turn, when the next turn starts, or when the next card is asked, whichever comes first. They can still be answered late, like any expired card. Unattended runs (triggers, connectors) and sub-agents get no card: the block is in their output. The card is written to the chat record before the answer is sent on the chat bus, and the waiting check reads it again every two seconds, so an answer given through any frontend reaches it within two seconds even when the bus message is lost. When the ceiling goes down while a card waits, the card is refused, and every answer to it gets 400 egress_above_ceiling (the same answer twice to an answered card is 204; another answer is 409 already_answered). A card the ceiling cannot admit shows no buttons: it says that network access is off (or limited) on this server, names who can change it, and gives an administrator a link to the Settings tab of the add-on that runs the commands (the network-policy host control). The Network row of the chat’s Tools menu says the same (Off: the administrator has not allowed network access.) when the ceiling is off or below all.

What the model reads. When the Sandbox serves bash, each turn tells the model the preset in one line, such as Network for commands: package registries only (Python (PyPI), …). A blocked host asks the user; do not try to get around the proxy. When no card can appear (a ceiling no wider than the preset, an unattended run, a sub-agent), the line says instead that a blocked host is refused and nothing asks the user, so the model names the host it needs in its answer. A blocked request gets 403 with one line of text in the tool output, for example Blocked by LocalAI: example.com:443 is not allowed for this chat (off). Ask the user to allow it. With ceiling off, or a chat preset above the ceiling, the note of the turn says that the server’s setting keeps the network narrower, that no approval changes it, and that the model should tell the user instead of waiting or retrying. A request blocked for that reason gets the line blocked by the server’s setting for the Sandbox network, not by a missing approval; a block that waits on a person keeps the the user did not answer line.

Only while a command runs. The proxy knows the call in progress of each sandbox. A connection while no call runs (a background process left by an earlier command) is blocked with the reason idle, nothing is asked, and it is audited at the next call. When a call ends, every tunnel it opened is closed. The proxy caches no verdicts. Every new upstream connection requires a fresh egress.check from the owner, including each HTTP request on a kept-alive guest connection and every CONNECT tunnel. A tightened policy or an unavailable owner blocks the next connection immediately, even for the same host, port and command. Already-established streams may finish under their original authorization; a policy change does not interrupt them. Idle, byte and call-end limits still apply, but no verdict TTL bounds stream lifetime.

Limits. These are fixed in this release:

LimitValue
Concurrent connections of one sandbox32 (the guest agent caps all its ports at 64)
New connections of one sandbox20 per second, burst 40
Concurrent connections of the add-on process256
Dial timeout10 s
Idle tunnel (no bytes either way)120 s
Bytes from the guest, per call64 MiB
Bytes to the guest, per call4 GiB

Audit. Every verdict is a line of the audit (who, which chat, host, port, kind, verdict, reason), and every allowed connection adds a done line with the address it reached, the bytes each way and how long it lasted. The reason names the rule that decided: preset, allowed_destination (an exact host and port), allowed_host (the administrator’s always-allowed list), rule, once, denied, ceiling, port, private and the others the proxy adds, such as idle and sni. Lines older than chats_egress_audit_days (default 30) are removed daily, with the lines of the audit of the commands run on this machine.

What fails. Tools that connect directly, destinations not authorized by policy, direct TCP and UDP, ICMP and DNS from the guest fail, as before.

Residual risks. The presets bound what a command reaches; they do not make every reachable host safe:

  • A registry that takes uploads (npm publish with a token the command holds) can carry data out under “Custom”, and so can any host under “Allow all”. The preset is the person’s choice of risk; the per-call upload cap bounds the volume, not the risk.
  • Inside a TLS tunnel the Host header is encrypted and cannot be checked; a CDN that routes by it can still be reached through an allowed name.
  • A command that sees the proxy can try many hosts; each one is checked and audited.

Distributed mode. Each piece of state has one mode:

StateMode
Ceiling, private switch, ports, extra registries, allowed hosts, defaultowner-authoritative durable host policy when add-ons are enabled; Studio reads it per request. With add-ons disabled, existing local runtime settings apply
A chat’s preset, rules and cardsshared and durable: the chat record in the chat store (the database in a cluster)
A card that waitsstateless per request: the host operation on the owner waits; it wakes on the answer’s bus message or on a re-read of the card every two seconds
The decision of one connectionstateless per request: the host operation reads the settings and the chat record at each check
The map from a call’s resource to its chatper instance: a cache of a fixed mapping (a hash of the chat ID); each frontend fills its own, and a miss only costs a search of the user’s chats
Auditshared: the studio_egress_events table in a cluster, a JSON file under the data path, or memory without one
Audit pruningsingle-runner: one frontend at each daily tick, under an advisory lock
Rate limits, connection countsper instance: the add-on process on the owner; verdicts are not cached, so each new upstream connection checks the current owner policy

With --addons-role frontend a frontend runs no proxy; the owner does, and the host operations run on the owner’s host.

Packaging and setting up the Sandbox add-on

The Sandbox package is for Linux on amd64 and arm64, and for macOS on Apple silicon (darwin/arm64). For darwin/arm64, scripts/addons/package.sh signs its executable ad hoc with the virtualization entitlement (addons/sandbox/package/entitlements.plist) with codesign on a Mac or with rcodesign anywhere else, and fails when neither exists; fetch-runtime.sh fetches nothing for it, because its guests run in the Virtualization.framework of the system. A Mac that installs the package needs no other program. darwin/amd64 has no guest backend, so its row stays disabled. windows/amd64 runs the Linux add-on in WSL 2: its row has execution: wsl2, so the package carries the linux/amd64 executable and runtime files, its manifest has "osSettings": {"windows": {"execution": "wsl2"}}, and package.sh builds it on a linux/amd64 host. None of the backends runs on Windows itself (gVisor, KVM and the Virtualization.framework do not exist there, and the host backend needs a POSIX shell and process groups). The row stays disabled until its native check, which starts the executable through wsl.exe, passes on a Windows runner with WSL. In WSL 2 the host backend is off, also after its confirmation: there its commands could read the Windows drives under /mnt and start Windows programs. The requirements, the setup and the remaining risks are in Install on Windows. LocalAI never runs the commands of a chat on Windows without isolation.

  • runsc. addons/sandbox/package/runsc.json pins one gVisor release (20261012.0) with the URL, the checksum the release publishes for each tarball, and the checksum of the runsc inside it. addons/sandbox/package/fetch-runtime.sh <os/arch> <dir> downloads it, checks both checksums, and the release workflow puts runsc and gvisor-bin/ in the package. At run time the add-on checks runsc against the pinned checksum, copies it with its helpers to runsc/ in its data directory as executable files, and uses that copy. A runsc that does not match is never used. Without one in the package, a runsc in a system folder (/usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin) is used as it is. The add-on does not read PATH: LocalAI starts it with none, so it looks for runsc, taskset and the KVM tools in those folders only.

  • AppArmor. On Ubuntu 24.04 and later, a program needs an AppArmor profile to make user namespaces. The package carries gvisor-profile, a small program that prints the profile of one runsc. The add-on copies it next to runsc, and when gVisor fails for this reason the page tells an administrator the exact step, with the real paths. Run it once, as root, on the machine that runs LocalAI (not inside a container):

    /path/to/data/addons/sandbox/runsc/gvisor-profile /path/to/data/addons/sandbox/runsc/runsc \
      | sudo tee /etc/apparmor.d/localai-runsc
    sudo apparmor_parser -r /etc/apparmor.d/localai-runsc

    The profile names the binary by path, so a new runsc at a new path needs a new profile. Inside a container, AppArmor is that of the host: use a profile that allows user namespaces for the container (or --security-opt apparmor=unconfined), together with a seccomp profile that allows unshare and clone with CLONE_NEWUSER.

  • The guest images. The guest runs a Debian userland, the guest kernel and the guest agent. There is one image for each sandbox profile, and the Dockerfile has one target for each: base (the default target) media (base plus ffmpeg, sox, ImageMagick and rsvg-convert) and office (base plus LibreOffice Impress, Writer and Calc and fonts). The sandbox guest image workflow (.github/workflows/sandbox-images.yml) builds addons/sandbox/images/guest/Dockerfile for amd64 and arm64, pushes the images to one repository of the project registry (quay.io/go-skynet/sandbox-guest, which must allow anonymous pulls) with the tags sha-<commit> (base) media-sha-<commit> (media) and office-sha-<commit> (office), and, for a release, also v<version>, media-v<version> and office-v<version>. A tag is never moved: the workflow reuses an image whose tag exists, a release reuses the images of its commit, and the release event builds no image, so the digests stamped into a released add-on keep a tag and stay pullable. It checks that each pushed index has a linux/amd64 and a linux/arm64 image, and outputs each reference by digest. Each digest names an index of both architectures, so a Mac with Apple silicon pulls the linux/arm64 image, and its kernel, by the same reference as an arm64 Linux host. The package build passes them in SANDBOX_GUEST_IMAGE=<repository>@sha256:<digest> (base) and, optionally, SANDBOX_GUEST_IMAGE_MEDIA and SANDBOX_GUEST_IMAGE_OFFICE. scripts/addons/package.sh builds the add-on with -ldflags "-X main.guestImage=... -X main.profileImages=media=...,office=...". package.sh refuses a Sandbox build without the base variable; --local-check builds with a stand-in reference no registry serves, for a check that does not publish. To build an image by hand: docker buildx build -f addons/sandbox/images/guest/Dockerfile --target <base|media|office> . from the repository root.

  • The build check of a profile. The tools of each profile, with the command that proves each one works, are in the add-on manifest (execution.profiles). The Dockerfile copies the manifest into the image and runs check-tools.sh <profile> in each target, so an image does not build when a listed tool is missing. sh addons/sandbox/images/guest/check-tools_test.sh tests the script.

  • KVM. addons/sandbox/package/kvm.json pins Cloud Hypervisor v54.0 (amd64 and arm64) and virtiofsd v1.14.0 (amd64) with checksums, and fetch-runtime.sh puts them in the package. The add-on checks each against the checksum compiled into it and copies it, as an executable file, to kvm-bin/ in its data directory. Upstream publishes no static virtiofsd for arm64, so on arm64 install virtiofsd 1.13 or later in a system folder. The KVM backend also needs mke2fs and debugfs from e2fsprogs (the LocalAI image installs them) and access to /dev/kvm for the user LocalAI runs as. Bubblewrap is optional in a container: the add-on does not use it when it finds /.dockerenv or /run/.containerenv, or when SANDBOX_NO_BWRAP=1 is set in its environment (SANDBOX_NO_BWRAP=0 forces it). addons/sandbox/images/host/Dockerfile still builds an image with the same programs for a product that wants them in one place.

  • Tests in CI. The sandbox tests workflow (.github/workflows/sandbox-tests.yml) runs the Go tests and the end-to-end suite, the gVisor integration suite on amd64 and arm64 (with the pinned runsc and its profile loaded), the KVM integration suite on a runner that has /dev/kvm (it skips, and says so, on one without), and the release smoke test.

  • Release smoke test. scripts/addons/sandbox_smoke.sh takes the package that package.sh made, starts the add-on from the extracted files under the real supervisor with the default settings, and runs a command through the tool path of a chat. It passes when the command ran in gVisor or KVM, or, on a host that cannot, when every tool answers “This host cannot run commands.” and nothing ran. --require isolated makes the second case a failure.

The Sandbox in the LocalAI container

gVisor, KVM and the host backend refuse to run as root, so the sandbox needs the add-on process to run as an unprivileged user. The LocalAI container image starts as root only long enough to run entrypoint.sh. The entrypoint selects the user, makes the data folders writable for that user, and runs LocalAI as that user, with the groups that own /dev/kvm, /dev/kfd and /dev/dri/* added. The add-on runs as the same user. Container user and permissions explains how the entrypoint selects the user, and what to do with existing volumes, bind mounts, LOCALAI_UID, --user, rootless Podman and read-only containers.

  • Keep root. Set LOCALAI_RUN_AS_ROOT=true to run as root as before. The sandbox is then unavailable, and the page says why.
  • Devices. The KVM backend needs /dev/kvm; gVisor does not. For KVM, pass the device to the container (--device /dev/kvm); the entrypoint adds the group that owns it. In Kubernetes, request the device through your device plugin and give the pod a fsGroup or supplementalGroups entry for it.
  • User namespaces. gVisor needs the container to be allowed to create user namespaces, and on an Ubuntu 24.04 or later host an AppArmor profile that allows them (see AppArmor in Packaging and setting up the Sandbox add-on). Without them runsc stops at once, and the backend’s reason ends with exit status 128 and cannot read client sync file ... EOF. Docker’s default seccomp profile blocks this: use a profile that allows it, or --security-opt seccomp=unconfined on a host you trust. KVM needs /dev/kvm and no extra privileges.
  • Cluster. The add-on runs on the add-on owner node only. In Kubernetes, give that pod the settings above; a node pool dedicated to it is the way to keep the isolation requirements off the other nodes.

What the source tree does not prove: the images and the runsc download are not built in the test suite, and the gVisor and KVM backends need a host that allows them. Their tests skip with the reason on a host that does not. The host backend and the whole path from a chat to a file in the user’s files run in the tests.

Provider choices and automatic upgrades

Add-on skill switches and tool-provider choices read the owner policy and update only the changed provider keys. Clearing a choice removes that pin without changing other add-ons. Revision conflicts retain edits for an explicit reload and rebase. Uncertain writes retry the same operation; an owner outage disables writes until reconciliation. Native add-on configuration remains separate.

With add-ons enabled, Settings → Backends uses the owner policy for automatic upgrades rather than the frontend runtime file. Combined mode uses the embedded owner through the same API.

Backups and the guest images

A backup of the add-on’s data, and so the backup before an upgrade, holds the guest images in images/. A restore, or the rollback of a failed upgrade, brings back the images as they were, without a pull. KVM and macOS keep each image as a disk file. gVisor keeps the image as one compressed file (rootfs.tar.gz) and unpacks it into unpacked/.

The add-on declares three folders of its data directory as cache folders (data.cache in its manifest), which a backup does not copy: unpacked/ (the gVisor trees, which a backup cannot copy with their links and file modes), runsc/ and kvm-bin/ (the copies of the programs from its package). After a restore they are empty. The add-on copies the programs again from the package that runs, and the first command of a profile unpacks its saved image again.

A restore changes the data, not the installed package. Each package names the images it uses by digest, so a restored image is used when the package that wrote the backup runs, as after the rollback of a failed upgrade. A later package uses its own images.

An image that gVisor unpacked with an earlier build of the add-on has no rootfs.tar.gz. The add-on pulls it once more, and a backup made before that does not hold a usable copy of it. The backend settings and the image record (profiles-cache.json) are in the backup too.

Because the images are in the backup, a backup is as large as they are, and the add-on is stopped while they are copied and checked. Each kept backup holds its own copy.

Upgrade execution and polling

Browser upgrades are accepted durably by the add-on owner before the submission returns. The response identifies the same operation used by subsequent status reads. Closing a page, refreshing, or losing the acceptance reply does not cancel accepted work. Accepted upgrades cannot be cancelled from the UI. The Activity entry has no Cancel control after submission. A retry with the same operation ID, actor and payload observes that operation; a changed payload conflicts. Only one asynchronous upgrade is admitted at a time; competing submissions receive a conflict instead of entering a queue. Other lifecycle service callers retain their synchronous contract.

Execution is single-owner, using the existing storage ownership fence and local journal, not frontend memory or a message-bus dependency. Standalone uses the same path. Any frontend can forward polling to the owner. Each read revalidates current administrator authorization and the recorded actor, including credential identity. Expired or revoked credentials cannot read the operation, but do not revoke work already accepted. A different credential does not inherit the original receipt.

Activity shows real stages (package preparation, verified backup, candidate migration/health, and publication), not estimated byte percentages. Failed operations retain a safe failure code; detailed underlying causes go to owner logs. A migration failure can require explicit data recovery; keeping the old package does not mean the data is safe to run.

Shutdown cancels and waits for the owner worker before releasing storage. On restart, existing publication and data-recovery journals reconcile before runtime startup: prepared publication may finish; interrupted work otherwise becomes a terminal interrupted failure, with recovery-required reported when data is blocked. Destructive migration is never automatically replayed. An uncertain publication remains fenced for reconciliation, not presented as a definite rollback.

The browser remembers pending operation IDs in session storage, scoped to the signed-in user, and resumes observation after a reload without resubmitting. Logout clears the current user’s observer records. Storage restrictions may prevent observer recovery, but never cancel the owner operation. An unreadable owner or exhausted polling window is an unknown outcome: keep the ID and read it again, rather than starting a replacement operation.

LocalAI docs > Add-ons > Catalogue > Work tools

Tables

Keep structured data in a database of tables that you own, and ask a chat to read and change it. You can share a database with other people on your server and export a table as a CSV file. A new database is private to you until you share it.

For example, make a database called “Reading list” on the Databases page and add a table with the columns “Title” and “Status”. Open a chat, switch on Tables in the add-ons control, pick the database with Select database and ask: “Add The Dispossessed with the status reading.” The chat adds the row. Ask “How many books are done?” and it counts them. A change that a chat made can be undone.

At a glance

TopicDetail
What it addsDatabases of tables that you own or share: typed rows, filters, a schema and sharing. A chat reads and changes them with tools.
Who installs itAn administrator, from Add-ons, Find add-ons, with Install, then turns it on. With authentication off, you are the administrator.
Who turns it onA person needs the addons feature. It is off by default for new users on a server with accounts. The person switches the add-on on for a chat in the Tools menu. A saved agent uses it only when you name it in the agent.

Managing databases from the UI

Creating, renaming, sharing and deleting a database are the person’s own actions in the Tables pages, through the routes described in UI-only resource management. They are not tools: a model never sees them and sharing and deletion are never proposals.

  • databases-create and databases-rename are the same tools that chat uses, run by the person’s explicit request with no approval card.
  • databases-delete is an admin tool. The manifest lists it in capabilities.adminTools and not in tools, so it has no model definition and the declared-tool rule refuses it on every other path. The addon runs it only under the host action delete and only for the revision the owner confirmed. It removes the file and its journal files and records the operation in the ledger; repeating the operation, also after a crash between the removal and the receipt, gives the same receipt.
  • The manifest capabilities.resources maps create, rename, inspect and delete to these tools, with the noun database.

A database is shared whole, as viewer or editor, with named users picked by account. An owner and an editor see the same rows; only the owner changes the schema, shares, renames and deletes. Deleting asks the owner to type the name, removes the data and every grant, and never uninstalls the addon.

The database of a chat

The owner keeps which database each conversation works on, per person. A tool call that names no resourceId uses it, so a person can say “add a row” after choosing a database once. The model never sets it, and the owner authorizes it for the person on every call: a database whose grant was withdrawn or that was deleted is refused like an unknown one. With none selected the tool answers a select_resource result and runs nothing.

The Tables pages

Tables ships its own UI as a standalone ES module in the package. It is loaded by the host after the host was built, so installing or updating Tables changes the pages without a rebuild of LocalAI. The My add-ons page shows a Tables card.

WhereWhat
Databases listYour databases and the ones shared with you, each with your role, who shared it and, for the owner, how many people have access. Create, rename and delete (owner).
A databaseThe tables as tabs, the typed grid of the selected table, a structured filter, sort by column, cursor paging and the row actions of your role.
Schema (owner)Create, rename and drop tables and columns. A drop says what is lost and asks for the name to be typed.
Share (owner)The whole database is shared as viewer or editor with named accounts found by a picker. Local-owner mode says that sharing is not available and makes no sharing call.
Select databaseA chat action in the composer menu: the databases you may use with your role, the one selected for this conversation, and a way to clear it.

What each role sees:

RoleRowsSchemaShare, rename, delete
Ownerread, add, edit, deleteyesyes
Editorread, add, edit, deleteread onlyno
Viewerreadread onlyno

Hiding a control is never the control. The server checks the role of every call again, and a crafted write of a viewer, a schema change of an editor or a share of anybody who is not the owner is refused with the answer of an unknown database.

Editing rows

  • Typed editors. Text, whole number, number, yes or no, and date and time (entered and shown in UTC). A value of the wrong type is refused in the form and nothing is sent. Integers beyond 2^53 are kept exact. An optional column has an Empty switch that sends null.
  • Filters. A list of conditions over the table’s own columns, joined by all or any, with the operators the column type supports. They become the filter of rows-query; there is no free text and no expression. The row ID is filterable as _id.
  • Paging. The add-on’s cursor goes forward and the page keeps the cursors it used to go back. A cursor that the add-on no longer accepts (the data changed) starts again at the first page and says so.
  • Batches. Add rows takes up to 100 rows. A selection is changed or deleted in steps of at most 1000 row IDs, each step saved on its own with its own operation ID. If a later step fails, the page says how many rows were changed before it.
  • Revisions. Every change sends the revision the page read. If another person changed the database, the save is refused as stale, the form keeps what you typed and offers Reload and apply again, which reads the revision and sends the same change once more under a new operation. An unknown outcome keeps the operation ID, so repeating is the same change and never applies twice.

A row editor sends only the fields you changed. A datetime keeps its stored fraction of a second (up to nine digits) when you edit another field, and two spellings of one instant, such as another UTC offset, are no change.

Row and schema changes made in these pages are the person’s own action. They need no confirmation card and are not proposals, and they still go through the host’s POST /api/addons/resources/{resourceId}/apply: the role of the action, the declared tool definition, the admission of the resource, the revision and the receipt (see Changing data and schema from the UI).

The database of a chat

Choosing a database in the Select database action stores it for you, the conversation and the add-on. A chat tool call that names no database uses it, and the chat sends the conversation ID in the X-LocalAI-Conversation-Id header only when the conversation has add-on tools enabled. Two people in the same conversation ID, or one person in two conversations, never share a selection. A database that is no longer shared with you is refused like an unknown one.

CSV export

rows-export writes the rows a table, a filter and a sort select to a CSV file. It is a read: it runs under the host read action, so an Owner, an Editor and a Viewer may export what they can read, and it needs no approval card. A chat tool call and the Export CSV button of a table page run the same tool.

{"tool": "rows-export", "table": "Orders", "columns": ["_id", "Item", "Qty"],
 "filter": {"column": "Qty", "op": "gte", "value": 2},
 "sort": [{"column": "Qty", "desc": true}], "maxRows": 5000}

columns, filter and sort follow the rules of Row queries. columns may name _id to write the row ID as a column; empty exports every column in schema order. maxRows is optional. There is no limit and no cursor: an export is the whole result, not a page.

What the file holds

  • One snapshot. The export reads the database in one read transaction, so every row comes from the same revision. A change that commits while the export runs is not in the file, and the export never blocks it. The file is written row by row through a small buffer; its memory use does not grow with the number of rows.
  • RFC 4180 records with a header row of the column labels and CRLF line ends. A field is quoted when it holds a comma, a quote, a CR or LF, or starts or ends with a space or tab. A quote inside a field is doubled.
  • UTF-8, with no byte order mark. Text is written as it is stored. A spreadsheet that guesses the encoding from the file may need to be told to read it as UTF-8.
  • NULL is an empty field with no quotes. An empty text value is "". A reader that does not tell the two apart reads both as an empty value.
  • Booleans are true or false. Integers are decimal and exact to 64 bits. Reals are the shortest decimal that reads back as the same number; very large or very small values use an exponent. Date-times are RFC 3339 in UTC.

Spreadsheet formulas

A spreadsheet runs a cell that starts with =, +, -, @, a tab or a carriage return as a formula. The export therefore writes a single quote before every text cell, and every column label, that starts with one of those characters, as the OWASP guidance recommends: =1+1 is written as '=1+1. A spreadsheet shows the quote as the text marker, not as part of the value.

Limits of this policy:

  • Cells of integer, real, boolean and date-time columns are never prefixed. A negative number stays a number (-4).
  • The file now holds '=1+1, not the stored =1+1. A program that reads the CSV back must remove that quote itself; the export does not mark which cells it changed. A text value that really starts with ' and a formula are therefore not told apart after the round trip.
  • A text value such as -5 apples also gets the prefix.
  • The policy protects the file against being run as a formula in a spreadsheet. It is not a defence for a program that treats CSV as trusted input.

In the pages and in chat

A table page has an Export CSV button for every role. It exports the table with the filter and sort of the view, optionally with the row ID, and then shows the host’s file card: name, size, expiry and the download button. In chat, an export tool call is answered with the same card. The chat stores only the artifact identifier; after expiry the card says the file expired.

Events for automations

Each row change that commits is reported: tables.row.created (a row is added), tables.row.updated (changed) and tables.row.deleted. An undo of a row change is reported as what it does: an undone insert removes rows. Each one carries the database and the table (ID and name), and the row: its number, a key, a title (its first text value) and, except for a removal, its values by column name. A start chooses one of the person’s databases and, if it wants, one table; it then gets only the rows of that choice. The columns of the chosen table are fields an automation can filter on. One change reports at most its first 50 rows. The add-on asks for the host operation events.emit at install; without it, nothing is reported.

Limits

  • One name per database, no uniqueness rule across databases.
  • Rename needs the schema revision from the preview. A changed schema makes the rename rejected, and a new preview is required.
  • The data directory holds the databases and a small operation ledger. Both are kept when the addon is disabled or uninstalled.
LocalAI docs > Add-ons > Catalogue > Work tools

Calendar

At a glance

TopicDetail
What it addsOne calendar for each user, inside LocalAI. A chat or a saved agent reads and changes events. There is no account to connect.
NeedsNothing. There’s no account to connect.

Ask a chat or a saved agent “what is on Thursday?” or “add dinner with Sam at 8” and it reads or changes your calendar. Install it and ask. There’s nothing to connect. Writes run at once, with no confirmation card.

What it keeps

There is one calendar for each user, shared by all of that user’s chats and agents. It is one SQLite file in the data directory of the add-on. An event has:

  • a title, a start and an end, or a whole day (an all-day event);
  • notes, a place and the attendees, each as free text;
  • a time zone, as an IANA name such as Europe/Rome, and optionally a repeat.

Set the default time zone once, on the Calendar page (it starts as the zone of the server). A new event uses it unless you or the agent name another one. An event keeps the zone it was written in when you change the default.

A repeat is daily, weekly, monthly or yearly, with an interval (“every 2 weeks”) and an optional last day. The local time stays the same across a change of daylight saving time. A monthly repeat on the 31st skips months that have no 31st. You can change or delete the whole series, or skip one occurrence.

It doesn’t sync with other calendars, send invitations, hold more than one calendar per user, or send reminders. To move events elsewhere, export the whole calendar as one ICS file from the page.

The page

Open Calendar in the add-ons. It has a month view, an agenda list of the next 60 days, a form to create or change an event, the default zone and the export button. Click a day to add an event, or an event to change, skip or delete it. The page speaks the language of the web UI.

What the agents can do

ToolDoes
events-listLists a range of days with repeats expanded; with no arguments, today and six more days.
events-searchFinds events by words in the title, notes, place or attendees.
event-getReads one event in full.
event-create, event-update, event-deleteAdd, change and delete an event. With occurrence (a date), event-delete skips only that day of a repeating event.

Reads and writes both run immediately, as the signed-in user, with no confirmation card. A trigger or a job can write only with the act.addons grant. The add-on ships a skill that tells the model when to use the tools.

In a messaging chat, the owner and the senders paired with the bot can read and change the calendar. Every other sender the bot lets in can read it but not change it (the tools.write rule, see Add-ons that keep the owner’s own data).

Events for automations and watches

The calendar reports each change: calendar.event.created (an event is added), calendar.event.updated (changed, or a day of a repeating event skipped) and calendar.event.deleted. An automation can start from them, and a watch can remind you of an event. Each one carries these fields, under event: the ID, the title, the next start (a time; absent when no occurrence is left), the start and end in the zone of the event, whether it lasts all day, the zone, the place, the attendees and the notes. A removal carries only the ID and the title.

When a watch handles an added or changed event, the calendar asks the model to consider a prep task with a lead time for a call or meeting with other people.

Limits

An event title has at most 200 characters, notes 4000, a place 200 and attendees 500. One user keeps at most 5000 events. A listing covers at most 400 days and returns at most 500 occurrences; the page says when a list was cut.

LocalAI docs > Add-ons > Catalogue > Work tools

Contacts

At a glance

TopicDetail
What it addsOne address book for each user, inside LocalAI. A chat or a saved agent looks up and keeps contacts. There is no account to connect.
NeedsNothing. There’s no account to connect.

Ask a chat or a saved agent “what is Marco’s number?” or “add Anna, anna@example.org” and it reads or changes your address book. Install it and ask. There’s nothing to connect. Writes run at once, with no confirmation card.

What it keeps

There is one address book for each user, shared by all of that user’s chats and agents. It is one SQLite file in the data directory of the add-on. A contact has:

  • a name, and an organisation;
  • phone numbers and email addresses, each with a free label such as mobile, home or work (up to 10 of each);
  • a birthday, as YYYY-MM-DD, or --MM-DD when the year is not known;
  • an address and notes, each as free text.

It doesn’t sync with another service, support CardDAV, groups or photos, or merge duplicates. It can’t import vCard files yet. You can export the whole book as one vCard file from the page.

The page

Open Contacts in the add-ons. It has a search box, the list of contacts, the detail of the one you pick, a form to add or change a contact, and the export button. The search matches every word you type against the name, organisation, phone numbers, email addresses, address and notes. It ignores case and accents, and a phone number matches however it is spaced. The page speaks the language of the web UI.

What the agents can do

ToolDoes
contacts-searchFinds contacts by words, and gives a short card for each match with the phones and emails.
contact-getReads one contact in full.
contact-create, contact-update, contact-deleteAdd, change and delete a contact. A phones or emails list in an update replaces the whole list.

Reads and writes both run immediately, as the signed-in user, with no confirmation card. A trigger or a job can write only with the act.addons grant. The add-on ships a skill that tells the model when to use the tools.

In a messaging chat, the owner and the senders paired with the bot can read and change the book. Every other sender the bot lets in can read it but not change it (the tools.write rule, see Add-ons that keep the owner’s own data). The book is private to its user: a tool call can never name another user’s book.

Events for automations

The book reports each change: contacts.contact.created (a contact is added), contacts.contact.updated (changed) and contacts.contact.deleted. An automation can start from them and filter on their fields. Each one carries, under contact: the ID, the name, the organisation, the emails and phones (each with a label and a value), the birthday, the address and the notes. A removal carries only the ID and the name. The add-on asks for the host operation events.emit at install; without it, nothing is reported.

Limits

A name has at most 200 characters, an organisation 200, a label 40, a phone number 40, an email address 254, an address 500 and notes 4000. One user keeps at most 2000 contacts.

A vCard export is a vCard 3.0 file. A birthday without a year is written as --MM-DD, which some programs do not read.

LocalAI docs > Add-ons > Catalogue > Work tools

Web search

Web replaces the built-in web_search and web_fetch tools. The built-ins need no key. Install this add-on to search with Brave, Tavily or Google Programmable Search, and to read PDFs in web_fetch.

The add-on has its own switch in the Tools menu of a chat. The switch on the Web row changes only the built-in tools.

At a glance

TopicDetail
What it addsSearch providers that need a key (Brave Search, Tavily and Google Programmable Search), tried in the order an administrator sets, and the text of PDF files in web_fetch.
NeedsNothing to start. For a search provider with a key, an administrator saves the key on the Settings tab of the add-on.
GuideSearch the web in chats
LocalAI docs > Add-ons > Catalogue

Services and devices

These add-ons connect a chat or a saved agent to a service or to a machine. A person adds a connection with their own account or key.

  • Gmail

    Let agents read mail, and save and send drafts with your approval.

  • Mail

    Let agents read a mailbox over IMAP and write mail over SMTP, with any provider.

  • Google Drive

    Let agents read the Drive folders you choose, and write text files if you allow it.

  • GitHub

    Let agents read repositories, issues and pull requests, and comment if you allow it.

  • Jellyfin

    Let agents search a Jellyfin library and see what is playing, and control players if you allow it.

  • Home Assistant

    At a glance Topic Detail What it adds Tools to read a smart home: find entities, read a state, look at a history. If you allow it, switch things such as a light or a thermostat, within limits you set. Needs A connection with one Home Assistant address and one long-lived access token. Ask your chats and saved agents about your smart home: find entities, read a state, look at a history, list what is unavailable. If you allow it, they can also switch things, such as a light or a thermostat. You set the limits. The add-on never operates a lock, an alarm, a garage door or a siren, whatever you choose.

  • PiKVM

    At a glance Topic Detail What it adds Tools to check a PiKVM and the machine it controls. If you allow it, press its power buttons and type on its keyboard, with a confirmation each time unless you say otherwise. Needs A connection with the device address, a user name and a password. Ask your chats and saved agents about a PiKVM (or another device that runs the kvmd API) and the machine it controls: is it on, what is the device, is the keyboard connected. If you allow it, they can also press the power buttons of that machine and type on its keyboard. A person confirms those actions unless you choose otherwise for power actions and key presses (see Not asking for some actions and Allow all), and typing and forced power actions are off until an administrator switches them on.

  • SSH

    At a glance Topic Detail What it adds Tools to run one non-interactive command on a remote machine over SSH, and to send a file to it or read a file from it. A person confirms each call by default. Needs A connection with a host, a user and a key or a password. Run commands on a remote machine from your chats and saved agents over SSH. By default a person confirms each command: the card shows the host, the user and the exact text before anything runs.

  • Kubernetes

    At a glance Topic Detail What it adds Tools to read a Kubernetes cluster, and to change it with a confirmation each time unless you say otherwise. An administrator sets a policy for each cluster. Needs A connection with a kubeconfig of one context, with its data embedded. Read and change a Kubernetes cluster from your chats and saved agents. The add-on calls the API server directly. It does not run kubectl.

Subsections of Services and devices

LocalAI docs > Add-ons > Catalogue > Services and devices

Gmail

Agents can search and read your Gmail. With your permission, they can save and send drafts, manage primary-calendar events and attendees, and create task lists and manage tasks in a selected Google Tasks list.

At a glance

TopicDetail
What it addsSearch mail, read a message or a thread, list labels and read the text of an attachment. Drafts and sends wait for your OK by default. It never deletes, trashes, labels or forwards mail.
NeedsA Google OAuth client, which an administrator saves once because LocalAI ships none. Then each person connects their own Google account.
GuideGmail in Chat apps and connections

Whatever the agent reads is sent to the chat’s model. Calendar and Tasks require the ALL connection entry, which also grants access to the whole mailbox; Gmail labels do not restrict calendar or task access.

Calendar and Tasks changes follow the connection’s write mode, including deletions. Calendar events may include a location and can be timed or all-day, including multiple days. All-day end dates are exclusive (the day after the last day). A calendar event may include attendees; the add-on requests Google attendee email notifications only when sendUpdates is explicitly all. When updating attendees, the supplied list replaces the existing list. The approval preview refuses events with more than 20 attendees or a preview too large to show. Google Tasks stores due dates without the time. None of these operations automatically schedules a Telegram reminder.

LocalAI docs > Add-ons > Catalogue > Services and devices

Mail

Agents can read a mailbox over IMAP and, if you allow it, write mail over SMTP. It works with any provider that offers both protocols.

At a glance

TopicDetail
What it addsList folders, search, read a message or a conversation, read the text of a text attachment, and send or save a plain text email. It never deletes, moves, flags or forwards mail.
NeedsA connection with the mailbox address, the username, the password (an app password if your provider offers one) and the IMAP and SMTP server names.
GuideMail in Chat apps and connections

Whatever the agent reads is sent to the chat’s model.

LocalAI docs > Add-ons > Catalogue > Services and devices

Google Drive

Agents can read the files in the Drive folders you choose.

At a glance

TopicDetail
What it addsSearch, list a folder, read the details of a file and read its text. If you allow it, create a text file, replace the text of a file, rename or move a file, and move a file to the trash. It never shares a file.
NeedsA Google OAuth client, which an administrator saves once because LocalAI ships none. Then each person connects their own Google account.
GuideGoogle Drive in Chat apps and connections
LocalAI docs > Add-ons > Catalogue > Services and devices

GitHub

Agents can read the repositories you choose: code, files, issues, pull requests and their diffs.

At a glance

TopicDetail
What it addsRead tools, and, if you allow it, comments on issues and pull requests, new issues, labels and line comments on a pull request diff. It cannot merge, delete, push code, approve or request changes.
NeedsA connection with a fine-grained personal access token and the list of repositories the agent may use.
GuideGitHub in Chat apps and connections

The add-on does not listen for @mentions on GitHub. An agent works on GitHub only when you ask it in a chat.

LocalAI docs > Add-ons > Catalogue > Services and devices

Jellyfin

Chats and saved agents can look into a Jellyfin media server.

At a glance

TopicDetail
What it addsSearch and browse libraries, read the details of an item, see what was added lately and what plays now. If you allow it, control a player, mark an item watched, set a favourite and add items to a playlist. It cannot delete anything, scan or edit the library, or manage users.
NeedsA connection with a Jellyfin API key and the server address.
GuideJellyfin in Chat apps and connections
LocalAI docs > Add-ons > Catalogue > Services and devices

Home Assistant

At a glance

TopicDetail
What it addsTools to read a smart home: find entities, read a state, look at a history. If you allow it, switch things such as a light or a thermostat, within limits you set.
NeedsA connection with one Home Assistant address and one long-lived access token.

Ask your chats and saved agents about your smart home: find entities, read a state, look at a history, list what is unavailable. If you allow it, they can also switch things, such as a light or a thermostat. You set the limits. The add-on never operates a lock, an alarm, a garage door or a siren, whatever you choose.

A chat can answer questions such as:

  • “Is the office warmer than the bedroom, and was it warmer yesterday?”
  • “Which devices are unavailable?”
  • “Turn off the lights in the living room.” (a change, see Changes)

Set it up

  1. Install the Home Assistant add-on from Find add-ons and open its page.
  2. In Home Assistant, open your profile (your name at the bottom of the sidebar), then the Security tab. Under Long-lived access tokens, choose Create token, name it (for example LocalAI) and copy it. Home Assistant shows it once. The token has the rights of the user that made it. If you can, make it with a user that sees only what you want to share.
  3. On the add-on page, choose New Home Assistant connection. Paste the token and write the address you use to open Home Assistant in a browser, for example https://homeassistant.local:8123. Press Test: the row shows the Home Assistant version if the address and the token work.
  4. Leave the write mode on Read only until you have read the limits on this page.

One connection is one home: one token and one address. For a second home, add a second connection. A chat uses the connections you enable for it in the Tools menu (see The connections of an add-on). With two or more enabled, the model names the connection in each call.

How the address is kept

LocalAI keeps the address separate from the token. Every tool takes an instance argument, and LocalAI refuses any call that names a different address, so a model can’t send the token elsewhere. The add-on talks only to that address:

  • The address is https. Plain http is accepted only for an address on your own network (a private IP address, a single-word name, or a name ending in .local, .lan, .home, .internal or .home.arpa).
  • If Home Assistant answers with a redirect, the call fails. The token is never sent to another host.
  • The token goes in the Authorization header and nowhere else. It is not in a log, an error or a result.

A self-signed certificate

The add-on checks the certificate of Home Assistant. If yours is self-signed, the Test says the certificate is not trusted. Do not turn the check off. Pin the certificate instead: copy its SHA-256 fingerprint and add it to Pinned certificates in the limits below, as host:port=fingerprint.

openssl s_client -connect homeassistant.local:8123 </dev/null 2>/dev/null \
  | openssl x509 -noout -fingerprint -sha256

The add-on then accepts that exact certificate for that exact host:port, and nothing else. When the certificate is renewed, pin the new one.

What the tools do

ToolKindWhat it does
get-configreadVersion, time zone, units, language and state of the server. No address, path or location.
list-areasreadThe areas with entity and device counts, the visible entities by domain and how many are unavailable.
search-entitiesreadEntities by words, domain, area or state, at most 50 per call, with the total.
get-statereadOne entity with its attributes.
get-historyreadThe state changes of one entity over up to 168 hours, at most 100 points, with min, max and mean for a number.
get-logbookreadThe newest 50 logbook entries of one entity over up to 168 hours.
list-servicesreadThe services the policy lets a model call, with their fields and the write tool that calls each.
call-servicewriteA quiet service: lights, switches, input booleans, media transport.
call-physical-servicewrite, always confirmedAny other allowed service: heating, blinds, scenes, scripts, notifications.

Two more tools, get-policy and set-policy, belong to the add-on page. A model never sees them.

There is no tool that renders a template, fires an event or sets a state, because each can run arbitrary logic on your server.

Everything Home Assistant returns (names, states, attributes, logbook text) was written by devices, integrations and people. Every result is marked as untrusted data, and the add-on’s skill tells the model never to follow an instruction found in one. Results are bounded: a list is cut and says so, text is cut, an attribute value is cut, and a result above the size limit is refused.

The add-on removes these from every result: entity_picture, access_token, anything with token, password or secret in its name, a value that carries a token in an address, and the location of people and devices (latitude, longitude, gps_accuracy and similar). It never returns a camera snapshot address.

Limits you set

The limits are on the add-on page, under the connections. Everyone who opens the page sees them. Only an administrator can change them. They apply to every Home Assistant connection of the server.

Services a model may call

The allowlist holds domain.service entries, or domain.* for the services of a domain. A service that is not on it is refused. The default is small:

DomainServicesClass
lightturn_on, turn_off, togglequiet
switchturn_on, turn_off, togglequiet
input_boolean* (except reload)quiet
media_playermedia_play, media_pause, media_play_pause, media_stop, media_next_track, media_previous_track, volume_up, volume_down, volume_set, volume_mutequiet
climateset_temperature, set_hvac_modeconfirmed every time
sceneturn_onconfirmed every time
scriptturn_onconfirmed every time

notify services are not on the list. Add one only if you want a model to send messages.

A script can do anything you wrote into it, and a switch can power a heater. Allow only what you would let a guest in your house do.

Never available

These cannot be allowed. The add-on refuses them when you save the limits, and again when a call is made, so a hand-edited file does not change it:

RefusedWhy
lock.*, alarm_control_panel.*They open doors and disarm alarms. A mistaken or injected request must not do that.
siren.*, valve.*, water_heater.*A noise, a flood or a burn.
camera.*It writes files and records.
cover.* on a garage door, a gate or a doorA cover that reports any other device class can be moved once you allow cover services. A cover with no device class is treated as a garage door and is never moved.
homeassistant.*It restarts or stops the server, reloads the configuration, and its turn_on and turn_off act on any entity, which would skip the domain checks.
Any reload or reload_* service, restart, stop, check_config, set_location, install, create, delete, removeThey change the configuration or the system.
hassio.*, shell_command.*, python_script.*, command_line.*, rest_command.*, mqtt.*They run programs or reach outside the home.
recorder.*, logger.*, system_log.*, backup.*, update.*They erase history, change logging, restore a backup or install an update.

You can still let a chat read what a lock reports (see below). Reading is never operating.

Entities the tools never show or touch

Excluded entities are left out of every search, state, history, logbook and area count, and no service call can name them. You can exclude by:

  • Domain. Default: lock, alarm_control_panel and camera. Remove one to let a chat read it. A lock you read is still never operated.
  • Area. The entities of the areas you list. If Home Assistant cannot answer which entities an area holds, the tools refuse instead of guessing.
  • Pattern. A regular expression matched against the whole entity ID, such as sensor\..*_bedroom.
  • Label. Entities that carry the Home Assistant label you name (default sensitive). An older Home Assistant that does not know labels cannot check it. The result then says that the label exclusion was not applied.

How many things one call switches

A call names its entities one by one. The default is 5, the highest you can set is 20. Area, device, label and all targets are not accepted: the model has to name each entity, so you see each one in the confirmation.

Changes and confirmation

A connection has a write mode, which the host enforces before the add-on is called:

ModeWhat happens
Read only (default)Both write tools are refused.
Asks you firstEach change is stored as a proposal. You see what will be switched, with each entity’s name and current state, and you confirm or cancel it.
Acts without askingA chat of yours makes a quiet change at once. Runs without you present still wait for your confirmation.

call-physical-service is always confirmed, even in the last mode. A proposal for it expires after 15 minutes, a quiet one after two hours. Changing the limits after a preview makes an old proposal stale: it is rejected and nothing is sent.

Home Assistant has no idempotency key. The add-on records an operation before it sends it and never sends one twice. If the connection breaks after the call left, the result is “unknown”, and you decide what to do.

Limits

  • Only an administrator can change the limits. Other users can read them.
  • The limits are kept in policy.json in the data folder of the add-on. If that file can’t be read, or it names a service that is never available, the tools stop working until an administrator saves the limits again. They don’t fall back to something wider.
  • The add-on runs one process for the server, so every frontend of a cluster reads the same limits.
  • It runs on Linux and macOS, like the other tool add-ons.
  • The add-on is tested against a simulated Home Assistant. Area and label questions use a fixed template call. If an area question fails on your instance, list-areas says so and the area exclusion refuses to guess.
LocalAI docs > Add-ons > Catalogue > Services and devices

PiKVM

At a glance

TopicDetail
What it addsTools to check a PiKVM and the machine it controls. If you allow it, press its power buttons and type on its keyboard, with a confirmation each time unless you say otherwise.
NeedsA connection with the device address, a user name and a password.

Ask your chats and saved agents about a PiKVM (or another device that runs the kvmd API) and the machine it controls: is it on, what is the device, is the keyboard connected. If you allow it, they can also press the power buttons of that machine and type on its keyboard. A person confirms those actions unless you choose otherwise for power actions and key presses (see Not asking for some actions and Allow all), and typing and forced power actions are off until an administrator switches them on.

A chat can answer questions such as:

  • “Is the test box on?”
  • “Power the test box on.” (a power action, see Power actions)
  • “Press Escape and F2 to enter the BIOS.” (keys, see Typing and keys)

Set it up

  1. Install the PiKVM add-on from Find add-ons and open its page.
  2. On the PiKVM, add a user for LocalAI: switch the filesystem to read-write with rw, run kvmd-htpasswd add localai, then ro. See the PiKVM authentication guide. A PiKVM has no per-user rights: every user can do everything. A dedicated user does not limit what the add-on can do, but you can remove it on its own. The limits of the add-on (below) are the only ones.
  3. Get the fingerprint of the certificate of the PiKVM (see The certificate).
  4. On the add-on page, choose New PiKVM connection. Type the user name, the password and the address, for example https://pikvm.local#sha256=<fingerprint>. Press Test: the row shows the model and the kvmd version if the address and the login work.
  5. Leave the write mode on Read only until you have read the limits on this page.

One connection is one device. For a second device, add a second connection. A chat uses the connections you enable for it in the Tools menu (see The connections of an add-on). With two or more enabled, the model names the connection in each call.

The user and the password

The connection keeps one sealed credential. In this version it holds user:password: the host splits it at the first colon, so the user name has no colon and the password may have colons. The page has a field for each and joins them. This is a v1 format: when the host gets a credential kind with named fields (a user and a password), the add-on will move to it, and you will enter the pair again.

The add-on sends the user and the password in the X-KVMD-User and X-KVMD-Passwd headers, as the PiKVM API allows, and nowhere else. They are not in a log, an error or a result. The page trims nothing for you: a password with a space at its start or end is refused.

Two-factor login (2FA) is not supported in this version. With 2FA on, the PiKVM wants the current one-time code added to the password, and the code changes every 30 seconds. A device with 2FA on answers 403 and the Test says the login was refused. 2FA is one switch for the whole PiKVM (kvmd-totp), so the device cannot have it on for the browser and off for LocalAI.

How the address is kept

LocalAI keeps the address separate from the password. Every tool takes a device argument, and LocalAI refuses any call that names a different address, so a model can’t send the password elsewhere. The add-on talks only to that address:

  • The address is https. Plain http is accepted only for an address on your own network (a private IP address, a single-word name, or a name ending in .local, .lan, .home, .internal or .home.arpa), because the login travels in headers.
  • If the device answers with a redirect, the call fails. The password is never sent to another host.
  • The add-on does not use a proxy of the environment.

The certificate

A PiKVM comes with a self-signed certificate. The add-on never turns verification off. Pin the certificate instead: copy its SHA-256 fingerprint and add it to the address as #sha256= and the 64 hex digits (colons are fine).

openssl s_client -connect pikvm.local:443 </dev/null 2>/dev/null \
  | openssl x509 -noout -fingerprint -sha256

The add-on then accepts that exact certificate for that exact address, and nothing else; a different certificate is refused before the password is sent. When you renew the certificate, edit the connection and pin the new one. Without a pin, a self-signed certificate is refused and the Test says the certificate is not trusted.

What the tools do

ToolKindWhat it does
get-inforeadModel, board, platform, kvmd and streamer versions, kernel and CPU temperature. No serial number, host name or network details.
get-power-statereadWhether ATX control is enabled and busy, the power LED (on or off) and whether the disk LED shows activity.
get-keyboard-statereadWhether the keyboard of the device is connected to the target, and the Caps, Num and Scroll Lock LEDs.
power-actionwrite, confirmed (you can choose Don’t ask)Press a power button: on, off or reset. The forced actions off_hard, reset_hard and long_press need a switch.
type-textwrite, confirmed (Allow all skips the card), needs the typing switchType text on the target.
send-keywrite, confirmed (you can choose Don’t ask), needs the typing switchPress keys from a short allowlist.

Two more tools, get-settings and set-settings, belong to the add-on page. A model never sees them.

Everything the device returns is marked as untrusted data, and the add-on’s skill tells the model never to follow an instruction found in a result. Results are bounded.

Changes and confirmation

All three write tools declare approval: always in the manifest. By default a person confirms every call: the mode Read only refuses them all, and Asks you first stores each as a proposal that waits for a confirmation card. For power-action and send-key you can stop being asked one by one, as described next, and Allow all stops it for all three tools (see Allow all). A proposal expires after 10 minutes (power) or 5 minutes (typing and keys).

Not asking for some actions

On the add-on page, the section Ask before acting has one choice for Power actions and one for Key presses: Ask each time (the default) or Don’t ask. There is no choice for typed text, because it can enter a password or a command; it waits for you unless the connection is on Allow all.

  • The choice is yours alone. It is saved from your own browser session, it applies to all your PiKVM connections, and no chat, agent or model can change it.
  • With Don’t ask, a chat can switch the machine off or reset it at once, with no card, and unsaved work on it is lost. If an administrator allowed the hard power actions, those run without asking too. Read the warning on the page before you choose it.
  • It holds only for your own chats and for messaging senders you paired with the bot. Senders that are only on the allowlist, senders let in because the bot accepts anyone, roles, scheduled runs and sub-agents are still asked.
  • A connection set to Read only runs nothing, whatever you choose. A connection set to Allow all runs these two tools without asking whatever you choose here.
  • Every run without asking is written to the server log and to the latest decisions of the connection, with the tool, the connection and the result. The typed text and the keys are not written.
  • The row of each connection lists which tools run without asking now.

Allow all

The write mode of a connection has a third choice, Allow all, for someone who wants the agent to act without asking. It is never the default and is never chosen for you: a new connection starts on Read only, and a connection keeps the mode it has.

With Allow all, a chat of yours runs power-action, send-key and type-text at once, with no card. Unsaved work on the machine is lost when it is switched off or reset, and typed text and key presses go to whatever has the focus, so a shell command or a password can be entered and none of it can be taken back. The page warns about it. If you want a confirmation, choose Asks you first. The per-tool choices of Ask before acting are not asked in this mode, and the row of the connection lists both tools that have a choice as running without asking.

These rules hold in every write mode, Allow all included:

  • The switches of an administrator for each device stay in force. Typing and key presses need Allow typing and key presses, the forced power actions (off_hard, reset_hard, long_press) need Allow hard power actions, and the add-on refuses a call when the switch is off. Allow all does not turn a switch on.
  • The same limits on text and keys, the stale-state check and the rule that nothing is sent twice.
  • A run without you present, such as an agent started by a trigger, still leaves a proposal that waits for a person.

The add-on notes an operation before it sends it and never sends one twice. The PiKVM API has no idempotency key. If the connection breaks after the request left, the result is “unknown”, and you decide what to do. Read the power state to see what happened.

Power actions

power-action takes one of these:

CommandWhat it sendsNeeds the hard switch
onPOST /api/atx/power?action=on (a short press of the power button)no
offPOST /api/atx/power?action=off (a short press: a soft power off)no
resetPOST /api/atx/click?button=reset (the reset button)no
off_hardPOST /api/atx/power?action=off_hard (hold the button 5 seconds or more)yes
reset_hardPOST /api/atx/power?action=reset_hard (hardware reset)yes
long_pressPOST /api/atx/click?button=power_longyes

The confirmation card shows the power state that was read just before, and what the action does. The preview reads the state again when you confirm. If the state changed, the action is rejected as stale and nothing is sent. An action that makes no sense is refused at once: on for a machine that is on, off for one that is off, a reset for one that is off. A busy device or one with ATX control turned off is refused.

Typing and keys

type-text and send-key are off until an administrator switches on Allow typing and key presses for the device on the add-on page. Both use that one switch.

  • type-text types text through the HID print endpoint. The text is at most 200 characters by default; an administrator can set up to 1000 for a device. It has no control characters except newline and tab. The card shows the exact text, the number of characters and lines. The text is never written to a log or an error, and the result of the call does not repeat it. As defence in depth, the add-on refuses text that looks like a private key (a -----BEGIN header), a long unbroken blob of base64-like characters (80 or more), a well-known token shape (cloud access keys, source host tokens, SSH public keys) or an exported list of passwords (three or more lines such as password: ...). This is a heuristic and not a guarantee: the skill also tells the model never to type a secret the person did not dictate.
  • send-key presses up to 8 keys or chords, in order. Allowed: the letters a to z, the digits 0 to 9, up, down, left, right, enter, escape, tab, f1 to f12, and the chords ctrl+alt+delete, ctrl+c and ctrl+z. Windows and Meta chords, modifiers alone and every other key are refused. Single keys use POST /api/hid/events/send_key, chords use POST /api/hid/events/send_shortcut.

Both refuse when the keyboard of the device is not connected to the target.

Limits you set

The switches are on the add-on page, under the connections. Everyone who opens the page sees them. Only an administrator can change them. They are kept for each device address, so a switch for one PiKVM does not open another:

SwitchDefault
Allow typing and key pressesoff
Longest typed text200 characters (1 to 1000)
Allow hard power actionsoff

Only an administrator can change the switches. Other users can read them. A settings file that can’t be read leaves every switch off. They are kept in settings.json in the add-on’s data folder; the add-on runs one process for the server.

What is not supported

  • Screenshots and screen reading. The streamer snapshot is left out of this version. The screen of the target can show secrets, and a snapshot needs a way to hand an image back that this add-on does not have yet. Without it, ask the person what the screen shows.
  • Mass storage. No mounting or uploading of disk images.
  • GPIO, mouse, the HID reset, and the ATX click beyond what power-action covers.
  • Changes to the users or the configuration of the device.
  • Two-factor login. See above.
  • Windows and Meta key chords.
LocalAI docs > Add-ons > Catalogue > Services and devices

SSH

At a glance

TopicDetail
What it addsTools to run one non-interactive command on a remote machine over SSH, and to send a file to it or read a file from it. A person confirms each call by default.
NeedsA connection with a host, a user and a key or a password.

Run commands on a remote machine from your chats and saved agents over SSH. By default a person confirms each command: the card shows the host, the user and the exact text before anything runs.

A chat can answer questions such as:

  • “How full is the disk on the build server?”
  • “Show the last 50 lines of the service log.”
  • “Restart the worker.” (a change: it waits for your confirmation)

The add-on runs one non-interactive command per call. It has no terminal, no input and no environment variables chosen by the model. It has no interactive shell, no port forwarding, no agent forwarding and no jump hosts. Files move only through upload and download, one regular file at a time.

Set it up

  1. Install the SSH add-on from Find add-ons and open its page.
  2. On the machine, make a user just for LocalAI, with only the rights the task needs. A command can change or delete anything that user may touch.
  3. Make a key pair for that user and add the public key to its authorized_keys, or choose a password. A key with a passphrase is not supported.
  4. On the add-on page, choose New SSH connection. Type the host (with the port if it is not 22), the user name and the key or the password.
  5. Press Save. When no host key is trusted yet, the page reads the key the machine presents and asks whether to trust this host, with its fingerprint. Compare it with the one on the machine (ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub), then choose Trust and save. You can also press Check host key first to look at the fingerprint, and tick that you trust it. If the host cannot be reached, the page says so and offers Retry; nothing is saved until you trust the key.
  6. Press Test: the row shows the user and the system name if the login works.

One connection is one host. For a second machine, add a second connection. A chat uses the connections you enable for it in the Tools menu (see The connections of an add-on). With two or more enabled, the model names the connection in each call.

The secret

The connection keeps one sealed secret. It is either a private key in PEM or OpenSSH format, or user:password. For a password the host splits it at the first colon, so the user name has no colon and the password may have colons.

For a key, the user name is the one in the address of the connection. The page asks for the secret again when you change the user or the host, because the saved one belongs to the old ones.

The secret is never in a result, an error, a log or a preview. The add-on also removes it from command output, in whole and in pieces. It refuses a command that holds the secret, so a model cannot ask the machine to echo it or write it to a file.

How the address is kept

The connection lists one allowed address: user@host:port#sha256=<host key fingerprint>. Every tool takes a host argument. LocalAI compares it with the address on the connection before the add-on is called and refuses any other, so a model cannot send the secret to another machine. The add-on dials only that address.

The host key

The add-on trusts a host key on first use, and you approve it when you save the connection. The page reads the key without sending any secret, shows the fingerprint, and the connection stores it as a pin (the SHA-256 of the key, as ssh-keygen -l shows it).

  • The key is checked during the key exchange, before any password or key signature is sent. A machine that presents another key never sees the secret.
  • If the key changes, every call is refused with a message that names both fingerprints. A changed key can mean the machine was reinstalled, or that someone is intercepting the connection.
  • There is no tool or setting that accepts a new key for the model. Only you can trust a new key, by editing the connection on the page and checking the host key again.
  • A connection without a pin never connects.

The mode

Each connection has a mode, set on the page by you and never by a model:

ModeWhat happens to run, upload and download
OffThe write tools are refused. The connection only checks the login. A connection made through the API with no mode starts here.
Asks you firstEach call waits in your approvals. For a command the card shows the host, the user, the exact command, the time limit and the host key. For a file it shows the host, the remote path and the size, never the content. A new connection made on the page starts here.
Runs at onceThe call runs as soon as the chat makes it, with no card.

Choose Runs at once only for a host and a user where a wrong command does no harm. In that mode the model is told to say plainly which command ran. The mode is the host’s write mode of the connection (see Confirming a held write in the chat): the tool declares no approval of its own, so the connection decides. In a messaging chat, the usual rules for who may confirm apply.

Tools

ToolKindWhat it does
get-inforeadLogs in with the pinned key and returns the host key fingerprint, uname -a and the user name.
runwriteRuns one command. Arguments: command (at most 4000 characters) and timeoutSeconds (default 30, at most 45).
uploadwriteSends one file of your files to the remote machine. Arguments: source (a path among your files), path (the remote destination), fileMode (octal, default 0644) and overwrite (default false).
downloadwriteReads one regular file from the remote machine and publishes it as a chat file. Argument: path.

run returns the exit code, standard output and standard error. Each stream is cut at 32 KiB, and a flag (stdoutTruncated, stderrTruncated) says when it was cut. A command that does not finish within the time limit gets its connection closed; the result says timedOut and holds the output so far, and the command may still run on the machine.

The limit is 45 seconds because LocalAI stops a write call after 60 seconds, and the login uses part of that.

Files

upload and download use the same connection, login and write mode as run, and they send no command that a model wrote. Each runs one fixed script on the machine with the paths as quoted arguments. Both refuse a path that is empty, longer than 1024 bytes, holds a control character or a .. segment, ends in / or starts with ~. A relative remote path is relative to the login directory. The credential is never in a path, and a file that holds it is not published.

  • upload reads its source from your files through the host (the add-on asks for the workspace.export operation, which it declares as optional). The source can also be a file that a tool published to the same chat, such as the result of download, so a file can be copied from one machine to another. A file of another chat is refused. The bytes are written to a temporary file in the destination directory, checked for size and, when the machine has sha256sum, for the SHA-256, given the mode, and moved into place. A failed or cut transfer leaves no partial file. Without overwrite, an existing path is refused. The result has the size, the SHA-256 and what was verified. The card shows the host, the remote path, the size and the SHA-256, not the content. The preview reads the file from your files to measure it, and the call is refused if the file changed after you saw the card.
  • download publishes the file as a chat file with its bytes unchanged, under a name made from the remote file name. The result has the name, the size and the SHA-256. Directories, devices, sockets, pipes and files over 16 MiB are refused with a clear message; a file is never cut. A remote file can hold secrets, so the call follows the write mode. In Asks you first the preview asks the machine for the size, with one read-only command that reads no content.

The size limit is 16 MiB in both directions, and both stop after 40 seconds of transfer.

The page also uses a third tool, scan-host-key, to read the host key for you. No model calls it.

Limits and safety

  • One command at a time per connection. A second call is refused while one runs.
  • No double runs. The add-on records a command before it sends it. If the same call repeats, LocalAI returns the recorded answer and doesn’t run it again. If the connection drops after the command started, the result is “unknown” and the add-on doesn’t send it again.
  • Output is data. Results are marked untrusted, and the skill tells the model never to follow instructions in them.
  • Errors are specific. Each of these gives its own message: the host can’t be reached, the login was refused, the host key changed, no host key is pinned, and the host wouldn’t run a command.
  • The add-on reaches any address a connection lists, including addresses on your own network and on the LocalAI machine itself. The secret of the connection is the only limit on what a command can do there.
LocalAI docs > Add-ons > Catalogue > Services and devices

Kubernetes

At a glance

TopicDetail
What it addsTools to read a Kubernetes cluster, and to change it with a confirmation each time unless you say otherwise. An administrator sets a policy for each cluster.
NeedsA connection with a kubeconfig of one context, with its data embedded.

Read and change a Kubernetes cluster from your chats and saved agents. The add-on calls the API server directly. It does not run kubectl.

A chat can answer questions such as:

  • “Why does the web pod in team-a restart?”
  • “Show the last 100 lines of the api logs.”
  • “Scale web to 3 replicas.” (a change: it waits for your confirmation)
  • “Drain node-1 for maintenance.” (a change: it waits for your confirmation)

Set it up

  1. Install the Kubernetes add-on from Find add-ons and open its page.

  2. In the cluster, make a service account for LocalAI with only the rights the task needs. The RBAC of the credential is the outer limit of everything the add-on can do.

  3. Make a kubeconfig with one context and the data embedded:

    kubectl config view --minify --flatten --context=<name>

    For a service account, make a token and use the form with the server, the CA and the token instead:

    kubectl -n <namespace> create token <service-account> --duration=720h
  4. On the add-on page, choose a new connection. Paste the kubeconfig and pick the context, or type the server URL, paste the CA and the token.

  5. Press Save. The page runs the check: it shows the server version and the RBAC rules of the credential in the default namespace, or in the first namespace the policy allows when default is not allowed.

One connection is one cluster and one context. The connection lists the cluster as https://<host>:<port>#context=<name>. The host is written in lower case, and the port is left out when it is 443. A chat uses the connections you enable for it in the Tools menu. With two or more enabled, the model names the cluster in each call.

What the kubeconfig may hold

The kubeconfig is the sealed secret of the connection, at most 16 KiB. The add-on uses only the context of the connection. It refuses a kubeconfig that:

  • runs a credential plugin (exec or auth-provider), such as the login helpers of cloud providers;
  • names a local file (certificate-authority, client-certificate, client-key, tokenFile). Embed the data with the -data fields;
  • turns off certificate checks (insecure-skip-tls-verify: true) or uses a proxy (proxy-url);
  • uses a user name and a password;
  • names a server by a loopback, link-local, unspecified or multicast IP address, such as 127.0.0.1, ::1 or 169.254.169.254, or by a cloud metadata address outside those ranges (fd00:ec2::254, 100.100.100.200), also when it is written inside a NAT64 address (64:ff9b::7f00:1). The credential would go to a service of the LocalAI host or of its network. There is no setting to allow these addresses.

A host name can resolve to such an address too: localhost, a DNS record that points at 127.0.0.1 or at a metadata address, or a form that only the system resolver reads as an address, such as 2130706433. So the add-on also checks the address of every connection after the name is resolved, and refuses the same addresses. It connects directly: it does not use HTTP_PROXY, HTTPS_PROXY or another proxy setting of the LocalAI host. The WebSocket connection of exec cannot use that check, so the add-on resolves the name and checks its addresses just before exec connects; a name whose DNS answer changes in that short time can still pass, and the SPDY fallback of exec is checked when it connects.

For a local cluster made by kind, do not use the kubeconfig that names 127.0.0.1 or localhost. When LocalAI runs in a container on the kind Docker network, use kind get kubeconfig --internal, which names the server by its container (https://<cluster>-control-plane:6443). Otherwise, set networking.apiServerAddress in the kind configuration to an address of the host that is not loopback, such as its LAN address, and use the kubeconfig that kind writes. The certificate of the API server covers that address.

The add-on never reads a file on the LocalAI host because a kubeconfig names it. The kubeconfig is never in a result, an error, a log or a preview.

What the tools do

ToolKindWhat it does
listreadA table of one kind: name, namespace, status, age and columns of the kind. At most 500 rows.
getreadOne object as YAML, without managed fields.
describereadA summary of one object, the related objects and the newest events.
logsreadThe newest lines of a container, cut at 32 KiB.
eventsreadEvents, newest first, for a namespace or one object.
topreadCPU and memory use of nodes or pods. Needs metrics-server.
api-resourcesreadThe kinds the cluster serves, including custom resources.
checkreadThe server version and the RBAC rules of the credential in a namespace.
scalewriteSet the replicas of a Deployment, StatefulSet or ReplicaSet.
rollout-restartwriteRestart the pods of a Deployment, StatefulSet or DaemonSet.
rollout-undowriteRoll a Deployment back to the previous revision or a named one.
delete-podwriteDelete one pod.
cordon, uncordonwriteMark a node unschedulable or schedulable.
drainwriteCordon a node and evict its pods through the Eviction API, so PodDisruptionBudgets hold.
applywriteServer-side apply of one namespaced object, with field manager localai-kubernetes.
patchwriteA strategic merge, merge or JSON patch of one namespaced object.
execwriteRun one command in a container, with no terminal and no input. Off by default.

Everything the cluster returns is data, and every result says so. A model must not follow instructions it finds in a log, a label or an event.

Changes and confirmation

Every write tool declares approval: always. By default a person confirms every call: the card shows what will change. For apply and patch the card shows a diff of the live object against the result of a server-side dry run (dryRun=All). The API server runs its defaults, validation and admission for the dry run, so the diff is what the write will really do.

When you confirm, the add-on checks the call again. If the object or the policy changed after the card was made, nothing is written and the result says the preview is stale.

Not asking for some tools

On the add-on page, the section for approvals has one choice for each write tool: ask each time (the default) or always run. The choice is your own user setting. No chat, agent or model can change it.

  • It holds only for your own chats. Triggers, jobs, sub-agents and messaging senders that are not paired with you are still asked.
  • A call that runs without a card goes through the same checks and the same policy. For apply and patch the result still carries the diff.
  • The write mode Allow all of a connection lifts the confirmation of every write tool for your own chats.

The policy

An administrator sets a policy for each cluster on the add-on page. The add-on checks it on every call, confirmed or not. Skipping a confirmation never widens what a call can touch.

RuleBuilt-in defaultWhat it does
namespaces*The namespaces the tools may read and change. A namespaced call outside the list is refused. A list across all namespaces returns only the allowed ones, whatever the selectors say. check also stays inside the list.
writeToolsnoneThe write tools that work. A disabled tool is still offered to the model and answers that the policy disabled it.
readSecretValuesonWhen on, the tools show Secret values to the model. When off, they hide them. See Secret values for what hiding covers and what it does not.

The policy of a cluster is keyed by its server URL, written one way: the host in lower case without trailing dots, an IP address in its canonical form (2001:0db8::0001 is 2001:db8::1, and ::ffff:10.0.0.1 is 10.0.0.1), the port read as a number and left out when it is 443 (:0443 is left out too), and no trailing slash. A server URL with a query or a fragment, even an empty one (a bare ? or #), is refused. A host name in Unicode is not converted to its punycode form (xn--): the two forms of one name are two keys, so write the server the same way in every kubeconfig. Every context and every connection of one server share one policy, so renaming a context in the kubeconfig, or writing :443, does not change which policy applies.

The add-on does not resolve names to match policies. Another name for the same API server, such as a second DNS name or its IP address instead of its name, is another key, and it gets the default policy. So set a strict default policy (few namespaces, no write, Secret values hidden) and give each cluster its own policy, rather than a broad default.

A cluster with no policy of its own uses the default policy. Out of the box the default allows reads in every namespace, Secret values included, and no write: the page shows such a cluster as “Not configured: writes are off” until an administrator saves a policy for it. An administrator can also change the default policy itself: choose Default for clusters with no policy in the cluster list.

Cluster-scoped objects are always readable. The only cluster-scoped writes are cordon, uncordon and drain of a node. apply and patch of a cluster-scoped kind (a Namespace, a ClusterRole, a CustomResourceDefinition) are refused.

A refusal names its rule, for example refused by the connection policy (namespaces).

The policy is kept in policy.json in the data folder of the add-on. If that file cannot be read, every cluster gets no namespace, no write, and Secret values hidden, until an administrator saves a policy again. The damaged file may have held any policy, so this is the only policy that is never broader than one an administrator set. Cluster-scoped objects, such as nodes, stay readable, as under every policy. The page keeps working, so an administrator can repair the file there.

The next save keeps the damaged file aside as policy.json.damaged-<time> and starts a new file. That new file stores the same no-namespace policy as its default policy, and holds only the policy that was saved. Every other cluster keeps the no-namespace policy until an administrator enters its policy again; the old policies are in the file kept aside. A save that names only some rules takes the others from the no-namespace policy, so it must name the namespaces.

Policies saved by an earlier build were keyed by server and context, or by a server written another way. They move to the key of their server by themselves; an entry already under that key wins. When two entries of one server had different policies, neither applies: the page lists them, the server gets the no-namespace policy (no namespace, no write, Secret values hidden) rather than the default policy, which may be broader than both, and saving a policy for that server removes them. The page shows such a server, and every cluster under a no-namespace default policy, as “No namespace: reads and writes are off”. An entry whose key is not a server the add-on accepts (for example a loopback address) never applies. The page lists it on its own, and the next save removes it.

With several frontends, the add-on runs on the add-on owner, and every frontend sends its tool calls there. So there is one policy file, on the instance that runs the add-on owner.

Secret values

The model sees Secret values unless an administrator turns readSecretValues off, for one cluster or in the default policy. A value the model reads goes to the model and stays in the chat history.

With readSecretValues off, “hidden” means that the read tools (get, describe, list) and the diffs and results of the write tools do not show a value:

  • A Secret shows its keys, its type and the length of each value, never the value. Its last-applied-configuration annotation is removed, and its other annotations show only their length, except kubernetes.io/service-account.name and kubernetes.io/service-account.uid.
  • An environment variable whose name holds TOKEN, PASSWORD, SECRET or KEY (in any case) shows *** instead of an inline value. This covers every container list (containers, initContainers, ephemeralContainers) at any depth of any object: pods, the pod templates of Deployments, StatefulSets, DaemonSets, ReplicaSets, Jobs and the jobTemplate of CronJobs, and custom resources that use the same field names. A secretKeyRef stays visible: it names a Secret and a key, and holds no value.
  • The diff of apply or patch marks a Secret key, a Secret annotation or a hidden environment value that the write changes as (new value), without the value.
  • A json patch of any kind may not use copy, move or test, and may not name an env list or a place under one. On a Secret it may also not name data, stringData or the whole object. Those operations could copy a value to a place that is shown, rename an environment variable so that its value shows, or answer yes or no about a value. Use a merge or strategic patch.
  • apply may not set a Secret key under data or stringData that the live Secret already has, a Secret annotation that the live Secret already has and that is masked, the kubectl.kubernetes.io/last-applied-configuration annotation of a Secret, or the inline value of an environment variable with a secret-looking name that the live object already has (matched by container list, container name and variable name). The add-on applies without force, so when another field manager owns the value, a wrong value comes back as a conflict and the right one does not. Leave those values out of the manifest, change them with a merge or strategic patch that replaces the whole value, or ask an administrator. A new Secret, and new keys and annotations of an existing one, can still be applied.
  • While values are hidden, an apply to an object that exists carries the resourceVersion the add-on read for that check, unless the manifest names one. So if another writer changes the object between the check and the write, the apply fails with a 409 conflict whatever the manifest holds; apply again.
  • An API error about a Secret keeps only its status code and reason, because the API server can quote a value in the message.

“Hidden” does not cover:

  • the args and command of a container, environment values whose name does not look secret, and other fields of custom resources;
  • what a workload shows. A pod that a chat creates with apply can mount a Secret or print it, and its logs then show the value. exec output is not filtered: a command can print a Secret that the container holds;
  • what the cluster itself puts in events or in the status of an object;
  • the diff of a merge or strategic patch that sets a hidden value. It says “no change” when the new value equals the live one and (new value) when it differs, so a chat that may patch can test a guess of a value, one guess per preview. Leave patch off for a cluster where that matters: with patch off and the apply checks above, the write tools give no way to test a guess.

To keep a chat from reading Secret values through a workload as well, turn readSecretValues off and leave apply, patch and exec off for that cluster, or limit the RBAC of the credential. Out of the box every write tool is off.

Errors

API errors keep their status, reason and message, so the model can act on them. The message, and the reason a drain could not evict a pod, are quoted and marked as data, not instructions, because an admission webhook can write any text there. An error about a Secret keeps only its status and reason while the policy hides Secret values. A 403 says the RBAC of the credential does not allow the call; a 401 says the cluster refused the credential. scale tries once more after a 409 conflict: it writes with the resourceVersion it read, so another writer that came first makes it fail instead of being overwritten. Nothing else is retried. A server-side apply does not force ownership: a conflict with another field manager comes back as an error.

Limits

  • The kubeconfig is at most 16 KiB, with one context and embedded data. No credential plugins and no file references.
  • One drain call ends within 50 seconds, checks included, because LocalAI stops a write after 60 seconds. It evicts at most 50 pods, starts no eviction in the last 5 seconds, and waits for the evicted pods to go at most timeoutSeconds (at most 45). The result lists pending pods (evicted, not gone yet) and remaining pods (not evicted yet); a second call continues, and the node is already cordoned. An error after the cordon ends the call with a partial result and an error field, not with an error that says nothing changed. A 429 from API Priority and Fairness is reported as throttling, not as a PodDisruptionBudget; after one, the drain waits the Retry-After of the server (1 to 2 seconds) before the next eviction, and stops evicting when that wait would not fit in the 50 seconds.
  • exec runs for at most 45 seconds and its output is not filtered. One exec runs per pod at a time.
  • No cluster-scoped apply or patch, no port forwarding, no interactive exec or attach, no file copy, no Helm and no watches.
  • top needs the metrics.k8s.io API (metrics-server).
  • A read ends within 28 seconds, because LocalAI stops a read after 30. A list across many allowed namespaces reads them one by one; when the time runs out it returns what it read with partial: true and the namespaces in notRead.
  • describe of a Deployment reads at most 100 of its replica sets, by the labels of its selector, and at most 20 of its pods.
LocalAI docs > Add-ons > Catalogue

Models and media

These add-ons add pages for working with models and media.

  • Studio

    Make images, video, 3D models, speech and sound, and find what you made later.

  • Talk

    Have a spoken conversation with a model: your voice goes in, the answer is spoken back.

  • Voice

    Recognise who is speaking, keep the voices that text to speech can use, and speak text with them.

  • Face

    Find out whose face is in a photo, or whether two photos show the same person.

  • Fine-tuning

    Train an adapter on your own data, then export it as a model you can chat with.

  • Quantization

    Shrink a model to a smaller quantized file, then import it so you can chat with it.

  • Pirate Face search

    Add Pirate Face as a source of the model search.

  • Ollama search

    Add the Ollama model library as a source of the model search.

Subsections of Models and media

LocalAI docs > Add-ons > Catalogue > Models and media

Studio

At a glance

TopicDetail
What it addsA page to make images, video, 3D models, speech, sound and transformed audio with the models you have installed, and to keep what you make.
NeedsThe models for the kind of media you want to make.
Note

Install Studio from Find add-ons with Install, then turn it on in My add-ons (see the user guide). It then shows in My add-ons, and you can pin it to the sidebar. It opens at /app/addons/studio/studio.

Make images, video, 3D models, speech and sound with the models you have installed, and find what you made later. Studio opens on a front page with a prompt box and your own work. Each type still has its own workspace page (Images, Video, 3D, TTS, Sound, Transform, Diarization) where a run happens.

Make something

Type what you want in the box under What do you want to make?, or pick a type first. The box suggests a type from keywords in your text, for example “Sounds like Video”. It never switches by itself and calls no model.

KeyAction
/Focus the prompt box
Alt+1 to Alt+7Pick a type, in the order of the chips
Ctrl+Enter (Cmd+Enter)Generate
Alt+EnterTake the suggested type
EscClose the details in a lineage view

Generate opens the workspace for the chosen type with the prompt, the model, and the options that workspace has already filled in: size and count for Images, size for Video. The run itself happens on the workspace page, as before. The front page does not run anything.

3D, Transform and Diarization start from a file. Use the Start from list to pick one of your earlier results as the file, or add a file on the next page.

A type with no model

A type with no installed model is a dashed chip. Picking it shows one model from the gallery, its download size and memory need where the gallery knows them, the memory free now, and an Install button. Nothing installs until you press it, and the words you typed stay in the box while it installs. When the gallery gives no size, the note says so.

Your work

Your work lists the results in your history, newest first, with filters for each type and counts. Each tile shows a thumbnail (a waveform drawing for audio, one bar per speaker for diarization), the prompt, the model and the age. The star marks a favourite.

Results made from each other stack into one project tile. Open a tile to see the lineage.

Where the history is kept

The Studio add-on keeps your history itself, one history for each user, in a SQLite file in the add-on’s data directory, so it follows you to other browsers and devices. Without user authentication there is one history for the instance. Only the records are kept there: the prompt, the model, the options and the links of the results. The files stay on the server where the generation wrote them, and 3D stays in this browser (in IndexedDB, up to 20 entries, with the model file).

Each workspace adds a record when a result is produced: images, video, TTS, sound, audio transform and diarization. Diarization keeps the file name, the model and the speaker count only. It never keeps the recording or the transcript. A prompt longer than 2000 characters is cut when it is stored, and a record can have at most 8 KiB. The add-on keeps up to 1000 records for each type; a new one beyond that removes the oldest. Favourites are a list of up to 500 ids in this browser.

The browser keeps a copy of the newest 100 records of each type for each user. A delete or a Clear made while the add-on cannot be reached is sent the next time it can. Such a Clear removes the records made up to that moment, also those beyond the newest 100, and keeps any made later on another device. A deleted record does not come back from a browser that still has an old copy. The first time this browser reaches the add-on, the history it kept before goes to the user signed in at that moment. If the add-on cannot be reached, a browser that never reached it keeps using its own history, and a browser that already held someone’s history shows none until the add-on answers again, so two people who share a browser never see each other’s work.

The page reads and changes the history with tools only the add-on’s own page can call (ui-history-list, ui-history-put, ui-history-delete, ui-history-clear). No chat, agent, trigger or model is offered them. Backup, restore and purge of the add-on include the history, like the rest of its data directory.

Results made before this version have no link to the result they came from, so they appear as single tiles. If the server has cleaned its output folder, the tile shows the type icon instead of a picture.

Clear history removes your history in the add-on, the copies in this browser and the favourites, after a confirmation. It does not delete files on the server.

Lineage

When a workspace is opened from a result (for example Animate on a picture), the new result records the id of the result it came from and how: take, animate, to 3D, variation, transform or who spoke. The lineage view draws those links as a board: prompts or files on the left, results next to them, the path through the selected result drawn heavier, and one dashed suggested next step chosen from the installed models.

The dock under the board acts on the selected result:

  • Run as a new take opens the same workspace with the prompt, model and size filled in. It is disabled when the original input was not kept (3D, diarization).
  • Branch from here opens a draft: choose the next step, edit the words, and Open in the workspace with the result as its starting point.

A step is listed but disabled, with the reason, when the destination page cannot start from that kind of result yet. Today a video cannot start a sound and a 3D object cannot start a clip.

Arrow keys walk the board, B branches and Esc closes the draft, then the details, then the view.

The workspace page

All seven workspaces share one layout, under a row of tabs, one per type:

  • Compose card. Optional sources as dashed chips (a start image, reference images, an end image, avatar audio), or a drop area where the run cannot start without a file (a recording for Diarization, audio for Transform, a picture for 3D). Then the prompt, with starters while it is empty, a model chip, the essential options as chips (size and count, duration and frame rate, voice, mode), and an Advanced fold that names what is inside when it is closed. Below that: the memory the model needs and whether it fits, when the gallery knows it, and one button. When the button cannot run, the reason is next to it. With no model for the type, the install note from the front page shows in the card.
  • Run area. While a request is out, a job card shows the model and options and the time that has passed. The bar has no percentage because the server doesn’t report progress. A failed run shows what the server said, says the prompt and settings are still there, and offers Try again. A finished run shows the result in a viewer for its type (picture grid, video player, waveform player, 3D viewer, spectrograms, or a timeline of speakers) with a toolbar:
    • Favourite, the same list the front page keeps.
    • Download.
    • Use in lists where the result can go next. A step is disabled, with the reason, when the destination cannot start from it, or when no model for it is installed it says so.
    • Re-run with edits puts the result’s values back in the form. The fields you then change are outlined and listed under Changed from this take, and the button reads Run again. It is disabled when the original input was not kept (3D, diarization).
    • Lineage opens the lineage view of the front page for this result.
  • Recent results. A strip of the results of this type from the same history, with an All and a Favourites filter. Click a tile to show it above, and click it again to go back to the latest.

Diarization lists who spoke when as one lane per speaker, the talk time of each speaker, and the segments with their text when the model returned it. RTTM, SRT (only when there is text) and JSON are built in the browser from the result in hand.

What a workspace accepts from the front page

The workspaces read these query parameters, so a link of your own works too: prompt, model, size, n (count), from (the id of the result it starts from) and edge (how). For example /app/addons/studio/studio/video?prompt=Slow%20push-in&from=<id>&edge=animate.

LocalAI docs > Add-ons > Catalogue > Models and media

Talk

Talk starts a realtime voice session with a pipeline you pick (speech in, model, speech out) and plays the answer.

At a glance

TopicDetail
What it addsThe page /app/addons/talk/talk. It can use the MCP servers that you added in the browser. LocalAI checks permissions on every call.
NeedsA realtime pipeline model to talk to.
GuideRealtime API and The Talk add-on in the contract reference
LocalAI docs > Add-ons > Catalogue > Models and media

Voice

Voice adds a page where you recognise who is speaking, keep the voices that text to speech can use, and speak text with them.

At a glance

TopicDetail
What it addsOne page, /app/addons/voice/voice, with four tabs: Recognition, Library, Text to speech and From a recording. The Library tab is for administrators.
NeedsFor the Recognition tab, the Voice Recognition permission (voice_recognition), which is on by default.
GuideVoice Recognition
LocalAI docs > Add-ons > Catalogue > Models and media

Face

Face adds a page where you identify a face in a photo, check whether two photos show the same person, and manage the faces you enrolled.

At a glance

TopicDetail
What it addsOne page, /app/addons/face/recognition, for the three tasks above. The detect and embedding tools are under More tools.
NeedsThe Face Recognition permission (face_recognition), which is on by default.
GuideFace Recognition
LocalAI docs > Add-ons > Catalogue > Models and media

Fine-tuning

Fine-tuning adds a page and chat tools to train an adapter on your data and export it as a model. The training backends are built into LocalAI.

At a glance

TopicDetail
What it addsThe page /app/addons/fine-tuning/jobs and chat tools: list jobs, propose a job, store a small dataset, read the status and the checkpoints of a job, stop a job and export a checkpoint as a model.
NeedsThe Fine-Tuning permission (fine_tuning), which is off by default for new users on a server with accounts.
GuideFine-tune a model
LocalAI docs > Add-ons > Catalogue > Models and media

Quantization

Quantization adds a page and chat tools to shrink a model to a smaller file and import the result. The quantization backend is built into LocalAI.

At a glance

TopicDetail
What it addsThe page /app/addons/quantization/jobs and chat tools: list jobs, propose a job, read the status of a job, stop a job and import the result as a model.
NeedsThe Quantization permission (quantization), which is off by default for new users on a server with accounts.
GuideQuantize a model
LocalAI docs > Add-ons > Catalogue > Models and media

Pirate Face search

The Pirate Face search add-on (ID pirateface-search) adds Pirate Face as a source of the model search on the Models page and in the Assistant.

If you searched Pirate Face before, install this add-on to keep doing it. LocalAI doesn’t install it for you. Until you do, the Models page shows a short hint for a Pirate Face choice that has no add-on.

At a glance

TopicDetail
What it addsOne source of the model search: open-weight models that Pirate Face lists, with their size and number of seeders.
What stays in LocalAIThe BitTorrent downloader, the pirateface:// and magnet: schemes and the importer. A result installs through the same route as before, POST /models/import-uri.

Use it

  1. Install the add-on.
  2. Open the Models page, Explore tab. A chip with a p2p tag appears next to Hugging Face with no other step. To turn the source off, press Sources and switch Pirate Face off.
  3. Search by name. The results come from the plain text search page of Pirate Face. The source has no list of new models, so with no search text it shows a note.
  4. The source has one filter, Minimum seeders. It hides the models that fewer peers share. The slider appears next to the other filters when the Pirate Face chip is picked.

Your choice of sources is saved with your account. If you turned Pirate Face off and then removed the add-on, it stays off when you install the add-on again.

What the add-on does

The add-on reads https://pirateface.co/s/<query>, the plain text search page. It doesn’t call the /api paths of the site. Its calls go out like the calls of any add-on, under the network rules of your server. It keeps no data.

The host checks every row the add-on returns. A row whose address does not start with a scheme the importer accepts, or that has a field over its size limit, is dropped and counted: the Models page shows “N results skipped”. Gated models have no magnet link on the site, so they don’t appear.

For the contract of a model search source, see Model search sources.

LocalAI docs > Add-ons > Catalogue > Models and media

Ollama search

The Ollama search add-on (ID ollama-search) adds the public model library of Ollama as a source of the model search on the Models page and in the Assistant.

LocalAI doesn’t install it for you. Install it when you want to find Ollama models from LocalAI.

At a glance

TopicDetail
What it addsOne source of the model search: the models of the Ollama library, with their downloads, last update, capabilities and sizes.
What stays in LocalAIThe importer and the ollama:// scheme. A result installs through the same route as any other, POST /models/import-uri.

Use it

  1. Install the add-on.
  2. Open the Models page, Explore tab. A chip named Ollama appears next to Hugging Face with no other step. To turn the source off, press Sources and switch Ollama off.
  3. Search by name, or leave the search box empty and pick the Latest sort to see the newest models of the library.
  4. The source has three filters: Tools, Vision and Thinking. Each one keeps the models that have that capability.
  5. To install a model, use the uri of the result, ollama://<name>, with POST /models/import-uri. To pick a size, enter ollama://<name>:<tag> yourself, for example ollama://qwen3:8b.

Tag choice is not in the Models page yet. Opening an Ollama result does not list its tags, and the source does not show the variants hint. The add-on can already read the tags page of a model: its search tool takes a variants argument that returns one entry per tag with its size and context window. A later change of the host has to call it before the page can show the tags.

The Downloads sort gives the most pulled models first. The Updated and Latest sorts give the most recently updated first. The other sorts of the host are ignored.

Your choice of sources is saved with your account.

What the add-on does

Ollama has no public search API, so the add-on reads two pages of the site: the search page, https://ollama.com/search, and, when the variants argument is set, the tags page of one model, https://ollama.com/library/<name>/tags. It doesn’t call the /api or /v1 paths, which the robots.txt of the site disallows. It sends the user agent LocalAI model search (+https://github.com/mudler/LocalAI), waits at most 20 seconds for a page, and reads at most 4 MiB of it. Its calls go out like the calls of any add-on, under the network rules of your server. It keeps no data.

  • The add-on asks the site for local models only, so models that run only in the cloud are not listed.
  • MLX and other non-GGUF builds are left out of the tags the add-on lists.
  • A search page shows the first results only. The add-on doesn’t load the rest, so a search gives about a dozen results, fewer than the limit you set when the site shows fewer.
  • Because the add-on reads HTML, a change of the site layout can break it. When the layout is not the one it knows, the source shows a failed status that names the page, never an empty list. Update the add-on to fix it.

The host checks every row the add-on returns. A row whose address does not start with a scheme the importer accepts, or that has a field over its size limit, is dropped and counted: the Models page shows “N results skipped”.

For the contract of a model search source, see Model search sources.