Subscription-based providers
Some cloud providers offer a subscription, which has a fixed monthly fee instead of pay-per-use (unlike the API keys).
In a nutshell, subscription-based providers work by either reusing your existing CLI tools (e.g. Claude Code, GitHub Copilot and OpenAI Codex via ACP) whereas some require installing the ACP server manually (e.g. Google Antigravity). Because they require something to be installed on your device, these providers are not available on Mobile (Android or iOS) or standalone mode.
See also the dedicated Privacy section to better understand what data is being sent to a cloud provider.
Using the Flatpak
The Flatpak version of Trilium (see Installing from Flathub) runs in a sandbox that hides the programs installed on your computer, so on its own it cannot find Claude Code, the GitHub Copilot CLI, the Codex CLI or Google's Antigravity ACP server. Trilium can start them outside the sandbox once you allow it to:
Install the CLI on your computer and sign in to it, as described below for each provider.
Allow Trilium to start programs outside its sandbox by running this in a terminal:
flatpak override --user --talk-name=org.freedesktop.Flatpak org.triliumnotes.TriliumRestart Trilium, then go to Options → AI / LLM and add the provider.
Trilium then looks the CLI up in your computer's PATH and in your login shell's, and starts it there through flatpak-spawn --host. Until the permission is granted, adding one of these providers fails with a message that repeats these steps.
The environment variables that point Trilium at a CLI (such as TRILIUM_CLAUDE_CODE_PATH) name a file inside the sandbox, so with the Flatpak, leave them unset and let Trilium find the CLI on your computer.
Claude Code
To use a subscription:
- First, Claude Code needs to be installed on the machine that runs Trilium. So for a Desktop Installation, Claude needs to be installed locally and for a Server Installation accessed via a browser, Claude needs to be installed on the server.
- Claude Code must already be authenticated. To do so, run
claudein a terminal once, type/loginand follow the instructions. - Go to Options → AI / LLM and add the Claude Code provider.
How Trilium identifies your Claude Code binary
In this order:
- By looking for a
TRILIUM_CLAUDE_CODE_PATHenvironment variable pointing to the Claude binary. This allows overriding the path if needed. - By looking for
claudein your PATH, generally works in most circumstances. - By asking your login shell for its
PATHwhich lets a desktop install find a CLI installed throughnvm,fnm,asdfor Homebrew, since a GUI-launched app doesn't inherit your terminal's environment.
After your provider is set up, you'll benefit from the same features as an API key (note tools, web search, extended thinking, image/PDF attachments, streaming).
GitHub Copilot
GitHub Copilot gives access to the models of your GitHub Copilot subscription (Pro, Pro+, Business or Enterprise), without an API key. Usage counts against your Copilot plan.
- Install the GitHub Copilot CLI on the machine that runs Trilium, for example with
npm install -g @github/copilot. As with Claude Code, for a Server Installation it needs to be installed on the server. - Sign in by running
copilot loginin a terminal once. If you already use GitHub Copilot in another editor on the same machine, that login is reused. - Go to Options → AI / LLM and add the GitHub Copilot provider.
How Trilium identifies your Copilot CLI binary
In this order:
- By looking for a
TRILIUM_COPILOT_PATHenvironment variable pointing to the Copilot binary. - By looking for
copilotin your PATH. - By asking your login shell for its
PATH, the same as for Claude Code.
Known limitations
- The agent can only work with your notes through Trilium's note tools; its own file, shell and web tools are blocked for security reasons.
- Images can be attached to the conversation, PDFs cannot. The LLM should still be able to read PDF notes and attachments via Text Extraction (OCR) when the note tools are enabled.
Google Antigravity
Google Antigravity gives access to Gemini models using a Google account (free, Google AI Pro or Google AI Ultra), without an API key. At the time of writing, a free Google account is enough to use it.
Unlike Claude Code or GitHub Copilot, Google's Antigravity ACP server is not part of the CLI so it needs to be installed manually just for Trilium. The downloaded archive is around 112-334 MB and the extracted size is around 230 MB-2 GB based on the platform.
Windows
- Download Google's Antigravity ACP server for your platform. The link is shown when adding the provider in Options → AI / LLM. Unpack it on the device that runs Trilium.
- Make it findable by Trilium, either:
- by adding the unpacked folder to your PATH, or
- by setting a
TRILIUM_ANTIGRAVITY_ACP_PATHenvironment variable pointing toagy_acp_server.exe.
- Go to Options → AI / LLM and add the Google Antigravity provider. When the list of models is loaded for the first time, the Google sign-in page opens in a browser on the machine running Trilium; finish signing in there.
Linux & macOS
- Download Google's Antigravity ACP server for your platform. The link is shown when adding the provider in Options → AI / LLM. Unpack it on the device that runs Trilium.
- Make it findable by Trilium, either:
- by adding the unpacked folder to your PATH, or
- by setting a
TRILIUM_ANTIGRAVITY_ACP_PATHenvironment variable pointing toagy_acp_server.par.
- Go to Options → AI / LLM and add the Google Antigravity provider. When the list of models is loaded for the first time, the Google sign-in page opens in a browser on the machine running Trilium; finish signing in there.
NixOS
On NixOS,
antigravity-acppackage is already available but only innixos-unstableat the time of writing. The easiest method to test it out is to use thenix shellwith flakes:NIXPKGS_ALLOW_UNFREE=1 nix shell --impure github:nixos/nixpkgs/nixos-unstable#antigravity-acp triliumGo to Options → AI / LLM and add the Google Antigravity provider. When the list of models is loaded for the first time, the Google sign-in page opens in a browser on the machine running Trilium; finish signing in there.
Known limitations
- The agent can only work with your notes through Trilium's note tools; its own file and shell tools are blocked for security reasons.
- The Antigravity ACP server requires authentication via a login link. The login link needs to be run on the same device, so it might not be possible to set up the provider while using the web version of a Docker installation. Desktop Installation should work fine.
- Images can be attached to the conversation, PDFs cannot. The LLM should still be able to read PDF notes and attachments via Text Extraction (OCR) when the note tools are enabled.
- The results of tool calls (e.g. reading a note, writing attributes) are not properly displayed because they are not exposed by the ACP server.
OpenAI Codex
OpenAI Codex gives access to the Codex models of your ChatGPT plan (Free, Go, Plus, Pro or Business), without an API key. At the time of writing, a free ChatGPT account is enough to use it. Usage counts against your plan's Codex limits, which are small on the Free plan.
Most platforms
- Install the Codex CLI on the machine that runs Trilium, for example with
npm install -g @openai/codex. As with Claude Code, for a Server Installation it needs to be installed on the server. Trilium ships the ACP adapter that connects to it, so nothing else is needed. - Go to Options → AI / LLM and add the OpenAI Codex provider. When the list of models is loaded for the first time, the ChatGPT sign-in page opens in a browser on the machine running Trilium; finish signing in there.
NixOS
On NixOS, Codex is available as the
codexpackage in nixpkgs. The stable channel can lag behind Codex's releases, so a newer version can be taken fromnixos-unstable:nix shell github:nixos/nixpkgs/nixos-unstable#codex triliumGo to Options → AI / LLM and add the OpenAI Codex provider. When the list of models is loaded for the first time, the ChatGPT sign-in page opens in a browser on the machine running Trilium; finish signing in there.
Trilium keeps its own Codex sign-in and settings, separate from any Codex CLI you use in a terminal, so an existing codex login is not reused.
How Trilium identifies your Codex CLI binary
In this order:
- By looking for a
TRILIUM_CODEX_PATHenvironment variable pointing to the Codex binary. - By looking for
codexin your PATH. - By asking your login shell for its
PATH, the same as for Claude Code.
Known limitations
- The agent can only work with your notes through Trilium's note tools, and search the web when the chat allows it; its own file, shell and other tools are blocked for security reasons.
- The ChatGPT sign-in opens in a browser on the device running Trilium, so it might not be possible to set up the provider while using the web version of a Docker installation. Desktop Installation should work fine.
- Images and SVGs can be attached to the conversation, PDFs cannot. The LLM should still be able to read PDF notes and attachments via Text Extraction (OCR) when the note tools are enabled.