@amd-gaia/gaia 0.2.0 → 0.3.2

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
@@ -11,8 +11,10 @@ verifies both against a checksum manifest that ships inside this package, and dr
11
11
  you into the terminal UI. No Python to install, no repo to clone, no build step.
12
12
  Local inference is the default. The TUI can explicitly select Fireworks AI or AMD
13
13
  LLM Gateway through Lemonade; remote chat sends conversation history to that provider. The
14
- terminal UI's `--use-claude` flag, which would send a conversation to the
15
- Anthropic API, is refused for the agent this package installs — see
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
16
18
  [`SPEC.md` §5.5](./SPEC.md#55-other-transports).
17
19
 
18
20
  The terminal UI you get here is the published **`terminal-hub`** component — the
@@ -37,9 +39,12 @@ however you arrive at the terminal UI, it behaves identically.
37
39
  - **Node.js 18+** (for the built-in `fetch`).
38
40
  - **[Lemonade Server](https://amd-gaia.ai/docs/reference/dev)** running locally —
39
41
  it hosts the model the agent thinks with. GAIA tells you if it isn't up.
40
- - The `gaia` Python CLI **0.23.1 or newer** on `PATH` for the daemon the terminal
41
- UI starts. Earlier cores start a daemon that has no entry for this agent, so the
42
- UI comes up with nothing behind it. Install it with
42
+ - **On Linux x64, glibc 2.34 or newer** for the agent sidecar (Ubuntu 22.04,
43
+ Debian 12 and RHEL 9 or later). An older distro cannot start the agent. Check
44
+ with `ldd --version`.
45
+ - The `gaia` Python CLI **0.25.2 or newer** on `PATH` for the daemon the terminal
46
+ UI starts. An earlier core cannot run this agent, so the UI comes up with
47
+ nothing behind it. Install it with
43
48
  `curl -fsSL https://amd-gaia.ai/install.sh | sh` (Windows:
44
49
  `irm https://amd-gaia.ai/install.ps1 | iex`).
45
50
 
@@ -92,8 +97,10 @@ Common options:
92
97
  | `--component <name>` | Fetch only `sidecar` or `tui` | `fetch` |
93
98
  | `--port <n>` | Sidecar bind port (default `8141`) | `serve` |
94
99
 
95
- A flag a command does not read is **refused**, not ignored — `gaia run --port
96
- 9000` exits 2 rather than silently coming up on the default port.
100
+ A flag a command does not read, or an option the launcher does not know, is
101
+ **refused**, not ignored — `gaia run --port 9000` and `gaia --forse` exit 2
102
+ rather than silently doing something else. Arguments intended for the terminal
103
+ UI must come after a bare `--`, for example `gaia -- --debug`.
97
104
 
98
105
  Set `DEBUG=gaia` for download, spawn, and sidecar output on stderr. Diagnostics
99
106
  never touch stdout, which the terminal UI owns.
@@ -182,10 +189,79 @@ await shutdown(proc);
182
189
  **Reuse the same `session_id` for every turn in a conversation.** It is what
183
190
  lets a document you had it index, or a skill you had it load, survive to the
184
191
  next question — drop it (or mint a new one per call) and the agent still
185
- answers, but it forgets everything from the previous turn. See
192
+ answers, but it forgets everything from the previous turn. An id must be 1–128
193
+ characters from `A-Z a-z 0-9 . _ -` (a UUID works); anything else is a 400. See
186
194
  [`SPEC.md` §5.2](./SPEC.md#52-session_id-and-agent-retention) for the retry
187
195
  and eviction behavior.
188
196
 
197
+ **Attaching files to a conversation? Send them in `documents`** (contract ≥
198
+ 2.16): the absolute paths, the whole set on every turn. The agent indexes any it
199
+ has not read yet before answering, and can read those exact files and nothing
200
+ else beside them. See [`SPEC.md` §5.1](./SPEC.md#51-endpoints).
201
+
202
+ **Private chat, or memory off? Send `memory` every turn** (contract ≥ 2.18):
203
+ `"private"` or `"off"` stops the turn saving anything to memory, including the
204
+ errors and lessons the agent records on its own; omit it and memory stays as the
205
+ agent has it. Send `allowed_paths` with the folders your UI shows the chat can
206
+ read, so the agent works in the same scope. Send `working_directory` (contract
207
+ ≥ 2.24) with the absolute chat workspace so bare file names resolve in the same
208
+ folder the UI shows; it is separate from the access allowlist. Binaries older
209
+ than 2.18 reject `allowed_paths` and older than 2.24 reject `working_directory`,
210
+ so probe `/version` first. See
211
+ [`SPEC.md` §5.1](./SPEC.md#51-endpoints).
212
+
213
+ **Internet switched off for the chat? Send `internet_off`** (contract ≥
214
+ 2.23) every turn: `true` refuses web search, page fetches, the browser,
215
+ connector, mailbox and Agent Hub tools and commands that contact another host;
216
+ `false` allows them.
217
+ Omit it and the agent keeps its own setting. Binaries older than 2.23 reject
218
+ the field with `422`, so probe `/version` first, do not answer an
219
+ internet-off turn on an older one, and cancel its running turn when the switch
220
+ goes off. If the user flips the switch while a turn is
221
+ running, `POST /v1/gaia/sessions/{session_id}/internet` with
222
+ `{"internet_off": true}` so the next tool call follows it rather than the next
223
+ turn. Post it only once `/query` has answered: before then the turn's own
224
+ `internet_off` replaces it, so re-read the switch at that point and post it if
225
+ it changed. See [`SPEC.md` §5.1](./SPEC.md#51-endpoints).
226
+
227
+ **Showing what a turn changed, with undo? Send `changes_turn_id`** (contract ≥
228
+ 2.19) along with `session_id`: the agent copies each file before it writes it,
229
+ into the snapshot store under its GAIA home, keyed by the session and that turn
230
+ id. The copies are complete before the stream's terminal event, so you can read
231
+ and restore them as soon as the stream ends. Omit it and nothing is copied. See
232
+ [`SPEC.md` §5.1](./SPEC.md#51-endpoints).
233
+
234
+ **Approving tool calls by policy? Match on `args`.** A `needs_confirmation`
235
+ event's `args` are exactly the arguments the model sent for the gated call,
236
+ each value capped at 64,000 characters; `args_truncated: true` means one was
237
+ cut, so don't auto-approve that call. What the agent adds to its own prompt —
238
+ the folder a shell call runs in, a risk note, the full path of a relative
239
+ write — comes in `prompt_context`, never
240
+ in `args`. See [`SPEC.md` §5.1](./SPEC.md#51-endpoints).
241
+
242
+ **Serving the turn from the Agent UI? Send `surface: "agent_ui"`** (contract ≥
243
+ 2.20), and the agent points recurring requests at the **Scheduled tasks** page
244
+ instead of saying it cannot schedule. Older binaries reject it with `422`.
245
+
246
+ **Calling it headless?** From contract 2.20 a failed model request names the
247
+ host it went through, and its advice points at the model server the GAIA host
248
+ uses (`LEMONADE_BASE_URL`) rather than at the TUI's settings. A front-end with
249
+ its own settings screen sends `surface` (`"tui"`, `"agent_ui"` or `"cli"`) to
250
+ get its own wording; a headless caller omits it. See
251
+ [`SPEC.md` §5.1](./SPEC.md#51-endpoints).
252
+
253
+ **Showing the model's reasoning?** Send `reasoning: true` (contract ≥ 2.22)
254
+ and it arrives as `reasoning` events with a `delta`, apart from `status` lines
255
+ and the answer. Join the deltas as they come. Older binaries reject the field
256
+ with `422`. See [`SPEC.md` §5.1](./SPEC.md#51-endpoints).
257
+
258
+ **Showing how full the model's window is?** From contract 2.21 the `final`
259
+ event carries `context`: the window size, the tokens the next call will take,
260
+ and what takes them (prompt, tools, documents, history). Older binaries leave
261
+ it out. It also carries `performance`, the turn's model and tool timings and
262
+ each model call's token counts, when the binary sends it. See
263
+ [`SPEC.md` §5.1](./SPEC.md#51-endpoints).
264
+
189
265
  Every failure throws a typed error (`IntegrityError`, `PlatformError`,
190
266
  `HealthTimeoutError`, `VersionMismatchError`, `BinaryNotFoundError`) with a message
191
267
  that names what failed and what to do about it.
@@ -211,17 +287,31 @@ what it must hash to. The release pipeline regenerates it from the artifacts
211
287
  actually being served — the sidecars it just published, and the terminal-hub
212
288
  artifacts it downloaded and cross-checked against the hub's own recorded hashes.
213
289
 
214
- Between releases the lock carries `PENDING-replace-with-real-sha256` placeholders.
215
- **A placeholder blocks the fetch outright** — before any network call — so an
216
- unverifiable binary can never be downloaded, let alone executed. If you need to run
217
- against a locally built binary, build it yourself and point the lifecycle helpers
218
- at it directly; the fetcher will not be talked into it.
290
+ A committed release's lock, like this one, always carries real hashes — the
291
+ regenerate step in the release pipeline never publishes placeholders. Between
292
+ releases, an unreleased working tree's lock instead carries
293
+ `PENDING-replace-with-real-sha256` placeholders, and **a placeholder blocks the
294
+ fetch outright** — before any network call — so an unverifiable binary can never
295
+ be downloaded, let alone executed. If you need to run against a locally built
296
+ binary, build it yourself and point the lifecycle helpers at it directly; the
297
+ fetcher will not be talked into it.
219
298
 
220
299
  ## Links
221
300
 
222
301
  - Guide: <https://amd-gaia.ai/docs/guides/gaia>
223
302
  - Technical reference: [`SPEC.md`](./SPEC.md)
303
+ - Eval scorecard: [`SCORECARD.md`](./SCORECARD.md) — the agent's measured
304
+ judged-scenario pass rate across the 13-category eval corpus, with the exact
305
+ recipe to reproduce it
224
306
  - Changes: [`CHANGELOG.md`](./CHANGELOG.md)
225
307
  - Issues: <https://github.com/amd/gaia/issues>
226
308
 
227
309
  MIT licensed. © 2024-2026 Advanced Micro Devices, Inc.
310
+
311
+ ## Developer engineering mode
312
+
313
+ For GAIA contributors: with `--developer-mode` on, you can report a problem you hit
314
+ while using GAIA and hand a snapshot of it, which you approve, to your own Claude
315
+ Code or Codex app. That app diagnoses it and works on a fix in a separate git
316
+ worktree. The mode is off unless you turn it on, and ordinary sessions never
317
+ 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 |