evals 2.5.0 → 2.7.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 +12 -5
- package/bin.js +43 -0
- package/cli.js +226 -60
- package/onboarding-prompt.md +118 -68
- package/package.json +6 -3
- package/start.ps1 +168 -66
- package/start.sh +99 -17
- package/vendor/MANIFEST +1 -1
- package/vendor/coding_harness_tracing-0.1.0-py3-none-any.whl +0 -0
- package/vendor/harness-pin.lock.json +1 -1
package/onboarding-prompt.md
CHANGED
|
@@ -6,15 +6,14 @@ Work through the flow below in order. Installing the AX CLI and Arize skills, au
|
|
|
6
6
|
|
|
7
7
|
## Step 0: Welcome and confirm
|
|
8
8
|
|
|
9
|
-
Greet the user and show the plan, then ask before doing anything:
|
|
9
|
+
Greet the user and show the plan, then ask before doing anything. Send this block as written and nothing else: no added steps, no parentheticals on the ones here (not "browser OAuth", not a folder path), and no preamble about the network check or the approval gate. Both come later in the flow, and explaining them before the user has agreed to anything is noise.
|
|
10
10
|
|
|
11
11
|
```text
|
|
12
12
|
Welcome to Arize AX. I'll get you set up with tracing. Here's what I'll do:
|
|
13
13
|
|
|
14
14
|
1. Install the AX CLI and Arize skills
|
|
15
15
|
2. Create a free Arize AX account or sign you in
|
|
16
|
-
3. Add tracing to
|
|
17
|
-
4. Capture your first traces
|
|
16
|
+
3. Add tracing to an existing app, a new starter app, or this coding agent itself
|
|
18
17
|
|
|
19
18
|
Shall I proceed?
|
|
20
19
|
```
|
|
@@ -23,6 +22,26 @@ Do not proceed until the user approves.
|
|
|
23
22
|
|
|
24
23
|
## Prerequisites
|
|
25
24
|
|
|
25
|
+
**Check network access first.** Every step below needs it: the CLI comes from PyPI, and auth and traces go to Arize. Agent sandboxes often block network by default, and it fails as a hang rather than an error:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
for h in pypi.org registry.npmjs.org api.arize.com app.arize.com; do
|
|
29
|
+
code=$(curl -s -o /dev/null -w '%{http_code}' --max-time 5 "https://$h")
|
|
30
|
+
[ "$code" != "000" ] && echo "$h ok" || echo "$h BLOCKED"
|
|
31
|
+
done
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`000` is a DNS or connect failure — your sandbox, not the user's connection.
|
|
35
|
+
|
|
36
|
+
If anything is blocked, ask your harness to escalate: request network or elevated permissions for the commands that need them, rather than retrying silently or waiting. If escalation is refused or your harness doesn't offer it, stop — with no network this flow cannot complete, so don't retry and don't look for a workaround:
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
My sandbox is blocking network access, so I can't install the CLI or reach
|
|
40
|
+
Arize. Restart me with network access enabled and I'll pick this up.
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Later in the flow, treat a connection or DNS error from any command the same way: it means network, not authentication, so stop and report rather than re-authenticating or recreating a profile.
|
|
44
|
+
|
|
26
45
|
The AX CLI must be **arize-ax-cli `0.29.0` or newer** (Step 1 installs the latest) and needs **Python 3.11+** — a hard requirement. If Python is missing, stop and have the user install it from https://www.python.org/downloads/ and re-run. **Node.js 18+ with npx** is optional but installs the Arize skills; without it, don't stop — continue and use the docs paths in Step 6 (the Vercel AI SDK v7 starter needs Node.js 22+).
|
|
27
46
|
|
|
28
47
|
## Step 1: Install or update the AX CLI and Arize skills
|
|
@@ -35,7 +54,7 @@ pipx install arize-ax-cli # already installed: pipx upgrade arize-ax-cli
|
|
|
35
54
|
python3 -m pip install --upgrade arize-ax-cli
|
|
36
55
|
```
|
|
37
56
|
|
|
38
|
-
If npx is available, install the Arize agent skills; otherwise skip and continue (Step 6 falls back to the docs paths):
|
|
57
|
+
If npx is available, install the Arize agent skills; otherwise skip and continue (Step 6 falls back to the docs paths). If the install errors or doesn't finish promptly, skip it and continue rather than waiting — the same fallback applies:
|
|
39
58
|
|
|
40
59
|
```bash
|
|
41
60
|
npx skills add Arize-ai/arize-skills --skill '*' --yes
|
|
@@ -72,7 +91,7 @@ If a `default` profile exists but the probe failed, it's signed out or expired,
|
|
|
72
91
|
ax profiles create default --auth-method api-key --api-key "$ARIZE_API_KEY"
|
|
73
92
|
```
|
|
74
93
|
|
|
75
|
-
Reuse this key throughout — do **not** create a new one in Step 6.
|
|
94
|
+
Reuse this key throughout — do **not** create a new one in Step 6. Only if the probe passes, though: a stale or wrong-org `ARIZE_API_KEY` still looks present. If it fails, `ax profiles delete default`, take the OAuth path below, and let Step 6 create a key as normal.
|
|
76
95
|
|
|
77
96
|
- **No key anywhere** — sign up or sign in with browser OAuth:
|
|
78
97
|
|
|
@@ -80,7 +99,7 @@ If a `default` profile exists but the probe failed, it's signed out or expired,
|
|
|
80
99
|
ax profiles create default --auth-method oauth --utm-params "utm_source=npmevals&utm_medium=cli&utm_campaign=prompt-first-onboarding"
|
|
81
100
|
```
|
|
82
101
|
|
|
83
|
-
|
|
102
|
+
Pass `--utm-params` verbatim on the two browser OAuth commands that carry it (`profiles create --auth-method oauth` and the `ax auth login` fallback) and add it to no other `ax` command — it tags a new sign-up with onboarding attribution.
|
|
84
103
|
|
|
85
104
|
Always pass the positional profile name `default`. Without it, the CLI prompts `profile name [default]:`, receives EOF from an agent-run command, and exits with `Goodbye!` without creating a profile.
|
|
86
105
|
|
|
@@ -88,39 +107,23 @@ The rest of this step applies only to the **browser OAuth** branch.
|
|
|
88
107
|
|
|
89
108
|
Creating an OAuth profile **is** the browser login flow. Treat it as an interactive browser handoff: it opens a browser, starts a localhost callback server such as `127.0.0.1:<port>/callback`, and waits for the browser redirect. The command must stay alive until the redirect lands and the CLI exits on its own.
|
|
90
109
|
|
|
91
|
-
While the OAuth command is waiting, do not close its stdin, send Ctrl-C, `pkill` the AX process, start a second auth command, or run an auth probe. Any of these aborts the in-progress browser flow. There is
|
|
110
|
+
While the OAuth command is waiting, do not close its stdin, send Ctrl-C, `pkill` the AX process, start a second auth command, or run an auth probe. Any of these aborts the in-progress browser flow. There is no exception: every sign-in path — existing account, Google/SSO, existing or brand-new email/password — completes through the same callback, so the command always gets there on its own.
|
|
92
111
|
|
|
93
112
|
After launching the OAuth command, tell the user:
|
|
94
113
|
|
|
95
114
|
```text
|
|
96
115
|
A browser window is opening for Arize AX sign-in.
|
|
97
116
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
- Creating a BRAND-NEW account with email and password? Arize emails you a
|
|
101
|
-
validation link. That link does NOT complete the CLI login, so this command
|
|
102
|
-
will hang. Click the link to finish creating your account, then tell me.
|
|
117
|
+
Sign in — or create a new account — in the browser. I'll continue
|
|
118
|
+
automatically once it completes.
|
|
103
119
|
|
|
104
|
-
|
|
120
|
+
Creating a BRAND-NEW account with email and password? Arize emails you a
|
|
121
|
+
validation link. Click it and finish in the browser; I'll wait.
|
|
105
122
|
```
|
|
106
123
|
|
|
107
|
-
|
|
124
|
+
Then wait for the command to exit on its own. Treat exit code `0`, or CLI success output such as `Configuration saved to profile 'default'` or `Active profile set`, as the primary completion signal. A new email/password sign-up can sit waiting for a while — the user has to find the validation email — so a long wait is not a hang; leave it alone.
|
|
108
125
|
|
|
109
|
-
|
|
110
|
-
ax profiles create default --auth-method oauth --utm-params "utm_source=npmevals&utm_medium=cli&utm_campaign=prompt-first-onboarding"
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
The second run is now a plain sign-in for the validated account. Its callback lands normally, so handle it with all the standard rules below — keep it alive and wait for it to exit on its own.
|
|
114
|
-
|
|
115
|
-
**Otherwise (existing account, SSO, or existing email/password):** wait for the command to exit on its own. Treat exit code `0`, or CLI success output such as `Configuration saved to profile 'default'` or `Active profile set`, as the primary completion signal.
|
|
116
|
-
|
|
117
|
-
Only after the OAuth command completes, verify authentication with a non-secret probe:
|
|
118
|
-
|
|
119
|
-
```bash
|
|
120
|
-
ax spaces list --limit 1 --output json
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
If the probe succeeds, continue. If the default OAuth profile already existed and the probe returns an authentication error, the profile is signed out or expired — run the fallback:
|
|
126
|
+
Only after the OAuth command completes, re-run the probe from the top of this step. If it succeeds, continue. If the default OAuth profile already existed and the probe returns an authentication error, the profile is signed out or expired — run the fallback:
|
|
124
127
|
|
|
125
128
|
```bash
|
|
126
129
|
ax auth login --utm-params "utm_source=npmevals&utm_medium=cli&utm_campaign=prompt-first-onboarding"
|
|
@@ -151,16 +154,20 @@ Ask what the user wants to trace before inspecting anything — the third option
|
|
|
151
154
|
```text
|
|
152
155
|
What would you like to trace?
|
|
153
156
|
|
|
154
|
-
1. An app in this folder
|
|
157
|
+
1. An existing app — in this folder or at another path
|
|
155
158
|
2. A new starter app I create for you
|
|
156
159
|
3. This coding agent itself — every session you run, in any project
|
|
157
160
|
|
|
158
161
|
Which one?
|
|
159
162
|
```
|
|
160
163
|
|
|
161
|
-
If they pick **3**, go to [Step 4A](#step-4a-trace-this-coding-agent) and skip the folder inspection entirely.
|
|
164
|
+
If they pick **3**, go to [Step 4A](#step-4a-trace-this-coding-agent) and skip the folder inspection entirely. If they pick **2**, go straight to "Create a starter app" below — don't inspect anything. For **1**, continue.
|
|
165
|
+
|
|
166
|
+
For options **1** and **2**, one directory ends up being **the app folder**: the app you instrument, which is not always the folder you were launched in. Establish it in this step and use it for every path in Steps 5 to 7.
|
|
162
167
|
|
|
163
|
-
|
|
168
|
+
### Detecting an app
|
|
169
|
+
|
|
170
|
+
Inspect a candidate folder to decide whether an app already exists. Do not change files during inspection. Look for:
|
|
164
171
|
|
|
165
172
|
- Python: `pyproject.toml`, `requirements.txt`, `setup.py`, `Pipfile`, imports.
|
|
166
173
|
- TypeScript/JavaScript: `package.json`, lockfiles, `src`, `app`, `pages`, provider imports.
|
|
@@ -168,24 +175,48 @@ Inspect the current folder to decide whether an app already exists. Do not chang
|
|
|
168
175
|
- Existing observability: `opentelemetry`, `TracerProvider`, `ARIZE_*`, `OTEL_*`, `OTLP_*`, Datadog, Honeycomb, Sentry, or other tracing.
|
|
169
176
|
- Agent framework: identify it by its import/package — e.g. `langchain` / `langgraph`, `llama_index`, `crewai`, `autogen`, `semantic_kernel`, `pydantic_ai`, `google.adk`, `dspy`, `agent_framework`, and others. **Route on the framework, not the provider client it wraps** — an `openai` or `anthropic` import inside a framework app is not the thing to instrument; the framework almost certainly has its own integration (see Step 6).
|
|
170
177
|
|
|
171
|
-
In a monorepo, check the git root to get oriented, but only instrument apps in or below the
|
|
178
|
+
In a monorepo, check the git root to get oriented, but only instrument apps in or below the folder you are scanning. If the project spans more than one language, instrument each one (route each through its own integration page in Step 6).
|
|
172
179
|
|
|
173
|
-
|
|
180
|
+
Run this detection on the current folder first, then branch on what you found.
|
|
174
181
|
|
|
175
182
|
### If an app exists in the current folder
|
|
176
183
|
|
|
177
|
-
|
|
184
|
+
Summarize the detected stack and offer both routes — declining the local app must not be a dead end, because the user may well have run this from a folder above the app they care about:
|
|
178
185
|
|
|
179
186
|
```text
|
|
180
|
-
I found a <language>/<framework> app in this folder.
|
|
181
|
-
|
|
187
|
+
I found a <language>/<framework> app in this folder. I can trace that, or an
|
|
188
|
+
app somewhere else.
|
|
189
|
+
|
|
190
|
+
1. Trace the app in this folder
|
|
191
|
+
2. Trace an app at a different path — tell me where
|
|
192
|
+
|
|
193
|
+
Which one?
|
|
182
194
|
```
|
|
183
195
|
|
|
184
|
-
|
|
196
|
+
On **1**, the app folder is the current folder; continue to Step 5. On **2**, follow "If the user gives a path" below. Don't offer the starter-app path here — they already have an app.
|
|
185
197
|
|
|
186
198
|
### If no app exists in the current folder
|
|
187
199
|
|
|
188
|
-
|
|
200
|
+
Do not ask whether to instrument the empty folder, and do not assume a starter app is what they want. Ask for a path first:
|
|
201
|
+
|
|
202
|
+
```text
|
|
203
|
+
I don't see an app in this folder. Give me the path to the app you want to
|
|
204
|
+
trace, and I'll instrument it — or say "starter" and I'll create a new app
|
|
205
|
+
for you instead.
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
On a path, follow the next section. On "starter", go to "Create a starter app".
|
|
209
|
+
|
|
210
|
+
### If the user gives a path
|
|
211
|
+
|
|
212
|
+
- Expand `~` and resolve a relative path against the current folder, then confirm the resolved absolute path back to the user before you scan it. A typo caught here beats an API key written into the wrong repo.
|
|
213
|
+
- Run the detection checklist on that folder. If it holds an app, that folder is the app folder from now on — summarize the stack you found there and continue to Step 5.
|
|
214
|
+
- If the path doesn't exist, or exists but has no app in it, say what you actually found and ask for another path. Don't quietly fall through to a starter app.
|
|
215
|
+
- If your own permission or sandbox layer won't let you read and write outside the folder you were launched in, say so plainly instead of half-instrumenting the app. Give the two ways out: the user grants access to that path, or they re-run `npx evals` from inside the app folder.
|
|
216
|
+
|
|
217
|
+
### Create a starter app
|
|
218
|
+
|
|
219
|
+
For option 2, or when the user asks for a starter app after the questions above. Ask which folder to create it in — that folder becomes the app folder — then offer these choices:
|
|
189
220
|
|
|
190
221
|
- OpenAI — Python or TypeScript (with a tool call)
|
|
191
222
|
- Anthropic — Python (with a tool call; official AX auto-instrumentation)
|
|
@@ -198,10 +229,20 @@ If the user picks an unsupported pairing, explain the supported options and ask
|
|
|
198
229
|
|
|
199
230
|
Only for option 3. This traces the **agent harness**, not an app: every session the user runs, in every project on this machine. It edits files under their home directory, nothing in the current repo. When done, go to Step 8 — Steps 5 to 7 are app-only.
|
|
200
231
|
|
|
201
|
-
Installer harness names: `claude`, `codex`, `cursor`, `copilot`, `gemini`, `kiro`, `opencode`, `omp` — note Cursor is `cursor`, not `cursor-agent`. Default to the agent you are running inside: state which you are and confirm, rather than asking.
|
|
232
|
+
Installer harness names: `claude`, `codex`, `cursor`, `copilot`, `antigravity`, `gemini`, `kiro`, `opencode`, `omp` — note Cursor is `cursor`, not `cursor-agent`, and Antigravity is `antigravity`, not `agy`. Default to the agent you are running inside: state which you are and confirm, rather than asking.
|
|
202
233
|
|
|
203
234
|
Per-agent setup, including the Claude Code and Cursor marketplace-plugin routes, is at `https://arize.com/docs/ax/integrations/platforms/<agent>/<agent>-tracing` (e.g. `.../claude-code/claude-code-tracing`) — the source of truth if anything below fails.
|
|
204
235
|
|
|
236
|
+
### Check the home directory is writable first
|
|
237
|
+
|
|
238
|
+
Everything below writes under `~/.arize` — the credentials file, then the harness itself. Confirm that works before asking for approval, so a read-only or restricted home fails here rather than halfway through an install the user already said yes to:
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
mkdir -p ~/.arize/onboarding && touch ~/.arize/onboarding/.probe && rm -f ~/.arize/onboarding/.probe
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
If that fails, say so and stop this path — agent tracing needs a writable home and there is no workaround from inside the session. Instrumenting an app (options 1 and 2) does not, so offer that instead. If the launcher already told the user it couldn't use `~/.arize/onboarding`, this is the same cause; don't re-diagnose it.
|
|
245
|
+
|
|
205
246
|
### Get approval — this needs its own explicit yes
|
|
206
247
|
|
|
207
248
|
Wider scope than an app install, so disclose it and wait:
|
|
@@ -227,7 +268,7 @@ Do not proceed without a yes. Note which categories they accepted — you enable
|
|
|
227
268
|
The installer reads credentials from a dotenv file, keeping the API key out of the command line, shell history, and this chat. Write it outside the project so it cannot be committed:
|
|
228
269
|
|
|
229
270
|
```bash
|
|
230
|
-
|
|
271
|
+
: > ~/.arize/onboarding/harness.env && chmod 600 ~/.arize/onboarding/harness.env
|
|
231
272
|
```
|
|
232
273
|
|
|
233
274
|
Add the Step 3 space ID as file contents, plus one `true` line per category the user **accepted**. Unattended installs capture nothing unless asked to, so a category you omit is off — omit the line for anything they declined:
|
|
@@ -242,7 +283,7 @@ ARIZE_LOG_TOOL_CONTENT=true
|
|
|
242
283
|
Do **not** set `ARIZE_PROJECT_NAME` — each harness defaults to its own project (`claude-code`, `codex`, …), which keeps two traced agents apart, and you read the real name back after installing. Then create the key into the same file, written atomically and never printed:
|
|
243
284
|
|
|
244
285
|
```bash
|
|
245
|
-
ax api-keys create --name "Coding agent tracing" --env-file ~/.arize/onboarding.env
|
|
286
|
+
ax api-keys create --name "Coding agent tracing" --env-file ~/.arize/onboarding/harness.env
|
|
246
287
|
```
|
|
247
288
|
|
|
248
289
|
**Skip that if `ARIZE_API_KEY` already existed in Step 2** — copy the existing value in without echoing it. At most one key, ever.
|
|
@@ -254,7 +295,7 @@ If a directory named `arize-offline/` sits beside this prompt file, install from
|
|
|
254
295
|
```bash
|
|
255
296
|
# keep `< /dev/null`: an installer too old for --non-interactive then fails
|
|
256
297
|
# fast instead of hanging on a prompt you cannot answer
|
|
257
|
-
ARIZE_ENV_FILE=~/.arize/onboarding.env \
|
|
298
|
+
ARIZE_ENV_FILE=~/.arize/onboarding/harness.env \
|
|
258
299
|
bash <prompt-dir>/arize-offline/harness-install.sh \
|
|
259
300
|
<harness> --wheel-dir <prompt-dir>/arize-offline --non-interactive < /dev/null
|
|
260
301
|
```
|
|
@@ -262,7 +303,7 @@ ARIZE_ENV_FILE=~/.arize/onboarding.env \
|
|
|
262
303
|
Otherwise fetch it (the harness name must come first, before any flag):
|
|
263
304
|
|
|
264
305
|
```bash
|
|
265
|
-
ARIZE_ENV_FILE=~/.arize/onboarding.env \
|
|
306
|
+
ARIZE_ENV_FILE=~/.arize/onboarding/harness.env \
|
|
266
307
|
bash <(curl -fsSL https://raw.githubusercontent.com/Arize-ai/coding-harness-tracing/main/install.sh) \
|
|
267
308
|
<harness> --non-interactive < /dev/null
|
|
268
309
|
```
|
|
@@ -270,14 +311,14 @@ ARIZE_ENV_FILE=~/.arize/onboarding.env \
|
|
|
270
311
|
Delete the env file only once the install has actually run — a retry needs it, and so does the user if they end up running the command:
|
|
271
312
|
|
|
272
313
|
```bash
|
|
273
|
-
rm -f ~/.arize/onboarding.env
|
|
314
|
+
rm -f ~/.arize/onboarding/harness.env
|
|
274
315
|
```
|
|
275
316
|
|
|
276
317
|
On Windows, use `harness-install.bat` from the same directory — `cmd` cannot run the `.sh`:
|
|
277
318
|
|
|
278
319
|
```powershell
|
|
279
|
-
$env:ARIZE_ENV_FILE = "$HOME\.arize\onboarding.env"
|
|
280
|
-
& <prompt-dir>\arize-offline\harness-install.bat <harness> --wheel-dir <prompt-dir>\arize-offline --non-interactive
|
|
320
|
+
$env:ARIZE_ENV_FILE = "$HOME\.arize\onboarding\harness.env"
|
|
321
|
+
& "<prompt-dir>\arize-offline\harness-install.bat" <harness> --wheel-dir "<prompt-dir>\arize-offline" --non-interactive
|
|
281
322
|
```
|
|
282
323
|
|
|
283
324
|
Without `arize-offline/`, use the install command from the agent's docs page with `$env:ARIZE_ENV_FILE` set first.
|
|
@@ -320,19 +361,21 @@ hooks existed. So:
|
|
|
320
361
|
3. Tell me when you have, and I'll check for traces.
|
|
321
362
|
```
|
|
322
363
|
|
|
323
|
-
Then poll with the Step 7 command and counter, passing that project name and space ID, every ~15 seconds for up to ~3 minutes. On a non-zero count go to Step 8. On timeout say so plainly and give the likely causes: the new session started before the install finished, the agent was never asked to do anything, `ARIZE_TRACE_ENABLED` is `false` in the agent's settings, or the wrong space.
|
|
364
|
+
Then poll with the Step 7 command and counter, passing that project name and space ID, every ~15 seconds for up to ~3 minutes. On a non-zero count go to Step 8. On timeout say so plainly and give the likely causes: the new session started before the install finished, the agent was never asked to do anything, `ARIZE_TRACE_ENABLED` is `false` in the agent's settings, or the wrong space.
|
|
324
365
|
|
|
325
366
|
## Step 5: Present the plan and get approval
|
|
326
367
|
|
|
327
|
-
Steps 5 to 7
|
|
368
|
+
Steps 5 to 7 are for the app paths only; if you took Step 4A, go straight to Step 8.
|
|
328
369
|
|
|
329
|
-
Before creating any remote resource, writing files, or installing dependencies, present one consolidated plan and wait for approval.
|
|
370
|
+
Before creating any remote resource, writing files, or installing dependencies, present one consolidated plan and wait for approval.
|
|
330
371
|
|
|
331
372
|
For an existing app, cover: detected language and framework, package manager, LLM provider or agent framework, any existing tracing to preserve, the env file that will be updated, the instrumentation packages and files that will change, whether a new AX user API key will be created or the existing `ARIZE_API_KEY` reused, and the project name that will be used.
|
|
332
373
|
|
|
333
374
|
For a starter app, cover: the chosen provider and language, the target folder, the packages that will be installed, and the project name.
|
|
334
375
|
|
|
335
|
-
|
|
376
|
+
**State the app folder's absolute path in the plan whenever it isn't the folder you were launched in** — every file you touch lands there, and it's the one detail the user cannot verify from context.
|
|
377
|
+
|
|
378
|
+
Choose a default project name from the app folder or app name: lowercase it, replace spaces and unsupported punctuation with hyphens, and append `-arize-tracing` if it is too generic. Do not create an AX project explicitly — it is created on first trace ingestion.
|
|
336
379
|
|
|
337
380
|
```text
|
|
338
381
|
Here's my plan. Shall I proceed?
|
|
@@ -346,7 +389,7 @@ Only after approval, execute the plan in this order.
|
|
|
346
389
|
|
|
347
390
|
### Choose the env file
|
|
348
391
|
|
|
349
|
-
|
|
392
|
+
The env file lives in the **app folder** from Step 4. Pick its name to match the app and use that one file for every variable below:
|
|
350
393
|
|
|
351
394
|
- Next.js, Vite, or browser-adjacent TypeScript apps: `.env.local`
|
|
352
395
|
- Python apps, Node scripts, backend services, or unknown type: `.env`
|
|
@@ -354,7 +397,7 @@ Pick the env file to match the app and use it for every variable below:
|
|
|
354
397
|
|
|
355
398
|
Do not read existing env file contents into chat. Preserve unrelated variables and never reveal their values.
|
|
356
399
|
|
|
357
|
-
Make sure the env file is git-ignored before writing the API key to it —
|
|
400
|
+
Make sure the env file is git-ignored before writing the API key to it — check the `.gitignore` of the app folder's own repo. If it has one, confirm it covers the file (add `.env` / `.env.local` if not); for a starter app you create, add one. The API key must never be committed to version control.
|
|
358
401
|
|
|
359
402
|
### Write the non-secret variables
|
|
360
403
|
|
|
@@ -365,9 +408,11 @@ ARIZE_SPACE_ID=<space-id>
|
|
|
365
408
|
ARIZE_PROJECT_NAME=<chosen-project-name>
|
|
366
409
|
```
|
|
367
410
|
|
|
411
|
+
An exported variable beats this file — both `dotenv` implementations leave an existing environment variable alone by default. Check `env | grep ARIZE_`; if anything you just wrote is exported, tell the user to `unset` it in the shell they'll run the app from, or to load with `override=True`. Your Step 7 check reads the CLI profile, not the app's environment, so it would pass regardless.
|
|
412
|
+
|
|
368
413
|
### Create the API key
|
|
369
414
|
|
|
370
|
-
**Skip this entirely if `ARIZE_API_KEY` was already present in Step 2** — reuse it and leave its env value untouched. Only create a key when you authenticated with browser OAuth and the app has no key yet.
|
|
415
|
+
**Skip this entirely if `ARIZE_API_KEY` was already present and validated in Step 2** — reuse it and leave its env value untouched. Only create a key when you authenticated with browser OAuth and the app has no key yet.
|
|
371
416
|
|
|
372
417
|
Create the key and write it into the env file in one step:
|
|
373
418
|
|
|
@@ -375,11 +420,11 @@ Create the key and write it into the env file in one step:
|
|
|
375
420
|
ax api-keys create --name "Local Arize AX tracing" --env-file .env
|
|
376
421
|
```
|
|
377
422
|
|
|
378
|
-
`--env-file` writes `ARIZE_API_KEY` atomically and **never prints it** — no temp file, no secret in your terminal or chat. Use `.env.local` if that's the app's convention
|
|
423
|
+
`--env-file` writes `ARIZE_API_KEY` atomically and **never prints it** — no temp file, no secret in your terminal or chat. Use `.env.local` if that's the app's convention, and always pass the app folder's path (`--env-file /path/to/app/.env`) — a bare `.env` would leave a stray key file in the wrong directory. The file is created if missing, an existing `ARIZE_API_KEY` is replaced in place, and other variables are preserved.
|
|
379
424
|
|
|
380
|
-
**Create the key exactly once** — a second `ax api-keys create` just orphans a still-active key
|
|
425
|
+
**Create the key exactly once** — a second `ax api-keys create` just orphans a still-active key, and the env file must already be git-ignored.
|
|
381
426
|
|
|
382
|
-
If key creation fails, have the user create one in the Arize AX UI and add it to the env file without exposing it in chat.
|
|
427
|
+
If key creation fails, have the user create one in the Arize AX UI and add it to the env file without exposing it in chat.
|
|
383
428
|
|
|
384
429
|
Handle the LLM provider's own key (e.g. `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`) in the same env file — the app can't make a call or produce traces without it:
|
|
385
430
|
|
|
@@ -405,7 +450,7 @@ Common shortcuts:
|
|
|
405
450
|
|
|
406
451
|
1. Use a framework-specific OpenInference instrumentor if one exists (`openinference-instrumentation-<name>` / `@arizeai/openinference-instrumentation-<name>`), wired up with `arize-otel` per the manual-instrumentation guide; install it unpinned.
|
|
407
452
|
1. Instrument the underlying provider (OpenAI, Anthropic, Bedrock, …) with its instrumentor **only if the framework calls the provider SDK directly**. Many agent frameworks instead drive the model through their own client layer and emit their own OpenTelemetry spans — a provider instrumentor captures **no traces** for those. Never reach for the provider instrumentor as a blind fallback just because you recognize an `openai`/`anthropic` client.
|
|
408
|
-
1. Otherwise instrument manually
|
|
453
|
+
1. Otherwise instrument manually by code — follow https://arize.com/docs/ax/instrument/manual-instrumentation#by-code — or stop and ask the user if you still can't determine a setup. `arize-otel` gives you a tracer, not LLM spans: **set the OpenInference span kind on every span you create** (`LLM` for a model call, `TOOL` for a tool, `AGENT` for the loop, `CHAIN` for a step), **and set the span status** — `ERROR` with the exception recorded on failure, `OK` otherwise. Without the kind, spans arrive as generic spans that AX cannot read as LLM calls: Step 7's span count comes back non-zero and looks like success while the trace shows no input, output, model, or token counts. Without the status, failed calls look like successful ones and errors never surface in AX.
|
|
409
454
|
|
|
410
455
|
For existing apps:
|
|
411
456
|
|
|
@@ -425,7 +470,7 @@ For starter apps:
|
|
|
425
470
|
|
|
426
471
|
### Package guidance
|
|
427
472
|
|
|
428
|
-
Install into the app's existing environment
|
|
473
|
+
Install into the app's existing environment — the one in the app folder, using its virtualenv if it has one — exactly the packages the detected framework's integration page lists — instrumentor names and peer dependencies differ per framework, so follow that page rather than copying from another stack or guessing versions.
|
|
429
474
|
|
|
430
475
|
## Step 7: Run the app and poll for the first trace
|
|
431
476
|
|
|
@@ -437,11 +482,12 @@ If you created a starter app in this flow, offer to run it for the user:
|
|
|
437
482
|
Your starter app is ready. Want me to run it for you?
|
|
438
483
|
```
|
|
439
484
|
|
|
440
|
-
If they say yes, run it yourself with the run command, then poll. If they say no — or if you instrumented their existing app rather than creating a starter — tell them the exact run command and ask them to run it:
|
|
485
|
+
If they say yes, run it yourself with the run command, then poll. If they say no — or if you instrumented their existing app rather than creating a starter — tell them the exact run command and ask them to run it. When the app folder isn't the folder they're sitting in, lead with the `cd` so the command works as pasted:
|
|
441
486
|
|
|
442
487
|
```text
|
|
443
488
|
Run your app with:
|
|
444
489
|
|
|
490
|
+
cd <app folder>
|
|
445
491
|
<run command>
|
|
446
492
|
|
|
447
493
|
It should make at least one LLM call. I'll poll Arize AX and let you know as
|
|
@@ -462,20 +508,22 @@ A non-zero count confirms traces are arriving. If you need to inspect a span to
|
|
|
462
508
|
This uses the CLI profile from Step 2 (OAuth or api-key) — it works the same either way. If the export errors with an authentication failure, the profile isn't valid; re-run the Step 2 probe and re-authenticate, or fall back to having the user open the project in the Arize AX UI to confirm traces.
|
|
463
509
|
|
|
464
510
|
- When spans come back, stop polling and continue to Step 8.
|
|
465
|
-
- On timeout, do not fail silently. Tell the user no traces arrived yet, and give likely causes: app didn't make an LLM call, tracing initialized after the client was created, a short-lived script exited before flushing spans,
|
|
511
|
+
- On timeout, do not fail silently. Tell the user no traces arrived yet, and give likely causes: app didn't make an LLM call, tracing initialized after the client was created, a short-lived script exited before flushing spans, the wrong space/project/env file, or **an exported `ARIZE_*` variable overriding the env file** (`env | grep ARIZE_`). Offer to re-check once they've run it again.
|
|
466
512
|
|
|
467
513
|
Do not fabricate trace results. Only report traces the export command actually returned.
|
|
468
514
|
|
|
469
515
|
## Step 8: Report the first traces with a link
|
|
470
516
|
|
|
471
|
-
Once spans arrive, report the span count and give the user a link
|
|
517
|
+
Once spans arrive, report the span count and give the user a deep link to the project in Arize AX. Point them at the UI to explore the trace contents rather than printing span bodies into chat.
|
|
518
|
+
|
|
519
|
+
Build that link with the **Arize link skill**: if you installed the skills in Step 1, load it now by reading `arize-link/SKILL.md` from your agent's skills directory (same paths as Step 6) and follow it. It owns the URL format and the `ax` commands that discover the organization and project IDs; you already have the project name and the space ID from Step 3.
|
|
472
520
|
|
|
473
521
|
```text
|
|
474
522
|
Your first traces are in Arize AX. Open project `<ARIZE_PROJECT_NAME>` here:
|
|
475
|
-
|
|
523
|
+
<project link>
|
|
476
524
|
```
|
|
477
525
|
|
|
478
|
-
If
|
|
526
|
+
If that skill file doesn't exist (e.g. npx was missing in Step 1), don't invent a URL structure: fall back to `https://app.arize.com/` plus instructions to select the project.
|
|
479
527
|
|
|
480
528
|
## Step 9: Point at docs
|
|
481
529
|
|
|
@@ -501,11 +549,13 @@ If you took Step 4A, add the controls that matter for agent tracing:
|
|
|
501
549
|
## Critical rules
|
|
502
550
|
|
|
503
551
|
- Get the user's approval (Step 5) before creating AX resources, editing files, or installing dependencies.
|
|
504
|
-
- Authenticate the CLI before any other `ax` call
|
|
552
|
+
- Authenticate the CLI (Step 2) before any other `ax` call; env vars alone don't. Never interrupt a waiting OAuth command — no stdin close, Ctrl-C, `pkill`, or probe. A slow wait is not a hang.
|
|
505
553
|
- Never print, log, or summarize secrets in chat — API keys, env-file contents/values, or span bodies (prompts, completions, tool args, user data) — and never read env files into chat. Only report traces a command actually returned.
|
|
506
|
-
-
|
|
554
|
+
- One AX API key, ever: reuse a **validated** `ARIZE_API_KEY`, else a **single** `ax api-keys create --env-file <file>` into an already-git-ignored file.
|
|
555
|
+
- Ambient `ARIZE_*` variables are claims to verify, not facts to adopt: probe a found API key before reusing it, and remember that an exported variable overrides the env file you write.
|
|
556
|
+
- Everything you write goes in the **app folder** (Step 4), which may not be the folder you were launched in. Name its absolute path in the plan; pass it explicitly to `--env-file` and the run command.
|
|
507
557
|
- Write the space **ID** (not its name) to `ARIZE_SPACE_ID`, or traces won't route; never create an AX project explicitly (it's made on first ingestion).
|
|
508
|
-
- Initialize tracing before LLM clients
|
|
509
|
-
-
|
|
558
|
+
- Initialize tracing before LLM clients exist; flush before short-lived scripts exit. Vercel AI SDK v7 also needs Node.js 22+, `@ai-sdk/otel` registered, and per-call `experimental_telemetry`.
|
|
559
|
+
- Step 4A needs its own explicit yes, never folded into another approval — machine-wide, captures prompts and tool output. Run its installer with `--non-interactive` and `< /dev/null`, verify with `status --json`, and never restart the session you're in.
|
|
510
560
|
|
|
511
561
|
Docs: https://arize.com/docs/llms.txt
|
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "evals",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "Arize AX onboarding — instrument your app with tracing via your coding agent",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "cli.js",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=20"
|
|
9
|
+
},
|
|
7
10
|
"scripts": {
|
|
8
11
|
"postinstall": "node -e \"console.log('Arize evals installed — run: npx evals')\"",
|
|
9
12
|
"start": "node cli.js",
|
|
@@ -13,13 +16,13 @@
|
|
|
13
16
|
},
|
|
14
17
|
"dependencies": {
|
|
15
18
|
"ink": "^6.0.0",
|
|
16
|
-
"ink-gradient": "^3.0.0",
|
|
17
19
|
"react": "^19.0.0"
|
|
18
20
|
},
|
|
19
21
|
"bin": {
|
|
20
|
-
"evals": "./
|
|
22
|
+
"evals": "./bin.js"
|
|
21
23
|
},
|
|
22
24
|
"files": [
|
|
25
|
+
"bin.js",
|
|
23
26
|
"cli.js",
|
|
24
27
|
"onboarding-prompt.md",
|
|
25
28
|
"start.sh",
|