Time to complete: 45–75 minutes
What you’ll build: A branded GAIA installer for Windows, macOS, or Ubuntu with the Zoo Agent preloaded
What you’ll learn: How bundled agents flow from a staging directory through
electron-builder into the first-launch seeder, plus how to share agents between existing GAIA installations without rebuilding an installer
What’s different about this playbook
This playbook is the end-to-end walkthrough for shipping a branded GAIA installer with your agent preloaded — useful whenpip install amd-gaia or enterprise silent-install isn’t the right fit. Take a working agent, drop it into the staging directory, run one npm command per OS, install the binary, and watch the seeder surface your agent in the Agent UI on first launch.
Two paths are covered:
- Path A — Branded installer. You build and ship a full GAIA installer with your agent preloaded. This is what OEM partners, enterprise teams, and community builders typically want.
- Path B — Share an existing agent. You already have GAIA installed on both sides and just want to move an agent between machines. No installer build.
Path A — Branded installer
The running example is the Zoo Agent. It is a minimal Python agent that plays an enthusiastic zookeeper.Prerequisites
Who this path is for: OEM partners pre-loading GAIA on Ryzen AI hardware, enterprise teams distributing an internal-knowledge agent, and community builders sharing a branded specialty agent.What you need installed:All subsequent steps assume your working directory is
- Git
- Node.js 18+ and npm
- Python 3.10+ (for running the agent locally to verify it before packaging)
gaia/src/gaia/apps/webui/.Create the Zoo Agent
Create the bundled-agent staging directory and drop in a Python Create Why this location matters. The At install time the contents end up under
agent.py:build/bundled-agents/zoo-agent/agent.py:build/bundled-agents/zoo-agent/agent.py
build/bundled-agents/ directory is the build-time staging area picked up by the extraResources entry in electron-builder.yml:process.resourcesPath/agents/<agent-id>/ inside the installed app. On first launch, seedBundledAgents() in src/gaia/apps/webui/services/agent-seeder.cjs copies them into ~/.gaia/agents/<agent-id>/ and writes a .seeded sentinel so the copy runs exactly once per agent.Build the installer
Pick your target platform. Each command builds the full GAIA Agent UI installer with your Zoo Agent baked in.Output:
- Windows
- macOS
- Ubuntu
Cross-compilation is not supported end-to-end today. Build each target on its native OS (or in a matching VM / CI runner).
Install and verify
- Windows
- macOS
- Ubuntu
- Double-click the
.exeindist-app/. - Accept the NSIS prompts through to completion.
- Launch GAIA from the Start Menu.
- Open the Agent UI. On first launch,
seedBundledAgents()copies every directory under<resources>/agents/into~/.gaia/agents/and writes a.seededmarker so re-launches are no-ops. - Open the agent dropdown in the UI header — Zoo Agent should appear alongside the built-in agents.
- Select Zoo Agent and send “What’s happening at the zoo today?”. You should get an enthusiastic zookeeper response with a fun animal fact.
- Confirm
~/.gaia/agents/zoo-agent/agent.pyexists on the target machine. - Confirm
~/.gaia/agents/zoo-agent/.seededexists — if it’s missing, the seeder did not run; check the Electron main-process logs. - If
.seededexists but the directory is incomplete, delete~/.gaia/agents/zoo-agent/and relaunch to trigger a fresh seed.
(Optional) Branding
Most users ship with the default GAIA branding and only customize the agent. If you want a branded installer, edit
src/gaia/apps/webui/electron-builder.yml before re-running the package:* command:productName→ user-facing app name (e.g.,Zoo GAIA)appId→ your reverse-DNS namespace (e.g.,com.acme.zoo-gaia)
Path B — Share an existing agent
If you already have GAIA installed and want to move an agent to another machine — or share it with a teammate — you don’t need to build an installer. Use the agent bundle export/import flow instead. The bundle is a.zip containing your custom agents plus a bundle.json table of contents. Export on the source machine, import on the destination.
Export
export_custom_agents() in src/gaia/installer/export_import.py, which walks ~/.gaia/agents/ and writes a deterministic zip with a bundle.json manifest.
Import
import_agent_bundle() in src/gaia/installer/export_import.py. Each agent is staged in a temp directory and atomically moved into ~/.gaia/agents/<id>/, so a partial failure leaves previously-installed agents intact. Zip entries are validated for path traversal, absolute paths, symlinks, size, and entry count before anything touches disk.
When to use which path
| Scenario | Path |
|---|---|
| Shipping GAIA + your agent to users who don’t have GAIA | Path A — Branded installer |
| Moving an agent between two machines that already run GAIA | Path B — Export/Import |
| Publishing an agent for the community to drop in | Path B (share the .zip) |
| OEM pre-install on Ryzen AI hardware | Path A |
Next steps
Custom Agents
Deep reference for agent authoring, manifest schema, tools, and MCP.
Code Signing
Per-platform signing secrets, CI integration, troubleshooting.
Agent UI
Desktop shell architecture, build pipeline, Electron integration.