Skip to main content

Subsections of Concepts

LocalAI docs > Concepts

Architecture

LocalAI is a server written in Go: an API, chats, files and agents on top of separate backends. A program that uses an OpenAI SDK works with LocalAI after you change the base URL. Anthropic clients work too. It runs on a laptop CPU, and a GPU makes inference faster. Each backend runs as a separate gRPC process, and many are written in C++. You can build your own gRPC server, or point LocalAI at an external gRPC server that you run yourself (LOCALAI_EXTERNAL_GRPC_BACKENDS).

Backends are written in C++, Go and Python. The compatibility table lists which backend runs which model family.

How LocalAI works: clients call one API on a small core with chats, agents, an add-on host and an MCP client and server, which talks over gRPC to a separate backend process for each model, running on your own hardware.How LocalAI works: clients call one API on a small core with chats, agents, an add-on host and an MCP client and server, which talks over gRPC to a separate backend process for each model, running on your own hardware. How a request flows: the client calls the API, the model config picks a backend, the backend process runs the model over gRPC on your hardware, and tokens stream back.How a request flows: the client calls the API, the model config picks a backend, the backend process runs the model over gRPC on your hardware, and tokens stream back.
LocalAI docs > Concepts

Users and sharing

Without accounts, anyone who reaches the server is an admin. With accounts, each person has a login, a role and their own files.

Without accounts

When authentication is off, there is one user. That user can do everything, including the administrator tasks. You can protect the API with a key, but the key gives full access.

With accounts

Turn on user authentication to get accounts. See Authentication. There are two roles.

  • Admin: manages models, backends, settings, users and add-ons. The first user who signs in is an admin.
  • User: uses the inference endpoints and the web interface. A user cannot change server settings.

New people join in one of three ways, set by the registration mode: open (anyone), approval (an admin approves, and this is the default) or invite (an admin gives a single-use invite link, /invite/<code>). An admin creates invite links in Administration > Access > Users with Invite someone.

Features per user

An administrator switches parts of LocalAI on or off for each user. Some features are on by default for a new user. Others are off until an administrator turns them on.

Off by default for a new userOn by default
collections, localai_assistant, agents, triggers, connectors, mcp_jobs, pages, addons, fine_tuning, quantizationThe API features, such as chats, images, audio_speech and embeddings

Administrators always have every feature. To change a user, open Administration > Access > Users and edit the permissions of the user. A feature that is off hides its pages and refuses its routes.

What is yours

Each user has their own files, chats, saved agents, pages and add-on connections. Other users do not see them. An administrator can read the saved agents, triggers and connectors of every user, switch them off and delete them, but not run them as that user.

Sharing

Nothing is shared by default. A person shares something they own, and they choose who gets it and what they can do.

What you shareRoles
A folder of your homeCan read, Can edit
A saved agentUse, View
An add-on resource, such as a Tables databaseViewer, Editor
A shared folder, made by an administratorCan read, Can edit

You can share with one person or with Everyone. A grant to Everyone also reaches accounts that are made later. A person can hold their own grant and the Everyone grant. Both add up.

The owner is never a grant. Only the owner shares, changes the grants or deletes the resource. Sharing is never a tool: no model, agent, trigger or add-on can share or take back access. Only your own browser session can change a grant.

Add-ons and users

An administrator installs an add-on for the whole instance. A user needs the addons feature to use it. Add-ons that connect to a service, such as a mailbox, keep a separate connection for each user, and an administrator approves the service client first. See the add-on user guide.