Skip to main content

GAIA — the flagship agent

GAIA is the agent a new user meets first. One agent handles the everyday work you’d otherwise spread across four: talking things through, answering questions about your own documents, poking at a spreadsheet, and reading the web. It remembers across sessions, and inference runs locally on your machine through Lemonade by default.
GAIA is built on top of the Chat agent — same document Q&A prompt, same RAG discovery, same session persistence. What it adds is breadth: the data, web, and filesystem capabilities Chat leaves off by default, plus a home for add-on skills.

What it does

  • Conversation with memory — facts you tell it persist to an on-device store and come back in later sessions. It can also search your own past conversations.
  • Document Q&A over your files — index a file or a whole folder, then ask questions. PDF, Word, PowerPoint, and plain text; the prompt tells the agent to name which document each fact came from rather than blending sources. Asked to review, compare or reconcile a few documents, it reads each one in full instead — read_file returns the text of Word, PDF and Excel files — so a detail no search asked for, like a date that differs between two of them, isn’t missed.
  • Data exploration — load a CSV or Excel file into a local SQL scratchpad table and query it, so “which region grew fastest” becomes a real query rather than a guess from a truncated preview.
  • Web research — search the web, fetch and read pages, download files. A long page is read in marked parts, or searched for one detail such as a price, rather than cut off unannounced.
  • Files — read, search by name or content, and walk directory trees inside your allowed scope. Writing and editing are available too, behind an explicit confirmation (see Tools that need your approval).
  • Images — describe a local image or answer a question about it, using the local vision model. It can also generate one from a description with local Stable Diffusion; that swaps the resident model, so the reply after an image takes an extra moment while the chat model reloads.
  • Skills — short playbooks loaded into the agent’s own prompt. One ships always-on; the rest are built in and load when asked for. See Skills below for what ships.

Requirements

Install Lemonade, download the model, and start the server:
Inference runs locally by default. The sidecar’s /query endpoint accepts provider: "lemonade" (the default) or provider: "claude", which sends the conversation to Anthropic’s API. Any other provider is rejected with HTTP 400, as is naming a provider together with a model that belongs to the other one. Omit provider and the model decides: a claude-* id goes to Anthropic, anything else runs locally.

Install and launch

This is the shipping entry point: it resolves your platform, fetches and SHA-256-verifies the agent binary and the terminal UI, starts the GAIA daemon plus the agent, and drops you at a chat prompt. A hash mismatch is a hard failure — there is no “continue anyway” path.The terminal UI (gaia-tui) now boots straight into this agent — there is nothing to browse or pick.

Check it’s ready before you ask it anything

