@amd-gaia/gaia 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,7 +9,13 @@ npx @amd-gaia/gaia
9
9
  That fetches the two binaries GAIA needs — the agent sidecar and the terminal UI —
10
10
  verifies both against a checksum manifest that ships inside this package, and drops
11
11
  you into the terminal UI. No Python to install, no repo to clone, no build step.
12
- Everything runs locally on your machine; nothing you type or index leaves it.
12
+ Local inference is the default. The TUI can explicitly select Fireworks AI or AMD
13
+ LLM Gateway through Lemonade; remote chat sends conversation history to that provider. The
14
+ terminal UI's *launch* flag `--use-claude`, which would pin the Anthropic API for
15
+ the life of the process, is refused for the agent this package installs. That is a
16
+ limit on the launch flag, not on the agent: a caller can still ask for Anthropic
17
+ per request with `/query`'s `provider` field (contract ≥ 2.14) — see
18
+ [`SPEC.md` §5.5](./SPEC.md#55-other-transports).
13
19
 
14
20
  The terminal UI you get here is the published **`terminal-hub`** component — the
15
21
  exact same binary a full GAIA install runs as `gaia tui`, not a separate build. So
@@ -33,8 +39,10 @@ however you arrive at the terminal UI, it behaves identically.
33
39
  - **Node.js 18+** (for the built-in `fetch`).
34
40
  - **[Lemonade Server](https://amd-gaia.ai/docs/reference/dev)** running locally —
35
41
  it hosts the model the agent thinks with. GAIA tells you if it isn't up.
36
- - The `gaia` Python CLI on `PATH` for the daemon the terminal UI starts. Install it
37
- with `curl -fsSL https://amd-gaia.ai/install.sh | sh` (Windows:
42
+ - The `gaia` Python CLI **0.25.0 or newer** on `PATH` for the daemon the terminal
43
+ UI starts. An earlier core cannot run this agent, so the UI comes up with
44
+ nothing behind it. Install it with
45
+ `curl -fsSL https://amd-gaia.ai/install.sh | sh` (Windows:
38
46
  `irm https://amd-gaia.ai/install.ps1 | iex`).
39
47
 
40
48
  ## Supported platforms
@@ -75,14 +83,19 @@ npx @amd-gaia/gaia -- --debug
75
83
 
76
84
  Common options:
77
85
 
78
- | Flag | Meaning |
79
- | --------------------- | ------------------------------------------------------------- |
80
- | `--base-url <url>` | Override the download base URL from `binaries.lock.json` |
81
- | `--cache-dir <dir>` | Where to cache the terminal UI binary |
82
- | `--sidecar-dir <dir>` | Where to install the agent sidecar (default `~/.gaia/agents/gaia`) |
83
- | `--platform <key>` | Fetch for another platform (`fetch` only) |
84
- | `--force` | Re-download even when a verified binary is already cached |
85
- | `--port <n>` | Sidecar bind port for `serve` (default `8141`) |
86
+ | Flag | Meaning | Accepted by |
87
+ | --------------------- | ------------------------------------------------------------- | ----------- |
88
+ | `--base-url <url>` | Override the download base URL from `binaries.lock.json`. Must be `https:` | `run`, `fetch`, `serve` |
89
+ | `--allow-insecure-base-url` | Permit a non-`https` `--base-url` (a trusted local mirror) | `run`, `fetch`, `serve` |
90
+ | `--sidecar-dir <dir>` | Where to install the agent sidecar (default `~/.gaia/agents/gaia`) | `run`, `fetch`, `serve` |
91
+ | `--cache-dir <dir>` | Where to cache the terminal UI binary | `run`, `fetch` |
92
+ | `--force` | Re-download even when a verified binary is already cached | `run`, `fetch`, `serve` |
93
+ | `--platform <key>` | Fetch for another platform | `fetch` |
94
+ | `--component <name>` | Fetch only `sidecar` or `tui` | `fetch` |
95
+ | `--port <n>` | Sidecar bind port (default `8141`) | `serve` |
96
+
97
+ A flag a command does not read is **refused**, not ignored — `gaia run --port
98
+ 9000` exits 2 rather than silently coming up on the default port.
86
99
 
87
100
  Set `DEBUG=gaia` for download, spawn, and sidecar output on stderr. Diagnostics
88
101
  never touch stdout, which the terminal UI owns.
@@ -92,6 +105,7 @@ never touch stdout, which the terminal UI owns.
92
105
  | What | Path |
93
106
  | --------------- | ---------------------------------------- |
94
107
  | Agent sidecar | `~/.gaia/agents/gaia/gaia-agent[.exe]` |
108
+ | Install record | `~/.gaia/agents/gaia/.installed` |
95
109
  | Terminal UI | `~/.gaia/npm-cache/gaia-<version>/gaia-tui[.exe]` |
96
110
 
97
111
  The sidecar goes into the GAIA daemon's own cache directory on purpose: the daemon
@@ -99,6 +113,13 @@ is what spawns and supervises it, and it does its own SHA-256 check on the way.
99
113
  putting an already-verified binary there we save a second download rather than
100
114
  racing one.
101
115
 
116
+ The `.installed` record next to it is what the daemon and the terminal UI read to
117
+ know the agent is installed — without it the UI would run the sidecar as its own
118
+ stdio child instead of letting the daemon supervise it. It is rewritten even when
119
+ the binary was already cached, so an install left by an earlier version repairs
120
+ itself the next time you run. A `--platform` fetch stages a binary for a
121
+ *different* machine, so it deliberately leaves no record.
122
+
102
123
  The terminal UI is installed as `gaia-tui`, **never** as `gaia` — a file named
103
124
  `gaia` in a cache directory would shadow the `gaia` shim npm puts on your `PATH`.
104
125
 
@@ -126,6 +147,12 @@ curl http://127.0.0.1:8141/health
126
147
  It waits for `GET /health`, checks the contract version, and tears the whole
127
148
  process tree down on Ctrl+C. See [`SPEC.md`](./SPEC.md) for the endpoints.
128
149
 
150
+ The sidecar normally requires a per-session bearer token on `/v1/gaia/*`, but
151
+ neither `serve` nor `startSidecar` mints one, so both leave it in dev mode — the
152
+ token check off, `Host`/`Origin` still enforced. This agent has shell and file
153
+ tools, so before you expose it to anything, supply a token of your own: see
154
+ [`SPEC.md` §5.4](./SPEC.md#54-caller-authentication).
155
+
129
156
  ## Programmatic use
130
157
 
131
158
  ```ts
@@ -157,10 +184,16 @@ await shutdown(proc);
157
184
  **Reuse the same `session_id` for every turn in a conversation.** It is what
158
185
  lets a document you had it index, or a skill you had it load, survive to the
159
186
  next question — drop it (or mint a new one per call) and the agent still
160
- answers, but it forgets everything from the previous turn. See
187
+ answers, but it forgets everything from the previous turn. An id must be 1–128
188
+ characters from `A-Z a-z 0-9 . _ -` (a UUID works); anything else is a 400. See
161
189
  [`SPEC.md` §5.2](./SPEC.md#52-session_id-and-agent-retention) for the retry
162
190
  and eviction behavior.
163
191
 
192
+ **Attaching files to a conversation? Send them in `documents`** (contract ≥
193
+ 2.16): the absolute paths, the whole set on every turn. The agent indexes any it
194
+ has not read yet before answering, and can read those exact files and nothing
195
+ else beside them. See [`SPEC.md` §5.1](./SPEC.md#51-endpoints).
196
+
164
197
  Every failure throws a typed error (`IntegrityError`, `PlatformError`,
165
198
  `HealthTimeoutError`, `VersionMismatchError`, `BinaryNotFoundError`) with a message
166
199
  that names what failed and what to do about it.
@@ -186,17 +219,31 @@ what it must hash to. The release pipeline regenerates it from the artifacts
186
219
  actually being served — the sidecars it just published, and the terminal-hub
187
220
  artifacts it downloaded and cross-checked against the hub's own recorded hashes.
188
221
 
189
- Between releases the lock carries `PENDING-replace-with-real-sha256` placeholders.
190
- **A placeholder blocks the fetch outright** — before any network call — so an
191
- unverifiable binary can never be downloaded, let alone executed. If you need to run
192
- against a locally built binary, build it yourself and point the lifecycle helpers
193
- at it directly; the fetcher will not be talked into it.
222
+ A committed release's lock, like this one, always carries real hashes — the
223
+ regenerate step in the release pipeline never publishes placeholders. Between
224
+ releases, an unreleased working tree's lock instead carries
225
+ `PENDING-replace-with-real-sha256` placeholders, and **a placeholder blocks the
226
+ fetch outright** — before any network call — so an unverifiable binary can never
227
+ be downloaded, let alone executed. If you need to run against a locally built
228
+ binary, build it yourself and point the lifecycle helpers at it directly; the
229
+ fetcher will not be talked into it.
194
230
 
195
231
  ## Links
196
232
 
197
233
  - Guide: <https://amd-gaia.ai/docs/guides/gaia>
198
234
  - Technical reference: [`SPEC.md`](./SPEC.md)
235
+ - Eval scorecard: [`SCORECARD.md`](./SCORECARD.md) — the agent's measured
236
+ judged-scenario pass rate across the 13-category eval corpus, with the exact
237
+ recipe to reproduce it
199
238
  - Changes: [`CHANGELOG.md`](./CHANGELOG.md)
200
239
  - Issues: <https://github.com/amd/gaia/issues>
201
240
 
202
241
  MIT licensed. © 2024-2026 Advanced Micro Devices, Inc.
242
+
243
+ ## Developer engineering mode
244
+
245
+ For GAIA contributors: with `--developer-mode` on, you can report a problem you hit
246
+ while using GAIA and hand a snapshot of it, which you approve, to your own Claude
247
+ Code or Codex app. That app diagnoses it and works on a fix in a separate git
248
+ worktree. The mode is off unless you turn it on, and ordinary sessions never
249
+ expose it. See the [usage guide](https://amd-gaia.ai/docs/guides/harness-engineering).
package/SCORECARD.md ADDED
@@ -0,0 +1,180 @@
1
+ ---
2
+ schema_version: 1
3
+ agent:
4
+ name: GAIA (flagship agent)
5
+ version: 0.1.1
6
+ recipe:
7
+ dataset:
8
+ reference: eval/scenarios/
9
+ description: 'Judged multi-turn scenario corpus for the flagship gaia agent (13
10
+ gaia_* categories: core conversation/memory tiers through adversarial, RAG,
11
+ files, data, web, shell gate, skill lifecycle + all 12 skills, honesty floor,
12
+ tool selection, code index, skill capture); deterministic fixtures under tests/fixtures/gaia/,
13
+ planted-fact ground truth per eval/scenarios/GAIA_FIXTURE_VALUES.md'
14
+ size: 103
15
+ methodology: 'gaia eval agent --agent-type gaia: each scenario is driven against
16
+ the Agent UI backend (REST/SSE) by the eval driver and scored by the Claude judge
17
+ on planted-fact ground truth + success criteria. Aggregate = judged_pass_rate
18
+ over judged scenarios (PASS/FAIL/BLOCKED_BY_ARCHITECTURE; infra failures are excluded
19
+ from the rate and fail the run''s integrity gate instead). Reported secondaries
20
+ (weight 0): the judge''s 0-10 avg_score normalized to [0,1], and per-category
21
+ pass rates. Thresholds/enforcement: tests/fixtures/gaia/quality_gate_thresholds.json'
22
+ config:
23
+ harness: gaia eval agent
24
+ run_id: eval-20260824-104200
25
+ agent_type: gaia
26
+ eval_model: claude-sonnet-4-6
27
+ budget_per_scenario_usd: 5.0
28
+ categories:
29
+ - gaia_core
30
+ environment:
31
+ gaia_commit: d104b3b1
32
+ model: claude-haiku-4-5
33
+ ctx_size: 200000
34
+ hardware: developer workstation (x86-64, agent on the Claude API — no Lemonade,
35
+ no AMD NPU/GPU inference)
36
+ eval_model: claude-sonnet-4-6
37
+ note: 'HARNESS-VALIDATION card, pending first runner baseline: agent on claude-haiku-4-5
38
+ over the gaia_core category only (11 scenarios, tags local_blocked_no_embedder
39
+ excluded). NOT the product baseline — that is Gemma-4-E4B-it-GGUF on the self-hosted
40
+ runner, captured by the first full gaia_scorecard_refresh.yml dispatch (rebaseline=true).'
41
+ results:
42
+ test_cases_run: 11
43
+ metrics:
44
+ - name: judged_pass_rate
45
+ value: 0.7272727272727273
46
+ weight: 1.0
47
+ - name: avg_score_normalized
48
+ value: 0.885
49
+ weight: 0.0
50
+ - name: gaia_core_pass_rate
51
+ value: 0.7273
52
+ weight: 0.0
53
+ breakdown:
54
+ per_category:
55
+ - category: gaia_core
56
+ total: 11
57
+ correct: 8
58
+ accuracy: 0.7273
59
+ performance:
60
+ ttft_s: 7.254
61
+ throughput_tps: 38.7
62
+ total_input_tokens: 90710
63
+ total_output_tokens: 810
64
+ scenarios_with_data: 2
65
+ aggregate:
66
+ name: judged_pass_rate
67
+ formula: round(100 * sum(weight_i * value_i) / sum(weight_i), 2)
68
+ components:
69
+ - metric: judged_pass_rate
70
+ value: 0.7272727272727273
71
+ weight: 1.0
72
+ - metric: avg_score_normalized
73
+ value: 0.885
74
+ weight: 0.0
75
+ - metric: gaia_core_pass_rate
76
+ value: 0.7273
77
+ weight: 0.0
78
+ value: 72.73
79
+ generated_at: '2026-08-24T11:25:31.271112+00:00'
80
+ inherited_from: null
81
+ ---
82
+ # GAIA (flagship agent) — Eval Scorecard v0.1.0
83
+
84
+ **Aggregate score: 72.73** (out of 100)
85
+
86
+ ## Recipe
87
+
88
+ | Field | Value |
89
+ |-------|-------|
90
+ | Dataset | [eval/scenarios/](eval/scenarios/) |
91
+ | Description | Judged multi-turn scenario corpus for the flagship gaia agent (13 gaia_* categories: core conversation/memory tiers through adversarial, RAG, files, data, web, shell gate, skill lifecycle + all 12 skills, honesty floor, tool selection, code index, skill capture); deterministic fixtures under tests/fixtures/gaia/, planted-fact ground truth per eval/scenarios/GAIA_FIXTURE_VALUES.md |
92
+ | Dataset size | 103 labeled examples |
93
+ | Test cases run | 11 |
94
+ | Methodology | gaia eval agent --agent-type gaia: each scenario is driven against the Agent UI backend (REST/SSE) by the eval driver and scored by the Claude judge on planted-fact ground truth + success criteria. Aggregate = judged_pass_rate over judged scenarios (PASS/FAIL/BLOCKED_BY_ARCHITECTURE; infra failures are excluded from the rate and fail the run's integrity gate instead). Reported secondaries (weight 0): the judge's 0-10 avg_score normalized to [0,1], and per-category pass rates. Thresholds/enforcement: tests/fixtures/gaia/quality_gate_thresholds.json |
95
+
96
+ ## Metrics
97
+
98
+ - **judged_pass_rate**: 0.7273 × 1.0
99
+ - **avg_score_normalized**: 0.8850 × 0.0
100
+ - **gaia_core_pass_rate**: 0.7273 × 0.0
101
+
102
+ ## Aggregate score recomputation
103
+
104
+ Formula: `round(100 × Σ(weightᵢ × valueᵢ) / Σ(weightᵢ), 2)`
105
+
106
+ Worked example:
107
+
108
+ ```
109
+ round(100 × ((0.7273 × 1.0) + (0.8850 × 0.0) + (0.7273 × 0.0)) / 1.0, 2) = 72.73
110
+ ```
111
+
112
+ A reader can reproduce this value from the `aggregate.components` in the front
113
+ matter alone — no eval-harness access needed.
114
+
115
+ ## Reproduction
116
+
117
+ Run the following commands from the repository root:
118
+
119
+ ```sh
120
+ # Prerequisites: install the eval extras + this repo's chat/gaia hub
121
+ # packages, start a Lemonade Server with the model on AMD Ryzen AI
122
+ # hardware, and have the Claude Code CLI on PATH (the eval driver).
123
+ uv pip install -e ".[dev,eval,ui,api]" -e hub/agents/chat/python -e hub/agents/gaia/python
124
+ gaia init # installs and starts Lemonade Server; it must stay running
125
+
126
+ # Step 0: stage fixtures + start the fixture server (see
127
+ # tests/fixtures/gaia/README.md for the staging contract)
128
+ python tests/fixtures/gaia/prepare_fixture_hub.py --skills-root <skills-root>
129
+ python tests/fixtures/gaia/serve_fixtures.py --port 8765 # separate shell
130
+
131
+ # Step 1: start the Agent UI backend (separate shell; NOT port 4001)
132
+ python -m gaia.ui.server --port 4200 --host 127.0.0.1
133
+
134
+ # Step 2: run every gaia category serially (never in parallel)
135
+ for c in gaia_core gaia_memory gaia_rag gaia_files gaia_data gaia_web \
136
+ gaia_shell gaia_skills_lifecycle gaia_skills_tasks \
137
+ gaia_skills_capture gaia_honesty gaia_tool_selection \
138
+ gaia_code; do
139
+ gaia eval agent --agent-type gaia --category $c \
140
+ --backend http://127.0.0.1:4200 --budget 5.00 --exclude-tag live
141
+ done
142
+
143
+ # Step 3: generate this scorecard from ONE combined run's output dir
144
+ python hub/agents/gaia/python/packaging/gen_scorecard.py \
145
+ --run-dir <run-dir-printed-by-the-eval> \
146
+ --model claude-haiku-4-5 \
147
+ --ctx-size 200000 \
148
+ --hardware "<hardware class>"
149
+ ```
150
+
151
+ See [eval-scorecard docs](https://amd-gaia.ai/docs/reference/eval-scorecard) and the [`adding-eval-scorecard` skill](.claude/skills/adding-eval-scorecard/SKILL.md) for the full setup guide.
152
+
153
+ ## Environment
154
+
155
+ | Field | Value |
156
+ |-------|-------|
157
+ | gaia_commit | d104b3b1 |
158
+ | model | claude-haiku-4-5 |
159
+ | ctx_size | 200000 |
160
+ | hardware | developer workstation (x86-64, agent on the Claude API — no Lemonade, no AMD NPU/GPU inference) |
161
+ | eval_model | claude-sonnet-4-6 |
162
+ | note | HARNESS-VALIDATION card, pending first runner baseline: agent on claude-haiku-4-5 over the gaia_core category only (11 scenarios, tags local_blocked_no_embedder excluded). NOT the product baseline — that is Gemma-4-E4B-it-GGUF on the self-hosted runner, captured by the first full gaia_scorecard_refresh.yml dispatch (rebaseline=true). |
163
+
164
+ ## Category breakdown
165
+
166
+ | Category | Total | Correct | Accuracy |
167
+ |----------|-------|---------|----------|
168
+ | gaia_core | 11 | 8 | 0.7273 |
169
+
170
+ ## Performance
171
+
172
+ _Measured on the run environment above (model / hardware / gaia_commit / corpus size); the perf gate is report-only, so these are observed values, not pass/fail bars (see `tests/fixtures/email/perf_gate_thresholds.json`)._
173
+
174
+ | Metric | Value |
175
+ |--------|-------|
176
+ | ttft_s | 7.254 |
177
+ | throughput_tps | 38.7 |
178
+ | total_input_tokens | 90710 |
179
+ | total_output_tokens | 810 |
180
+ | scenarios_with_data | 2 |