Source Code:
src/gaia/cli.pyPlatform Support
Windows 11
Full GUI and CLI support
Linux
Full GUI and CLI support via source installation (Ubuntu/Debian)
Quick Start
- Windows
- Linux
- Follow the Quickstart to install GAIA
- Open PowerShell and run
gaiato launch the Agent UI, orgaia --clifor terminal chat - GAIA automatically starts Lemonade Server when needed, or start manually:
Top-Level Flags
Runninggaia with no subcommand launches the Agent UI by default:
Examples:
gaia chat --ui continues to work as an alias. The Agent UI requires an AMD Ryzen AI Max (Strix Halo) or an AMD Radeon GPU with ≥ 24 GB VRAM. If your device is not supported, a dismissible warning banner will appear in the UI.Agent step limit
Agents stop after a maximum number of reasoning/tool steps. The default is 50, applied consistently across the CLI, the Agent UI, and background runs.- Per-invocation: pass
--max-steps <n>to any agent command (e.g.gaia browse --max-steps 80).gaia blenderuses--steps <n>. - Fleet-wide: set the
GAIA_AGENT_MAX_STEPSenvironment variable to change the default for every agent at once, without per-command flags.
GAIA_AGENT_MAX_STEPS value (non-integer or ≤ 0) fails fast with an actionable error rather than silently capping agents.
Per-tool execution timeout
Each tool call is bounded so a hung tool (e.g. a stuck connector or network request) surfaces an actionable error instead of leaving the agent — and the UI — stuck indefinitely. The default is 180 seconds per tool.- Fleet-wide: set
GAIA_AGENT_TOOL_TIMEOUT(seconds) to change the default for every tool at once.
@tool(timeout=...) — for example image generation, which may need to download a model on first use. An invalid GAIA_AGENT_TOOL_TIMEOUT value (non-numeric or ≤ 0) fails fast with an actionable error rather than silently removing the guard.
Confirming dangerous tools
Shell commands, file writes, and an agent’s own destructive tools (email send / forward / permanent delete, calendar RSVP) prompt before they run:a remembers that
one tool until the command exits (not offered for run_shell_command /
run_cli_command).
When GAIA is not attached to a terminal — output piped or redirected, a CI job, a
host process — there is nobody to ask, so gated tools are denied with an
actionable error rather than run silently. For an unattended run you trust, set
GAIA_AUTO_APPROVE_TOOLS=1 in the launching environment:
.env file cannot set this variable; it must come from the real process
environment, so a project directory can never switch off your prompts.
Initialization
Init Command
New users start here! The
gaia init command is the easiest way to get GAIA running.
Available Profiles:
The
--profile flag accepts one of the following values (see
src/gaia/cli.py for the
canonical choices list):
The
talk, blender, jira, and docker agents all rely on the chat profile —
there is no dedicated profile for each. Run gaia init --profile chat (or all)
to prepare their dependencies.gaia llm quick queries use the global default model (Gemma-4-E4B-it-GGUF).- Local — Lemonade runs on the same machine (default)
- Remote — Lemonade runs on another machine; enable with
--remoteor by settingLEMONADE_BASE_URL
- Local Mode
- Remote Mode
- Checks Lemonade Server - Detects if installed and verifies version compatibility
- Installs/Upgrades Lemonade - Downloads and installs from GitHub releases (Windows/Linux only). Automatically uninstalls old version if version mismatch detected.
- Starts Server - Ensures Lemonade server is running, prompts to start if not
- Downloads Models - Pulls required models for the selected profile
- Verifies Setup - Tests each model with inference to detect corrupted downloads
Install Command
Install individual GAIA components.
Examples:
If a different version of Lemonade is already installed, you’ll be prompted to uninstall first.
Uninstall Command
Tiered cleanup of GAIA components. By default, the OS-native uninstall (Add or Remove Programs, drag to Trash,apt remove) only removes the app — user data in ~/.gaia/ is preserved. This command lets you escalate cleanup as far as you want.
Examples:
Kill Command
Stop running GAIA services.
Examples:
On Windows,
--lemonade also kills orphaned llama-server.exe and lemonade-tray.exe processes.Agent Command
Author, version, validate, and share GAIA agents.Developer workflow: init, version, test
Scaffold a new agent package, bump its version, and run the quality gates that publishing requires. The scaffold mirrors the canonical hub package layout (hub/agents/summarize/python/).
init scaffolds a package directory named after <name>:
- Python:
gaia-agent.yaml,pyproject.toml(with thegaia.agententry point), agaia_agent_<id>/package (__init__.py+agent.pyskeleton),tests/test_agent.py, andREADME.md. - C++:
gaia-agent.yaml,CMakeLists.txt,src/agent.cpp,tests/, andREADME.md.
Use
--layout hub when authoring a package for this repo’s hub/agents/ tree, which nests the implementation under a language directory (hub/agents/<id>/python/). Standalone packages outside the repo want the default flat layout.
version bumps the SemVer in gaia-agent.yaml and keeps pyproject.toml / __init__.py in sync.
test runs quality gates in two modes:
The publish workflow requires
--lint to pass; --live is recommended but not enforced.
Examples:
Lifecycle: configure, health, status
Manage an installed agent: set per-agent configuration, verify it loads, and inspect its state. Configuration is persisted under ~/.gaia/agents/<id>/config.json and survives restarts.
configure writes per-agent settings (e.g. a preferred model). --set values are JSON-decoded when possible (--set temperature=0.2 stores a number, --set verbose=true a boolean), otherwise kept as strings. Settings merge into the existing config by default; pass --replace to overwrite it wholesale, or --show to print the current config without changing it.
health verifies that an installed agent actually loads — its registration resolves and its entry point imports. It reports one of healthy, degraded (loads but something optional is off, e.g. a corrupt config), error (a required piece fails to load), or not_installed, and exits non-zero for error / not_installed so scripts can gate on it.
status aggregates installed version, health, config summary, and source for one agent — or every discovered agent when <id> is omitted.
Examples:
Distribution: pack, publish, login
Build a distributable wheel from a Python agent package, then dual-publish it to the Agent Hub (R2, the source for the Hub UI) and PyPI (the source for pip install).
pack runs python -m build --wheel against the package’s pyproject.toml, writing gaia_agent_<id>-<version>-py3-none-any.whl to dist/ and printing its SHA-256. Python agents only — native (C++) agents ship a CMake-built binary, not a wheel.
publish packs the wheel and uploads it to both targets. R2 receives a multipart POST (gaia-agent.yaml + wheel) authenticated with a Bearer token; PyPI receives a twine upload authenticated with an API token. Both enforce version immutability — bump the version with gaia agent version before re-publishing.
login stores publisher tokens in your OS keyring. Tokens may also be supplied via the GAIA_HUB_TOKEN and PYPI_TOKEN environment variables (useful in CI), which take precedence over the keyring.
The packaging toolchain (
build, twine) ships in the publish extra:
Installing a published agent
The two publish targets back two install paths, and both register the agent the same way — via thegaia.agent entry point, so the registry discovers it
automatically:
From PyPI (pip)
PyPI publishing for
gaia-agent-* wheels is currently paused (tracked by
#2240), so the commands above don’t
resolve yet. Until publishing lands, install an agent straight from this repo:From source (works today)
~/.gaia/agents/<id>/ (backed by gaia.hub.installer). Use the Agent UI’s
discover/install panel when browsing the Hub, or install headlessly with:
gaia agent list shows what the hub offers (with an [installed] marker) so
you know which id to pass. This is the supported way to provision a sidecar
agent (e.g. email) on a machine with no UI.
gaia agent install installs in-process. gaia hub install
performs the same install through the daemon, which additionally stops that
agent’s running sidecar first and keeps it stopped for the whole download —
the install directory is the sidecar’s own binary cache. Reach for gaia hub
when the daemon supervises the agent, and gaia agent when it does not (or
when the daemon extras are not installed). Both enforce the same --trust gate
and the same SHA-256 verification.gaia email -q "...") starts its sidecar automatically on first use;
gaia daemon start-agent <id> is an optional pre-flight to launch and
health-check it early.
Automated PyPI publishing (CI)
.github/workflows/publish_agents.yml builds every production agent wheel and
publishes it to PyPI on a version tag (v*). Its matrix is derived from the
agents extra in setup.py (via util/list_agent_packages.py), so adding an
agent there is all it takes to start publishing it. The workflow uploads with
pypa/gh-action-pypi-publish
using the PYPI_API_TOKEN secret and skip-existing: true, so an unchanged
agent version is a no-op rather than an error — PyPI enforces version
immutability natively.
Sharing: export, import
Export every custom agent installed under ~/.gaia/agents/ into a single .zip bundle, and import a bundle produced on another machine.
Import options:
Examples:
Importing a bundle runs third-party Python code on your machine.
gaia agent import shows the agent IDs in the bundle and requires explicit y/yes confirmation (or --yes) before proceeding.Core Commands
LLM Direct Query
The fastest way to interact with AI models - no server management required.
Examples:
Chat Command
Start an interactive conversation or send a single message with conversation history.- No message: Starts interactive chat session
- Message provided: Sends single message and exits
Examples:
Specialized Agent Commands
Use focused agent commands when you want a smaller tool surface than the full chat agent.
Examples:
Prompt Command
Send a single prompt to a GAIA agent.
Examples:
Specialized Agents
Code Agent
Code Development
AI-powered code generation, analysis, and linting for Python/TypeScript
- Intelligent Language Detection (Python/TypeScript)
- Code Generation (functions, classes, unit tests)
- Autonomous Workflow (planning → implementation → testing → verification)
- Automatic Test Generation
- Iterative Error Correction
- Code Analysis with AST
- Linting & Formatting
Code Index
gaia-code index builds and queries a local FAISS-backed semantic index over a repository. Embeddings run on AMD NPU/GPU through Lemonade Server. Requires the [rag] extras.
index level: --repo, --max-files, --model, --base-url, --no-lemonade-check, --use-claude, --use-chatgpt.
→ Full Code Index Documentation
Blender Agent
3D Scene Creation
Natural language 3D modeling and scene manipulation
- Natural Language 3D Modeling
- Interactive Planning
- Object Management
- Material Assignment
- MCP Integration
Examples:
Interactive Blender mode:
Email Command
Email Triage
Read, organize, and reply to Gmail with all email content processed locally on your machine.
Setup: requires the Google connector. Run
gaia connectors connect google first; you’ll be asked to grant Gmail and Calendar scopes.
Privacy: all email body inference runs locally on Lemonade — the agent rejects any non-local LLM endpoint at startup.
→ Full Email Triage Agent Documentation
gaia email autonomy — autonomy control
A thin client over the sidecar’s /v1/email/agent/autonomy* REST routes, relayed
through the daemon like every other gaia email command (same auth path — no
sidecar bearer ever reaches the CLI).
--session-id (default cli) — autonomy
state lives on that session’s in-memory agent, not on disk, so a level you set
stays set across invocations that use the same session. run refuses with an
actionable error while the level is off (#2528) instead of silently reporting
that nothing happened.
SD Command
Image Generation
Generate images using Stable Diffusion on Ryzen AI
Examples:
Fast, good-quality generation with the default (SDXL-Turbo, ~17s):
Talk Command
Voice Interaction
Speech-to-speech conversation with optional document Q&A
Examples:
Jira Command
Jira / Atlassian
Natural-language interface for Jira, Confluence, and Compass using your Atlassian credentials (REST API).
→ Full Jira Guide
Docker Command
Docker
Natural-language interface for Docker containerization.
→ Full Docker Guide
Summarize Command
Summarize meeting transcripts, emails, and PDFs.Telegram Command
Telegram Adapter
Bridge a Telegram bot to GAIA so you can chat with your agents from Telegram.
→ Telegram Adapter Guide
API Server
API Server
OpenAI-compatible REST API for VSCode and IDE integrations
Quick Start
- Start Lemonade with extended context:
- Start GAIA API server:
- Test the server:
Commands
- Start
- Status
- Stop
--host- Server host (default: localhost)--port- Server port (default: 8080).--debug- Enable debug logging--show-prompts- Log the prompts sent to the LLM for every request (useful for debugging)--streaming- Stream tokens to clients via SSE (OpenAI-style)--step-through- Pause between agent steps for manual inspection (development aid)
MCP Client
MCP Client
Connect GAIA agents to external MCP servers
~/.gaia/mcp_servers.json by default, or to a custom config file using --config.
Commands
Managing MCP servers (add / remove)
gaia mcp add and gaia mcp remove were removed in #977 — MCP servers are now
configured through the connectors framework. Run gaia connectors --help for the
current commands. gaia mcp list (below) still lists configured servers.gaia mcp list
List all configured MCP servers.
--config PATH- Custom config file path (default:~/.gaia/mcp_servers.json)
gaia mcp tools
List tools available from a configured MCP server.
<server-name>- Name of the server to query
--config PATH- Custom config file path (default:~/.gaia/mcp_servers.json)
gaia mcp test-client
Test connection to a configured MCP server.
<server-name>- Name of the server to test
--config PATH- Custom config file path (default:~/.gaia/mcp_servers.json)
MCP Bridge
MCP Bridge
Expose GAIA agents as MCP servers
Quick Start
Install MCP support:Commands
gaia mcp start options
Authentication
The bridge is unauthenticated by default. Anything that can reach the port can enumerate and invoke its tools, which is why--host defaults to
localhost. Pass --auth-token before exposing it anywhere else:
--auth-token <token>: on Linux and macOS
command-line arguments are visible to any local user via ps.
Clients then send the token on every call:
GET /health stays public so container and orchestrator liveness probes keep
working; it reports only liveness plus agent/tool counts. Every other
endpoint — /status, /tools, /chat, /llm, /jira, /summarize, and the
JSON-RPC endpoint — requires the token. gaia mcp status, gaia mcp test, and
gaia mcp agent accept --auth-token (also defaulting to
$GAIA_MCP_AUTH_TOKEN) so they can reach a protected bridge.
gaia mcp test options
gaia mcp agent
request and, optionally, a --domain (e.g. jira,
docker) and free-form --context string to steer the orchestrator.
gaia mcp docker options
--port defaults to 8080.
gaia mcp tui options
Wraps the TUI control API as MCP tools, so an assistant can
navigate and type in the TUI session you are watching. The TUI must already be
running with gaia tui --control; the server finds it through
~/.gaia/tui/control.json rather than a fixed port.
→ Full TUI Control MCP Guide
→ Full MCP Integration Guide
Connectors
Connectors
OAuth providers, MCP-server connectors, and per-agent scope grants
Examples:
--device flag on connect uses the RFC 8628 device-code flow instead of
the browser redirect — required for Microsoft zero-setup sign-in (no Azure app
registration or loopback redirect URI). Which authority a Microsoft connector
signs in against is fixed by the connector itself (microsoft → consumers,
microsoft_work → organizations) — to restrict microsoft_work to one
Entra tenant, set its optional Directory (tenant) ID setup field instead of an
environment variable; see the Microsoft connector guide.
→ Connectors Guide · → Connectors SDK
Configuration
GAIA keeps a small persistent config at~/.gaia/config.json (override the
location with the GAIA_CONFIG_DIR / GAIA_CONFIG_FILE environment variables).
Use it to set a default model once instead of passing --model on every
command.
Default model precedence
Forgaia chat, gaia llm, and gaia prompt, the model is resolved highest-wins:
- An explicit
--model <id>flag default_modelfrom~/.gaia/config.json- The command’s built-in default (
DEFAULT_MODEL_NAME)
gaia config set default_model <id> lets you skip --model entirely, while
--model still overrides it for a single run. For gaia chat, passing an
explicit --device selects a device-specific model and takes precedence over
the config default.
A missing config file is fine — GAIA falls back to built-in defaults. A
corrupt config file (invalid JSON) fails loudly with the file path and how
to recover, rather than silently reverting to defaults.
Using a custom config file
Point GAIA at a config file anywhere on disk — handy for per-project configs or keeping work and personal defaults separate. Two equivalent ways:--config wins over GAIA_CONFIG_FILE, which wins over the
default ~/.gaia/config.json.
Model Management
Download Command
Download all models required for GAIA agents with streaming progress.
Available Agents:
chat, code, talk, rag, blender, jira, docker, vlm, minimal, mcp
Examples:
List all models:
Pull Command
To download individual models, use the Lemonade Server CLI directly:Evaluation Commands
Evaluation Framework
Systematic testing, benchmarking, and model comparison
- Agent eval benchmark (scenario-based, end-to-end)
- Auto-fixing failures with Claude Code
- Report generation
- Performance-log visualization
Agent Eval
Agent Eval Benchmark
Scenario-based end-to-end testing of the GAIA Agent UI
Examples:
The eval agent requires Claude Code CLI (
claude command), an Anthropic API key, and the Agent UI backend running. See the Agent Eval Guide for full setup instructions.Email Throughput Benchmark
Measure end-to-end email-triage throughput (tokens/sec), time-to-first-token, and pipeline latency for an on-device model. Direct-drives the email agent over the committed synthetic corpus and harvests metrics from the agent’s per-step stats. The committed bar is ≥10 tok/s (snappy-UX stretch ~30 tok/s); the benchmark is non-gating — a miss is reported, not failed.Runs from a GAIA repo checkout (it drives the synthetic corpus in
tests/fixtures/email/) and needs Lemonade serving the target model. Run at most one gaia eval process at a time against a single Lemonade server.Performance Visualization
Plot llama.cpp server performance metrics from one or more log files. Plots are saved as images; pass--show to also display them interactively.
Examples:
Memory
Agent Memory Guide
Persistent second brain — remembers facts, preferences, and workflows across sessions
Commands
- status
- bootstrap
Show aggregate memory statistics.Output includes:
- Knowledge entries by category (fact, preference, error, skill) and context
- Conversation count and session history
- Tool call success rates and error counts
- Upcoming and overdue time-sensitive items
- Database size
Skills
Agent Skills Spec
Portable
SKILL.md capabilities — instructions, optional typed tools, and resources an agent loads only when relevantSKILL.md; GAIA implements the Agent Skills open standard, so a Claude Code skill loads unchanged.
Subcommands
- list
- info
- create
- import
- export
- audit
- migrate
- search
- install
- publish
- keygen / trust
4.Security tiers at install
Three tiers set the install-time permission ceiling. A skill’s front matter states the tier it wants; its signature decides the tier it gets.
The effective tier is
min(claimed, attested), so no unsigned skill installs as
verified — the claim is collapsed rather than trusted. Imported skills
(gaia skill import) always land experimental.
skill-lock.json
Hub installs are tracked in ~/.gaia/skills/skill-lock.json. Discovery answers
what is on disk; the lock answers what was requested, what resolved, what
the artifact hashed to, who signed it, and which tier it was installed at
after the ceiling was applied:
create or import has no hub
provenance to record.
Examples:
0 success · 2 missing/unknown subcommand · 3 skill not found · 4 invalid skill (bad manifest, name collision without --force, or a discovery root containing a malformed skill).
Loading a skill into an agent
Skills are never globally active — an agent loads one explicitly, and its tools register under a<skill-name>/<tool> namespace:
gaia-agent.yaml and write no Python at all:
Agent subclass resolves this block at construction, so a custom agent
under ~/.gaia/agents/<id>/ consumes an installed hub skill by dropping a
gaia-agent.yaml beside its agent.py — no code change, no registration call.
Resolution mirrors agent dependencies:: highest installed version satisfying the
range, tool providers ordered before their consumers, and fail-loud on a conflict
or a dependency cycle. A missing required: true skill raises with the
gaia skill install command that fixes it; a missing optional one is logged and
skipped. Set AUTOLOAD_DECLARED_SKILLS = False on the class to opt out and call
load_declared_skills() yourself.
→ Agent Skills Spec · → Skill Format Reference
Schedule
Run a prompt on a recurring cron schedule and route its output to a sink. Schedules are stored in~/.gaia/schedules.toml (hand-editable). The daemon action runs a long-lived scheduler that fires each enabled schedule when due.
Subcommands
add Options
Examples:
Sinks
A sink decides where each scheduled run’s output goes. Set it with--sink on add (default stdout):
Telegram example:
--skill is not yet implemented — gaia schedule add --skill is rejected with an error at add time. The skills runtime has shipped (#888), but the scheduler is not wired to it yet. Use --prompt for now.Utility Commands
Stats Command
View performance statistics from the most recent model run.Test Commands
Run various tests for development and troubleshooting.- TTS Tests
- ASR Tests
Test Types:Test streaming:Generate audio file:
tts-preprocessing- Test TTS text preprocessingtts-streaming- Test TTS streaming playbacktts-audio-file- Test TTS audio file generation
--test-text- Text to use for TTS tests--output-audio-file- Output file path (default: output.wav)
YouTube Utilities
Download transcripts from YouTube videos.--download-transcript- YouTube URL to download transcript from--output-path- Output file path (defaults to transcript_.txt)
Daemon Command
Manage the headless custody daemon — the always-on, single-instance background process that supervises agent sidecars (spawn, health, tree-kill; email is the first) and that later Agent UI v2 phases (/host/v1/* custody, the
model-slot broker, the scheduler clock) mount into. The Agent UI backend is a
daemon client: it asks the daemon to ensure a sidecar and talks to the
sidecar directly, so closing the UI leaves the sidecar running — stopping
is a daemon command.
The daemon also serves a streaming data plane: ANY /v1/<agent>/* (e.g.
POST /v1/email/query) is reverse-proxied to that agent’s running sidecar,
SSE relayed unbuffered, with cancel propagated on client disconnect and a
synthetic terminal error event if the sidecar crashes mid-stream. Clients
authenticate every route — control plane and data plane alike — with the
daemon client token from ~/.gaia/host/instance.json; the per-sidecar bearer
is injected by the daemon and never leaves it for relayed traffic.
Requires the daemon extras (fastapi/uvicorn/psutil) — install with
pip install "amd-gaia[ui]" (or [api]/[dev]). Running it on a base install
fails loudly with that instruction.
Model-slot serialization
Lemonade is single-tenant per model slot: a second process loading a different model evicts the first. The daemon therefore runs a model-slot broker that hands out one lease at a time, so model loads queue instead of racing. When a daemon is running,gaia commands and the Agent UI backend attach to it
automatically and take a lease around each model load — you may see a brief
⏳ switching model… while another process finishes. Interactive chat turns
take priority over background work (embedder warm-ups, autonomous briefs).
With no daemon running, nothing changes: there are no sidecars, nothing else
holds the slot, and loads proceed directly. Attaching never starts a daemon.
If the daemon is running but unreachable, a model load fails loudly rather
than doing a direct load that would evict another process’s model — check
gaia daemon status. A daemon left running at an incompatible version is
reported as a warning and loads proceed unbrokered; gaia daemon restart
restores serialization.
Daemon HTTP surface (the daemon serves no OpenAPI schema, so this is the
contract; every route needs
Authorization: Bearer <token> from
~/.gaia/host/instance.json):
Hub Command
Browse, install and uninstall agents from the GAIA Agent Hub.gaia hub is a thin client over the daemon’s install routes, so the CLI, the
Agent UI and the TUI share one installer, one SHA-256 check and one install
lock — installing from two places at once is a clean 409, never a corrupt
download. The daemon is started automatically if it is not already running.
Agents install into ~/.gaia/agents/<id>/ (binary + gaia-agent.yaml +
.installed sentinel). Every artifact is verified against the SHA-256 in the
hub manifest before it is written; a mismatch fails the install and leaves
nothing behind — there is no “use it anyway” path.
Notes
- Install and uninstall both stop a running sidecar first — the install directory is the sidecar’s binary cache — and keep it stopped for the whole operation, so nothing can respawn it mid-download. If the process survives the tree-kill, the command aborts loudly and nothing is mutated.
- Install and uninstall of the same agent are serialized: the second caller gets a clean “already in progress” error instead of racing the first.
- The catalog only lists agents this GAIA build can actually supervise; anything else is reported as hidden rather than silently dropped.
- Reserved built-in agents (e.g.
builder) ship with the wheel and are refused by bothinstallanduninstall. - Trust gate. Any agent outside the
verifiedsecurity tier runs third-party code on your machine, so it is refused (HTTP 403) until you pass--trust, with the remedy named in the error. A manifest that omitssecurity_tiercounts asexperimentaland is gated the same way. Nothing infers the opt-in for you, and there is no bypass — a client (TUI, UI) renders this as a “Trust & Install” confirmation and retries withtrusted: true. - Requires the daemon extras (
pip install "amd-gaia[ui]"), same asgaia daemon.
gaia agent install <id> does the same install in-process; gaia hub install <id> routes it through the daemon, which additionally stops the
agent’s running sidecar first and holds it stopped for the download. Prefer
gaia hub when the daemon supervises that agent (today: email); gaia agent
is the right call on a machine with no daemon extras installed. See the note
under Agent Command.Terminal hub (gaia tui)
gaia tui is the Go/Bubble Tea terminal hub: browse agents, install them, and
chat with them without leaving the terminal. Building from source the binary is
tui/bin/gaia (cd tui && make build).
The binary accepts a leading
tui word and drops it, so gaia tui install email and gaia install email are the same command. Running the source build
directly, both ./tui/bin/gaia tui list and ./tui/bin/gaia list work.
Install and uninstall are served by the GAIA daemon
(
POST /daemon/v1/agents/{id}/install, DELETE /daemon/v1/agents/{id}), so the
TUI, gaia hub, and the Agent UI share one integrity check and one install
lock. The daemon is started automatically for these commands; gaia tui status
only ever attaches, so it reports what is running rather than starting
something.
--trust: installing a non-verified agent
An agent outside the verified security tier runs third-party code on your
machine. The daemon refuses to install one with HTTP 403 until the caller
passes an explicit opt-in — there is no bypass, and nothing retries on your
behalf.
From the CLI, that opt-in is --trust. Without it the command prints exactly
what you would be agreeing to and exits non-zero:
run --query is a real one-shot
--query does not open the alt screen. The answer goes to stdout, progress to
stderr, and the exit code is 0 on a terminal answer / 1 on an error — so
gaia tui run email --query "…" > answer.txt captures exactly the answer:
--timeout 90s / --timeout 2h to change it — so an agent that accepts the query and then stops answering is
reported with what to read next instead of hanging a CI job until the job’s own
timeout kills it. There is no “wait forever”: --timeout 0 is refused. Interactive
gaia tui run <id> is unaffected — a person can read what arrives and press
ctrl+c.
Hub keys
backspace is deliberately unbound. It used to share the uninstall binding
with d and delete, which made “go back” a destructive action.Waiting on a consequential readiness problem
Most readiness rows that cannot be verified are named on screen and the launch continues — the sidecar itself does not treat them as fatal (an unadvertised Lemonade version, for instance). A handful are consequential enough to hold instead: right now, a model loaded into a smaller context window than this machine’s profile expects, since a document-sized request against it comes backcontext_length_exceeded rather than an answer. When
that happens the screen waits for enter instead of proceeding on its own,
and the notice lists every such row at once if more than one applies.
Theme (light vs dark terminals)
The hub asks the terminal for its background colour on startup and picks a light or dark palette to match, so text stays readable either way. Over SSH, inside tmux, or in a CI log where the terminal never answers that query, force a mode instead of guessing:GAIA_TUI_THEME also accepts auto (the default) to re-enable
detection.TUI Control API
The terminal hub (gaia tui, the Go/Bubble Tea binary) can expose a loopback
HTTP API that drives the session you are looking at — not a headless copy.
An assistant navigates, types, and launches agents while the frames render in
your terminal in real time. It is how the TUI gets tested without a human at
the keyboard.
Off by default. Bound to 127.0.0.1 only, and every request needs a bearer
token.
These are persistent flags on the TUI binary’s root command, so they apply to
the hub,
hub, and chat alike. Building from source, that binary is
tui/bin/gaia (cd tui && make build).
On start the TUI writes
~/.gaia/tui/control.json (mode 0600) holding the
pid, port, and token, and removes it on exit. Clients find the TUI by reading
that file — the token is never printed to the terminal. A client must verify
both that the recorded pid is alive and that /control/v1/status answers
with a matching pid before trusting the port: after a crash the file can point
at a port some unrelated process now owns.
Endpoints (all under /control/v1, all requiring Authorization: Bearer <token>):
Errors come back as
{"error": {"code", "message", "hint"}}; a /wait timeout is
HTTP 408 and carries the screen it saw.
Two response details matter when driving this:
settledon/keys,/text, and/resize. The call returns only once every injected key has been consumed and redrawn, so reading/screenstraight after is race-free.settled: falsemeans the model was still busy — the input is queued, so re-read rather than assume it was ignored. It does not promise the consequences are done: pressingenterto launch an agent is consumed immediately, while the view switch it kicks off lands later. Use/waitfor anything asynchronous.- HTTP 503
not_runningwhen the TUI’s event loop is not consuming input — it is still starting, or the user has quit. Bubble Tea silently drops messages in that window, so the API refuses instead of reporting a success for keys that went nowhere. Reads (/status,/screen,/frames) keep working.
can_return_to_hub exists because esc is not universally “go back”: in a chat
opened from the hub it returns there, but in a standalone gaia chat --subprocess
session it quits the program. A driver that guesses wrong kills the session it
was asked to drive, so the state says which.
Most callers should not speak this API directly — the
TUI MCP server wraps it as MCP tools.
Hub Command
Browse, install and uninstall agents from the GAIA Agent Hub.gaia hub is a thin client over the daemon’s install routes, so the CLI, the
Agent UI and the TUI share one installer, one SHA-256 check and one install
lock — installing from two places at once is a clean 409, never a corrupt
download. The daemon is started automatically if it is not already running.
Agents install into ~/.gaia/agents/<id>/ (binary + gaia-agent.yaml +
.installed sentinel). Every artifact is verified against the SHA-256 in the
hub manifest before it is written; a mismatch fails the install and leaves
nothing behind — there is no “use it anyway” path.
Notes
- Install and uninstall both stop a running sidecar first — the install directory is the sidecar’s binary cache — and keep it stopped for the whole operation, so nothing can respawn it mid-download. If the process survives the tree-kill, the command aborts loudly and nothing is mutated.
- Install and uninstall of the same agent are serialized: the second caller gets a clean “already in progress” error instead of racing the first.
- The catalog only lists agents this GAIA build can actually supervise; anything else is reported as hidden rather than silently dropped.
- Reserved built-in agents (e.g.
builder) ship with the wheel and are refused by bothinstallanduninstall. - Trust gate. Any agent outside the
verifiedsecurity tier runs third-party code on your machine, so it is refused (HTTP 403) until you pass--trust, with the remedy named in the error. A manifest that omitssecurity_tiercounts asexperimentaland is gated the same way. Nothing infers the opt-in for you, and there is no bypass — a client (TUI, UI) renders this as a “Trust & Install” confirmation and retries withtrusted: true. - Requires the daemon extras (
pip install "amd-gaia[ui]"), same asgaia daemon.
gaia agent install <id> does the same install in-process; gaia hub install <id> routes it through the daemon, which additionally stops the
agent’s running sidecar first and holds it stopped for the download. Prefer
gaia hub when the daemon supervises that agent (today: email); gaia agent
is the right call on a machine with no daemon extras installed. See the note
under Agent Command.Terminal hub (gaia tui)
gaia tui is the Go/Bubble Tea terminal hub: browse agents, install them, and
chat with them without leaving the terminal. Building from source the binary is
tui/bin/gaia (cd tui && make build).
The binary accepts a leading
tui word and drops it, so gaia tui install email and gaia install email are the same command. Running the source build
directly, both ./tui/bin/gaia tui list and ./tui/bin/gaia list work.
Install and uninstall are served by the GAIA daemon
(
POST /daemon/v1/agents/{id}/install, DELETE /daemon/v1/agents/{id}), so the
TUI, gaia hub, and the Agent UI share one integrity check and one install
lock. The daemon is started automatically for these commands; gaia tui status
only ever attaches, so it reports what is running rather than starting
something.
--trust: installing a non-verified agent
An agent outside the verified security tier runs third-party code on your
machine. The daemon refuses to install one with HTTP 403 until the caller
passes an explicit opt-in — there is no bypass, and nothing retries on your
behalf.
From the CLI, that opt-in is --trust. Without it the command prints exactly
what you would be agreeing to and exits non-zero:
run --query is a real one-shot
--query does not open the alt screen. The answer goes to stdout, progress to
stderr, and the exit code is 0 on a terminal answer / 1 on an error — so
gaia tui run email --query "…" > answer.txt captures exactly the answer:
--timeout 90s / --timeout 2h to change it — so an agent that accepts the query and then stops answering is
reported with what to read next instead of hanging a CI job until the job’s own
timeout kills it. There is no “wait forever”: --timeout 0 is refused. Interactive
gaia tui run <id> is unaffected — a person can read what arrives and press
ctrl+c.
Hub keys
backspace is deliberately unbound. It used to share the uninstall binding
with d and delete, which made “go back” a destructive action.Cache Command
Inspect or clear GAIA’s on-disk caches (document-Q7 metadata, chat history, context7 library docs, etc.). Caches live under~/.gaia/cache/ (Windows:
%LOCALAPPDATA%/gaia/cache/).
Flags for
clear:
Examples:
Knowledge Command
Web research via Tavily, with SQLite result caching, a per-session credit budget, and an automatic keyless DuckDuckGo fallback when themcp-tavily
connector isn’t configured. See the Tavily connector.
Options:
Examples:
search automatically degrades to DuckDuckGo when the mcp-tavily connector isn’t
configured; extract requires Tavily and raises an actionable error otherwise. Configure
the connector with gaia connectors configure mcp-tavily --set TAVILY_API_KEY=tvly-....
Kill Command
Terminate processes running on specific ports.
Examples:
- Find the process ID (PID) bound to the specified port
- Forcefully terminate that process
- Provide feedback about success or failure
Diagnostics Command
Bundle system info and logs into a tarball for bug reports.
Examples:
- System info snapshot (
uname -a, distro, relevant env vars, all TCP listeners viass -tlnp) - State files from
~/.gaia/(config, session data — no chat content) - Log files:
~/.gaia/gaia.logand~/.gaia/electron-main.log(omitted with--no-logs)
Global Options
All commands support these global options:Troubleshooting
Connection Errors
Connection Errors
If you get connection errors, ensure Lemonade server is running:
Model Issues
Model Issues
Check available system memory (16GB+ recommended)Verify model compatibility:Pre-download models:Install additional models: See Features Guide
Audio Issues
Audio Issues
List available devices:Verify microphone permissions in Windows settingsTry different audio device indices if default doesn’t work
Performance
Performance
For optimal NPU performance:
- Disable discrete GPUs in Device Manager
- Ensure NPU drivers are up to date
- Monitor system resources during execution
See Also
Code Agent
Python/TypeScript development
Blender Agent
3D scene creation
Voice Interaction
Speech-to-speech conversation
API Server
OpenAI-compatible REST API
MCP Integration
Model Context Protocol
Evaluation Framework
Testing and benchmarking
Agent Memory
Persistent memory across sessions
Agent Skills
Portable SKILL.md capabilities