GET /v1/gaia/init is a read-only preflight: it probes Lemonade, compares its version against the 2026.44.1 floor, and confirms the model is downloaded. It never pulls or loads a model.
It answers 200 when ready and 503 when not, with a hint naming the fix — Lemonade unreachable, Lemonade too old, or model not downloaded. Liveness alone is GET /health, which never touches the model server.
A 401 here means the sidecar wants a caller token — /v1/gaia/* requires one, while /health and /version don’t. That’s the normal state for the sidecar the daemon spawns. See Authenticating your requests.

Tool surface

On a larger model the default construction registers 102 tools — the 67 of the Chat agent’s full profile, plus 8 skill-library tools, 8 live-browser tools, 8 read-only email tools, 4 code-search tools, 3 image-generation tools, 3 audio-generation tools, and remember_skill_lesson. Some register conditionally: search_documentation needs npx on your PATH, and the browser tools need the browser extra (pip install "amd-gaia[browser]"). Grouped by what they’re for: Every one of them is offered to the model on every turn, as in the Agent UI: a tool list that stays the same keeps the local model’s prompt cache warm. GAIA_DYNAMIC_TOOLS=1 turns on per-turn tool selection instead, which sends the model a subset on each call and adds a 102nd tool, load_tools, that it calls mid-turn to pull in a bundle the selector missed. run_shell_command is rate-limited and needs your approval like the other gated tools. Anything off its read-only no-prompt list (ls, cat, grep, find, stat, df, uname, and similar) — git commit, npm test, rm notes.txt — is shown to you and runs once you approve it, rather than being refused. That includes the CLIs a skill can grant — python script.py, git commit, pip install — when no skill granting them is loaded: loading the skill only means its reads skip the prompt. The prompt shows the command, the folder it runs in when that isn’t your workspace, and one plain line on what it can do; “always” covers that one command family for the session. If you say no, the agent is told not to reach the same result another way, and stops to explain. A command GAIA’s own checks don’t cover — git push, git fetch, python -c, gh auth token, a PowerShell command they can’t read, a line with shell operators like $(…) or >, a path outside the allowed folders — is asked about once: the prompt shows the exact line the shell will run and its full folder, a risk line names what it can do (“Sends your commits to the remote repository.”, “Reads or changes files outside this project: …”, “Can run any code with your permissions — GAIA can’t inspect this command.”), and only “once” or “deny” is offered. A few stay refused with no prompt: an encoded PowerShell command or a line with invisible or line-break characters, a line whose quoting can’t be split the way the shell would, such a line that also deletes or discards work (git push --force, git reset --hard, rm outside the project), and folders no approval can open; the agent tells you the command so you can run it yourself. A command that installs or removes packages outside a virtual environment — pip install (or python -m pip install) into a Python with no pyvenv.cfg, pip install --user, uv pip install --system, uv tool install, pipx install, conda install without -p, npm install -g, winget install and the like — is asked about once, with “Changes … which other programs on this computer share.” as its risk line; in the terminal UI’s full access, where nothing is asked, it is refused; in an Agent UI chat’s Full access it asks instead. Either way the agent tells you the exact command or installs into a virtual environment in the project. Installs into a virtual environment (GAIA’s own included), with --target/--prefix, or into a project’s node_modules are unaffected. A run pre-approved with GAIA_AUTO_APPROVE_TOOLS gets the read-only list and refuses the rest; only full access, which a person turns on and can see on screen, runs the rest unasked in the terminal UI (/full-access, or --full-access); in an Agent UI chat a gated shell command still asks, because the bypass stops the prompts without opening the shell. Installing the specific CLIs a skill needs goes through its own tools instead. Commands can be chained on one line (cd src && ls | grep agent) so looking something up and checking it is a single step — every command on the line is checked against the same allowlist before any of it runs, and one approval covers the line. A leading VAR=value (PYTHONPATH=. pytest -q) sets that one command’s environment and nothing else’s; the variables that decide which binary runs or what code it loads — PATH, LD_PRELOAD, GIT_SSH_COMMAND and their families — stay refused. Commands run without a shell, so $VAR and ~ inside an argument are not expanded (the agent can read the search path with printenv PATH). They see your login PATH: on macOS, an app opened from Finder or the Dock starts with only the system folders, so GAIA reads the PATH your login shell builds when it starts, and tools such as Homebrew’s gh are found (a GAIA you start from a terminal keeps that terminal’s PATH, including an activated virtualenv); if it cannot read it (POSIX-style shells and fish are supported), it warns in the log and the agent says those tools are not reachable from its shell instead of saying they are not installed. A cd that actually ran carries to the next separate call, so cd build in one turn is still in effect on the next — get_shell_state reads the session’s current directory, and reset_shell_session returns it to where the task started; an explicit working_directory is a one-shot override that never moves the session. run_python runs a Python snippet from the project root and returns its output, so the agent can compute or check something without leaving a script in your project. With no project it runs from the current directory, or from the agent’s scratch directory when the current directory isn’t one you allowed (the Agent UI’s case), and its result says so. The scratch directory is shared by every chat on the same project and re-created if something deletes it (another chat’s cleanup, a temp-folder cleaner); a working folder that no longer exists sends the run to the scratch directory, with a note in its result. A Python run gets two minutes by default and the agent can ask for up to 30 for a big data job; one that runs out of time is stopped along with every process it started, and the agent is told which files it changed so a half-written file is not reported as finished. sleep waits up to five minutes per call, so the agent can wait out a rate limit before retrying; pressing Stop ends the wait within a second. How long a command may run depends on what it is — a test run gets 15 minutes, a build or install 30, a script 10, a network call 5, and everything else the usual 30 seconds. wait_for_condition covers the other half of waiting: give it a command that succeeds once the thing you are waiting for is ready (a file written, a server answering) and the agent waits in one step instead of re-checking in a loop. Mail is treated as data, never as instructions. Every message body the email tools return arrives fenced between <<<UNTRUSTED_EMAIL_BODY_START>>> and <<<UNTRUSTED_EMAIL_BODY_END>>>, and a message showing phishing signals comes back flagged with the reason it was flagged. A flagged message is never reported as something that needs action, however urgent it sounds, and the agent will not repeat its call to action as advice — it says what the message claims, that it looks like a lure, and to leave it alone. Reading text aloud needs the voice model downloaded first. text_to_speech speaks through Lemonade’s Kokoro model (kokoro-v1, ~350 MB) and never downloads it in the middle of a chat. Run gaia download --agent talk once; until then the tool tells the agent the model is missing and names that command. Image generation costs you a model reload. Drawing a picture pulls Stable Diffusion into Lemonade and evicts the resident chat model, so the first reply after an image waits for the chat model to load again. The trade is worth it on the flagship, which is general-purpose; the Chat agent’s doc and file profiles leave the sd tool mixin off for exactly that reason.

Smaller models

On Gemma 4 E4B, on the GPU or the NPU, the agent leaves out four features that failed GAIA’s agent evals on that model: the SQL scratchpad (create_table through drop_table), email, image generation, and finding, installing or removing skills (search_skill_hub, install_skill, remove_skill). That is 16 fewer tool descriptions for the model to read on every step. The skills built on them (data-explore, image-gen, inbox-triage) are left out of the skill list too. Asked for one of these features, Gemma says it can’t do it; if it tries to load one of those skills anyway, the load is refused with a message that it needs a larger model. analyze_data_file still answers questions about CSV and Excel files, and installed skills still load. For the full set, pick a larger model in the model list; switching mid-chat gives the tools back, and switching to Gemma takes them away again. GAIA_FEATURE_TIER=full gives Gemma every tool anyway, and GAIA_FEATURE_TIER=compact gives any model the smaller set.

Setting up a CLI a skill needs

Some skills run a command-line tool rather than calling an API — github-triage needs the GitHub CLI, which owns its own login. When that tool is missing or logged out, the agent sets it up for you instead of handing you instructions and stopping. Ask for it in plain words — “set up the GitHub CLI” — and three tools do the work: The check reports one of five states, and only one of them means “sign in”: You approve every install and every sign-in, one at a time. Both are in the confirmation set below, and neither offers an “always” — there is no way to pre-authorize them, and loading a skill does not exempt them. Signing in is a handoff, not automation. GAIA starts gh auth login --web, shows you the one-time code and the device URL, and waits. You enter the code in your browser; the agent cannot type it for you. Afterwards it re-checks and confirms the permissions actually arrived, rather than trusting the exit code. GAIA requests exactly the scopes the skill’s commands can reach — repo and read:org for GitHub — and never sees the token. If any step can’t finish — no code appears, the code expires, the browser sign-in fails — it says so and gives you the command to run by hand. It never reports a setup that didn’t happen.
Linux has no automated install, on purpose. The GitHub CLI is not in the stock Debian or Fedora repositories, and the real install adds GitHub’s apt/dnf repository — a root-level trust decision that is yours, not an agent’s. On Linux you get cli.github.com instead. Windows uses winget, macOS uses brew.

Fast mode — for a session that’s only conversation

Breadth is not free. The tool descriptions and capability instructions are re-read by the model on every call of a turn, and a turn is two to five calls — so a session spent entirely on conversation pays for documents, files, and the web without ever using them. Fast mode drops the agent to a plain conversational surface for the whole session: 3,110 tokens of fixed prompt instead of 17,942 — under a fifth. The personality and honesty rules stay; nothing else does. It keeps the three CLI-setup tools above, which are conversational by design, so “set up the GitHub CLI” still works in a fast session.
It’s session-scoped and one-way. A fast session has no documents, no files, no web, no images, and no skill library, and it cannot pick them up mid-conversation — the tools were never registered. Start an ordinary session when you need them.
Use it when you know the session is chat: a voice front-end, a quick question, a kiosk. Leave it off otherwise — the default agent already trims what the model sees per turn, and keeps every capability available.

Tools that need your approval

Fourteen tools mutate your machine or your accounts and are gated behind an explicit confirmation: write_file, edit_file, run_shell_command, wait_for_condition (it re-runs a shell command until it succeeds), execute_python_file, run_python, notify_desktop (on Windows it spawns a PowerShell child to draw the notification), install_cli and sign_in_cli (they install software and sign you in to an account), browser_login (it opens a window and persists a signed-in session), and — because installing or capturing a skill writes third-party code under ~/.gaia/skills and removing one deletes it — install_skill, capture_skill, and remove_skill, plus forget_everything (it erases all memory and past conversations, and nothing brings them back; skills it learned for doing tasks are kept). Everything else — reading, indexing, querying, web fetching, the other memory tools, and check_cli_setup — runs without asking. The agent’s own scratch folder (gaia-scratch-… in the system temp folder) holds no files of yours, so writing or editing a helper script there runs without asking; a write anywhere else still asks. Running a script from it asks every time, with “allow once” only, since what is in that folder changes without a prompt. The same goes for a shell command that runs there or names a path there (cd into it, pytest, make or pip install pointed at it), and for a script handed a scratch path as an argument — an earlier “always” does not cover them. Full access in the terminal UI (/full-access, or --full-access) runs all of them unasked. In an Agent UI chat, a Python script run from the scratch folder is auto-approved too (execute_python_file, run_python), but a shell command there still asks. The browser’s acting tools are gated by situation rather than by name: clicking and typing on the open web is ungated, the same as fetching a page, but the same click inside a session you signed in to asks first, as does anything whose label reads irreversible. See Driving a browser.
Over the sidecar’s /query stream, a gated tool asks only if you can answer. Pass a session_id (and leave can_answer_questions at its default, or set it true) and the stream stays open on the confirmation — answer it with POST /v1/gaia/query/{run_id}/tool_decision, {"decision": "allow" | "deny" | "always" | "timeout"} (timeout denies and tells the agent nobody answered). A one-shot request that cannot be asked stops with a message saying which action it declined, rather than running it.
In the Agent UI, a Hub-installed GAIA asks with Allow once or Deny above the message box, and the answer goes back to that same run. It doesn’t offer Always allow: that grant would live in the agent’s own process, where the chat could neither list nor revoke it. An unanswered prompt is denied when the agent’s wait runs out. This needs an agent build with contract 2.14 or later. An older build can’t wait for an answer, so it ends the turn and names the action it skipped.

The agent reads a file before it changes it

edit_file, and write_file on a file that already exists, refuse a file the agent hasn’t read with read_file in this session, or one that changed on disk since it did. That stops edits patched together from a search snippet or a guess. The check runs before any approval prompt, so you aren’t asked to approve an edit that is going to be refused, and it still applies with confirmations bypassed. A partial read counts, and creating a new file needs no read. See Read before edit for the exact rule.

File access scope

The agent’s file, document, and data tools are confined to a set of allowed paths. By default that set is your home directory. That’s the honest scope for a personal document agent — “ask questions about my files” means your files — and it is still a real boundary: system directories, program files, and other users’ home directories fall outside it and are refused. The check runs against the resolved path, so a symlink pointing out of the allowed set doesn’t get around it; you get an explicit Access denied: <path> is not in allowed paths. error naming the path you asked for. The allowed set is not the whole story, and shouldn’t be treated as one. Two denylists apply inside it, because “in scope” and “safe” are different questions:
  • Secrets are never read back. .env, id_rsa, credentials.json, .netrc, any .pem/.key, and everything under ~/.ssh, ~/.aws, ~/.gnupg, ~/.kube are refused on read even when they sit in an allowed directory — otherwise “summarise this folder” is a credential exfiltration primitive.
  • Files that run on their own are never written. Shell startup files (.bashrc, .zshrc, .profile), PowerShell profiles, ~/.config/autostart/*, systemd user units, LaunchAgents, and anything inside a repo’s .git/ — hooks and config alike. Writing to one of those isn’t editing a document, it’s arranging for the agent’s output to execute at your next login.
Both are refused with a message naming the file and why. Edit such a file yourself if that’s genuinely what you wanted. Reaching outside the scope asks first. When a tool needs a file or folder outside the allowed set, the TUI and Agent UI show the same approval dialog as a write, naming the path. The prompt waits 10 minutes, then counts as a no. Approving grants that one file, or that folder and everything inside it, until the chat’s agent restarts — never saved, never “always”, and each new path is asked about on its own. The grant is not read-only, but writing or editing is a gated action that still asks on its own. A file or folder that doesn’t exist isn’t asked about: the tool says it wasn’t found, and names a file you already allowed or attached with the same name, if there is one. Paths that stay off limits whatever you answer are refused without a prompt: secrets, system and program directories, the system temp folder, a whole drive, your entire home folder, and any folder that contains one of those. Refusing your home folder, or a drive or folder that contains it, points the agent at the folders inside your home it can still ask for, such as Documents or Movies, so “what’s in my videos folder” ends in a prompt for that folder instead of a dead end. It names only folders an approval could actually grant: none when nobody can answer the prompt or tools are pre-approved, and not one you declined earlier in the same turn. Pre-approved tools (GAIA_AUTO_APPROVE_TOOLS) never answer this prompt; only full access does. The Agent UI scopes a chat to its attached documents, so this is how it reads or indexes a file you name in your own folders; one approval covers reading, indexing and querying it. A tool waiting on this question does not count the wait against its own time limit. Every file tool asks the same way — listing or searching a folder, indexing a document for Q&A, and choosing where a screenshot, transcript or export is saved. To narrow the scope for one run without code, set GAIA_ALLOWED_PATHS before the agent starts — see Narrowing file access. It narrows (except that an Agent UI chat with no attached documents and no overlap is scoped to the listed folders), refuses out-of-scope paths without prompting, and confines GAIA’s tools but not code they run. Embedding the agent, you can construct it with an explicit list:

Memory

Memory is on by default and lives on-device. The agent writes facts you ask it to remember, recalls them in later sessions, and can search prior conversations. forget and update_memory let you correct or drop what it holds. The mechanism, storage location, and how to disable it are covered in the Memory guide.

Skills

Agent Skills are short playbooks an agent loads into its own prompt, grouped into named skill sets — exactly one set is active per launch. GAIA is built to host them: its own bundled skill directory is the highest-precedence discovery root, so a skill shipped with the agent wins over a same-named user copy. One skill ships enabled: gaia-voice. It is declared in the manifest’s always-on skills: list, so it is in the prompt on every call — 790 tokens of it, and it registers no tools. It isn’t a task recipe but the agent’s honesty floor: don’t claim work you didn’t do, don’t present empty output as a result, don’t substitute a near-miss and report success. Those failures spoil an answer whatever the task is, which is why it can’t sit in a bundle you have to opt into. The rest are built in and load on demand. The agent bundles the 17 starter skills from hub/skills/, plus document-extract (lists every item in a long document or transcript) and gaia-harness-engineering (helps a developer report a GAIA problem). Ask for one by name, or let the agent load it when the task matches. Skills from the hub that GAIA does not ship install with gaia skill install. No skill set loads by default, and none is declared. Loading several skill bodies into every prompt costs tokens and shrinks the room left for an answer, and no eval has measured that trade for this agent yet. The manifest’s skill-set declarations ship commented out; enabling them is uncommenting two blocks, with no code change. Once a release declares sets, you select one at launch:
or in Python, which takes precedence over the environment:
A name that isn’t a declared set fails at startup naming the valid sets — the sidecar exits non-zero before it binds its port, and it never silently falls back to a default. Today, with no sets declared, any value fails; leave it unset.

Driving it over HTTP

The agent runs as a sidecar — a self-contained HTTP service the GAIA daemon spawns, health-checks, and tree-kills. It binds 127.0.0.1:8141 by default and is never exposed on a LAN interface: it speaks for your documents and your memory. The full, machine-readable contract — every field, its type, and which are required — is the committed openapi.gaia.json, regenerated from the live routes by python -m gaia_agent.export_openapi and checked for drift in CI. What follows is the summary a client author needs; the artifact is the source of truth.

The /query body

Only query, run_id, and context are required; everything else (model, provider, max_steps, session_id, can_answer_questions, documents, allowed_paths, memory, internet_off, changes_turn_id, surface, reasoning, working_directory, turns) is optional. A request missing any of the three, or sending an unrecognized field, is rejected with 422 before the agent ever runs — the model forbids extra fields (additionalProperties: false) rather than silently ignoring a typo.
  • run_id must be a UUID (any version uuid.UUID() parses) — a plain string like "my-run-1" is a 422, not a warning. You mint it, not the server: cancellation (POST /v1/gaia/query/{run_id}/cancel) keys off it, so it has to exist before the request rather than arrive in the stream.
  • context is pushed in the body, never pulled, and must be present even when empty ([]) — omitting it is itself a 422. Pass session_id too — the agent persists its indexed-document set per session, and without it the agent forgets a document between the turn that indexed it and the next question.
  • Set can_answer_questions: false for one-shot runs. With nobody there to answer, the agent resolves ambiguity itself instead of parking on a question that reads as a hang.
  • A failed model request names the endpoint it went through (contract >= 2.20), and its advice points at the model server the GAIA host uses (LEMONADE_BASE_URL). A front-end with its own settings screen sends surface ("tui", "agent_ui" or "cli") to get its own wording; a headless caller omits it.
  • internet_off takes a chat offline (contract >= 2.23): true refuses web search, page fetches, the browser, connector and Agent Hub tools, mailbox reads, and commands that contact another host. It is a filter on the tool calls GAIA recognises, not a firewall: scripts and skill tools whose destinations GAIA cannot inspect may still reach the network. The refusal tells the model the internet is off for this chat. Send it every turn, because a retained session keeps the last value. To change it during a running turn, POST /v1/gaia/sessions/{session_id}/internet with {"internet_off": true} (or false); the next tool call follows it. Post it only once /query has answered, because the turn’s own internet_off replaces a switch sent earlier; re-read the switch then and post it if it changed.
  • final reports how full the model’s window is (contract >= 2.21): its context field gives the window size, the tokens the next call will take and what takes them. A stopped or failed turn leaves it out.
  • The model’s reasoning can stream on its own (contract >= 2.22): send reasoning: true and it arrives as reasoning events with a delta, apart from status lines and the answer. A model whose chat template opens the reasoning block streams it as tokens until its </think>; the reasoning event that follows carries retracts_answer: true, so drop the token text since the last tool_call from the answer. Without the field it folds into status lines.
  • A reply cut off by a model-server restart is taken back. When GAIA’s model server stops part-way through a reply, the step runs again once it is back, and a status with phase answer_restart and retracts_answer: true comes first: drop the token text since the last tool_call and show its message in its place. While the server restarts, status lines carry phase model_restart, also when it stopped under a tool’s own model calls; a long document extraction reports each page with phase reading (“Reading page 4 of 12…”).
  • A bare file name lands in the chat’s folder (contract >= 2.24): send working_directory, an absolute path, and a relative path in a read, write or edit resolves under it, as does the path the approval prompt names. It sets where a file goes, not what the agent may reach; that is still allowed_paths.
  • The agent can see its own earlier tool calls (contract >= 2.25): send turns instead of context (which must then be [], or the request is a 422), and send [] on the first turn. A request that sent turns gets model_messages on its final, the turn as the model saw it, tool calls and results included; store it with the reply and send it back in turns, oldest first. The agent keeps the newest whole turns that fit its window. turns: [] means no earlier turns and clears a retained session’s history. A caller that sends no turns gets no model_messages.
  • Idle streams emit : keepalive comments every 10 seconds so a long tool call doesn’t look like a dead connection.
  • A user who says something mid-turn doesn’t have to wait for it. POST /v1/gaia/query/{run_id}/followup with {"text": "…"} hands the running turn their words; the agent folds them in at its next step and answers them alongside the work in progress. Nothing is interrupted and no second turn starts. Because context is pushed rather than pulled, record a delivered follow-up in the context you send next turn — between that turn’s question and its answer.
  • Confirmation-gated tools are answered over POST /v1/gaia/query/{run_id}/tool_decision (contract >= 2.14) when there’s a session to hold the grant and the caller declared it can answer — see Tools that need your approval.
/query implements the shared canonical SSE contract (API version 2.27), so every stream is terminated by exactly one final or error event — the guarantee that lets the daemon relay and the terminal UI treat every GAIA agent identically.

Authenticating your requests

Binding to loopback is not access control — this agent has shell and file tools, so an open port would let any page you visit drive it. Three checks guard the sidecar:
  • A per-session bearer token. Every /v1/gaia/* request must carry Authorization: Bearer <token>; without it you get 401. The process that spawned the sidecar supplies the token, either as GAIA_GAIA_SIDECAR_TOKEN_FILE — a path to a 0600, owner-only file, so the secret never sits in the environment — or directly as GAIA_GAIA_SIDECAR_TOKEN. When the GAIA daemon runs the agent, it mints the token and uses the file channel.
  • A loopback Host allowlist. A Host header that isn’t 127.0.0.1, localhost, or ::1 is 400 — this is what defeats DNS rebinding.
  • Origin rejection. A request carrying a non-loopback browser Origin is 403. Non-browser clients send no Origin and are unaffected.
The programs the agent starts (shell commands, MCP servers, CLI installs and sign-ins, native hub agents, media tools) never inherit the sidecar token or GAIA’s other internal credentials. To withhold your own variables from them as well, list the names in GAIA_CHILD_ENV_DENY; GAIA_NO_DOTENV=1 stops the agent loading .env files. Both are described in Configuration. GET /health, GET /version, and GET /v1/gaia/version skip the token — they’re the probes a host polls before any token is in play, and none of them exposes your data. Host and Origin still apply to them. If neither token variable is set, the sidecar starts with the token check off and says so loudly in its log; Host and Origin stay enforced. That’s a local development convenience — a sidecar you started by hand — not something to build on. Full details, including how to supply a token when you spawn the sidecar yourself, are in the package’s SPEC.md §5.4.

Troubleshooting

”Local Lemonade Server is not reachable”

The model server isn’t running. Run gaia init to install and start it, or point the agent at one you already have with LEMONADE_BASE_URL. GET /v1/gaia/init tells you which of the three preconditions failed (reachable / version / model present) rather than making you guess.

”The model … is not downloaded”

The hint GET /v1/gaia/init returns also names the pull command for whichever Lemonade client this machine has, if you’d rather pull just that one model. Then re-run the readiness check.

”Access denied: … is not in allowed paths”

The file resolves outside the allowed paths — by default, outside your home directory — and either you denied the approval prompt or the path is one that is never granted (see File access scope). Ask again and approve the prompt when it appears (an unanswered prompt is denied after 10 minutes), or attach the file to the chat. An agent you construct in code can instead take an allowed_paths list that covers it.

The sidecar won’t start

The daemon redirects the sidecar’s output to ~/.gaia/agents/gaia/logs/sidecar-<port>.log. Check that file first; a failed start also surfaces the log tail in the error. gaia daemon agents shows id, mode, pid, port, and contract version for everything currently running.

Limitations (v0.1.1)

  • No skill sets declared — the skill machinery is wired and tested, and gaia-voice ships always-on, but no set does; see Skills.
  • Narrowing file scope is environment-only for the sidecar — GAIA_ALLOWED_PATHS narrows it; there is no flag, and a running daemon must be restarted to pick up a change.
  • Server-side confirmation needs a session — over /query, a confirmation-gated tool is answered with POST /v1/gaia/query/{run_id}/tool_decision when the request carries a session_id and can answer; a one-shot request (no session_id, or can_answer_questions: false) still ends the run with a refusal instead of prompting.
  • Image generation evicts the chat model — the SD model has to be resident to draw, so the first reply after an image waits for the chat model to reload. Ask for pictures at a natural pause, not mid-thread.