evalkit-py 0.3.0.dev29__py3-none-any.whl → 0.3.0.dev30__py3-none-any.whl

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.
evalkit/api/pull.py CHANGED
@@ -99,7 +99,7 @@ async def _bundle(ctx: PullContext, session: AsyncSession, run: BrowserRun) -> R
99
99
  status=run.status,
100
100
  created_at=run.created_at,
101
101
  title=run.title,
102
- run=run_body(run.run_id, run.source, stored, context),
102
+ run=run_body(run.run_id, run.source, stored, context, created_at=run.created_at),
103
103
  eval=context,
104
104
  )
105
105
  try:
@@ -366,7 +366,8 @@ are advisory). `--dataset` is the dataset you will sync into; it lets the
366
366
  server check case ids and overlay targets against every other dataset.
367
367
  A jargon-leak error is fixed by rewording the case, never by renaming
368
368
  internals. Then `evalkit run <dataset> --agent <agent>` syncs the directory
369
- to your workspace and runs it; CI, logged in as `admin`, runs `evalkit sync
369
+ to your workspace and runs it (for a code-driven agent, one without a
370
+ `harness_url`: run the eval script with `case_ids=[...]`); CI, logged in as `admin`, runs `evalkit sync
370
371
  <dir> --workspace dev` (the team's shared workspace) on merge (see
371
372
  `evalkit --help` for exact flags).
372
373
 
@@ -57,7 +57,8 @@ Rules:
57
57
  ## Run-then-pin
58
58
 
59
59
  1. Run the case single-case (`evalkit run <dataset> --agent <agent>
60
- --case-id <id>`; the run syncs first); collect the experiment.
60
+ --case-id <id>`; the run syncs first; for a code-driven agent,
61
+ run the eval script with `case_ids=[<id>]`); collect the experiment.
61
62
  2. Read the observed trajectory from the collected bundle. Derive the
62
63
  enrichment from what actually happened:
63
64
  - required tools: the real data tools the run used;
@@ -61,6 +61,25 @@ Every case is layered:
61
61
  overlay leaves a portable case. See the authoring skill's
62
62
  [`references/overlays.md`](../authoring-eval-cases/references/overlays.md).
63
63
 
64
+ ## How the agent is run
65
+
66
+ `evalkit skills install` puts the evalkit user docs in `evalkit-docs/`
67
+ beside this skill; links to `../evalkit-docs/` point there. In the evalkit
68
+ repository the same pages are in `docs/user/`.
69
+
70
+ Every run step below has two forms. `evalkit agents show <agent>` tells you
71
+ which applies:
72
+
73
+ - **Harness API agent** (`harness_url` set): `evalkit run <dataset> --agent
74
+ <agent>` drives it.
75
+ - **Code-driven agent** (no `harness_url`): `evalkit run` cannot drive it.
76
+ Run the client's eval script, which calls `run_experiment`; pass
77
+ `case_ids=[...]` or `tags=[...]` to run a subset.
78
+ `run_experiment(dataset=<dir name>)` syncs the directory when it is under
79
+ `cases` in `evalkit.yaml`; otherwise run `evalkit sync <dir>` first and pass
80
+ the dataset reference (`<name>@<workspace>`) (see
81
+ [`sdk-runs.md`](../evalkit-docs/sdk-runs.md)).
82
+
64
83
  ## Pick a loop
65
84
 
66
85
  | Developer gives | Wants back | Loop |
@@ -75,7 +94,8 @@ mix with Loop 1's Steps 1–6.
75
94
  ## Runs are history
76
95
 
77
96
  This applies to both loops. Every pulled run shows the agent as it was when
78
- the run happened (`run.json` `started_at`, `index.json` `created_at`), not as
97
+ the run happened (`run.json` `started_at`; `null` when the harness listing gave no creation
98
+ time), not as
79
99
  the code is now. Prompts,
80
100
  skills, tools and data may have changed since, so a failure in a run may
81
101
  already be fixed. Before diagnosing or proposing a fix, check the git history
@@ -86,6 +106,10 @@ git log --since=<run started_at> --oneline -- <paths of the surfaces involved>
86
106
  git log --since=<run started_at> --oneline -S '<tool or prompt text from the trajectory>'
87
107
  ```
88
108
 
109
+ If `started_at` is `null`, skip the `--since` commands, read the last few
110
+ commits that touch the surface instead, and say in the diagnosis that the
111
+ run's time was unknown.
112
+
89
113
  `--since` compares commit dates, which a rebase or squash merge resets, so
90
114
  treat it as a first pass: also read the last few commits that touch the
91
115
  surface (`git log -n 10 -- <path>`) whatever their date. Read any commit that
@@ -171,11 +195,17 @@ what correct output looks like for this input and every sibling like it.
171
195
 
172
196
  After authoring or editing any case YAML — in any entry point — run
173
197
  `evalkit lint <file> --dataset <slug>` first; errors block sync. Then
174
- `evalkit run <dataset> --agent <agent>`: with an `evalkit.yaml` in the repo
175
- this syncs the dataset directory to your workspace and runs your local agent
176
- from this machine. For a tight loop, run only the relevant cases
177
- (`evalkit run <dataset>/<file>.yaml`, `evalkit run <dataset>/<subfolder>`, or
178
- `--case-id`, repeatable) rather than the whole dataset.
198
+ run the dataset the way the agent is run (see "How the agent is run"):
199
+
200
+ - **Harness API agent** — `evalkit run <dataset> --agent <agent>`: with an
201
+ `evalkit.yaml` in the repo this syncs the dataset directory to your
202
+ workspace and runs your local agent from this machine. For a tight loop,
203
+ run only the relevant cases (`evalkit run <dataset>/<file>.yaml`,
204
+ `evalkit run <dataset>/<subfolder>`, or `--case-id`, repeatable) rather
205
+ than the whole dataset.
206
+ - **Code-driven agent** — run the eval script with `case_ids=[...]` (see
207
+ "How the agent is run"); if the script takes no case-subset option, add
208
+ one rather than running the whole dataset.
179
209
 
180
210
  `evalkit run` executes every selected case, in personal and shared datasets
181
211
  alike; review state never filters a run.
@@ -314,8 +344,10 @@ surfaces the proposal touches (search the case YAML for related scenarios).
314
344
  [`references/synthesize.md`](references/synthesize.md): describe the
315
345
  mechanism first, escalate to rule-style wording only when a re-run shows
316
346
  the behaviour persisted, prefer deterministic guards, no eval awareness.
317
- 2. `evalkit run <dataset> --agent <agent> --case-id <id> [--case-id …]`
318
- over the working set (the run syncs your edits first).
347
+ 2. Run the working set: `evalkit run <dataset> --agent <agent> --case-id
348
+ <id> [--case-id …]` for a Harness API agent (the run syncs your edits
349
+ first); for a code-driven agent, run the eval script with
350
+ `case_ids=[...]`.
319
351
  3. `evalkit runs pull --experiment <id>` for that experiment and pick the
320
352
  failures from the new `index.json`.
321
353
  4. Stop when no failure scores below threshold (**green**) or when the
@@ -66,7 +66,7 @@ trajectory alone.
66
66
  "run_id": "<from index.json>",
67
67
  "created_at": "<from index.json>",
68
68
  "intent": "<one line: what the user asked for>",
69
- "task_type": "<a case type from the authoring-eval-cases skill>",
69
+ "question_kind": "<free text: the kind of question, in a few words, e.g. 'monthly spend by category'>",
70
70
  "verdict": "failed | degraded | ok | unclear",
71
71
  "signals": ["<short label, e.g. 'user re-asked', 'tool error x3'>"],
72
72
  "failures": [
@@ -17,7 +17,8 @@ case YAML the new cases will join), and the path to write
17
17
 
18
18
  1. Read every observation and `index.json`.
19
19
  2. Cluster the `failed` and `degraded` observations into patterns. Two
20
- observations share a pattern when they have the same `task_type`, the same
20
+ observations share a pattern when they ask the same kind of question (`question_kind`; free text, so
21
+ treat close wordings as one), the same
21
22
  failure `kind`, and the evidence points at the same root cause (the same
22
23
  surface misbehaving the same way). Name each pattern in plain words.
23
24
  3. Score each pattern:
@@ -52,13 +53,13 @@ Surface: <kind> <file or "not located">
52
53
  Already covered by: none | <case id> (partly: <what is missing>)
53
54
  Fixed since the runs: no | yes, <sha> "<what changed>" (expected green)
54
55
  Proposed cases:
55
- - id: <kebab-id> type: <task_type> ground truth: known | NEEDS DEVELOPER
56
+ - id: <kebab-id> kind: <question_kind> ground truth: known | NEEDS DEVELOPER
56
57
  input: <time-anchored input>
57
58
  asserts: <the ideal behaviour, one line>
58
59
  Level: blackbox rubrics; overlay <check> if the check names harness tools
59
60
 
60
61
  ## Healthy
61
- - <task_type>: no failures in <n> runs
62
+ - <question_kind>: no failures in <n> runs
62
63
 
63
64
  ## Unclear or low confidence
64
65
  - <run_id>: <why>
@@ -145,7 +145,9 @@ evalkit agents list --workspace dev
145
145
  Put an `evalkit.yaml` in your repo. `evalkit run finance --agent myagent`
146
146
  then syncs `<cases>/finance` to `finance@<you>`, drives `myagent` from this
147
147
  machine, scores, and writes everything to the server. Run `finance@dev` to
148
- use the shared cases instead (Approved ones only, no sync). Fixture bytes are
148
+ use the shared cases instead (Approved ones only, no sync). `evalkit run`
149
+ drives agents with a `harness_url`; for a code-driven agent, run the eval
150
+ script with `case_ids=[...]` (see `sdk-runs.md`). Fixture bytes are
149
151
  read from the `fixtures` directory and uploaded by sha256 on every run or
150
152
  sync.
151
153
 
evalkit/core/pull.py CHANGED
@@ -117,8 +117,14 @@ def run_body(
117
117
  source: Literal["app", "eval"],
118
118
  record: AgentRunRecord | None,
119
119
  eval_context: RunEvalContext | None,
120
+ *,
121
+ created_at: datetime | None,
120
122
  ) -> dict:
121
- body: dict = {"run_id": run_id, "source": source}
123
+ body: dict = {
124
+ "run_id": run_id,
125
+ "source": source,
126
+ "started_at": created_at.isoformat() if created_at else None,
127
+ }
122
128
  if eval_context is not None:
123
129
  body["input"] = eval_context.case.input
124
130
  if record is not None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: evalkit-py
3
- Version: 0.3.0.dev29
3
+ Version: 0.3.0.dev30
4
4
  Summary: Self-hosted system for improving AI agents: server, CLI, web UI, Python SDK and agent skills
5
5
  Author-email: InferEdge Tech <tech@inferedge.com>
6
6
  License-File: LICENSE
@@ -21,7 +21,7 @@ evalkit/api/limits.py,sha256=KLYRCT0B94uduMb8CxuvjHLI5KPEHGjXo-GV6HvGeb8,2940
21
21
  evalkit/api/llm_providers.py,sha256=xws1Q7IPZ2mBuAmxIJsTUE9VoqhWdxhSPWMrvpSO8Eg,4194
22
22
  evalkit/api/meta.py,sha256=OTusYNYdGduHlbEEnpUYy1U188LJxRupl3vOGnQeJJE,693
23
23
  evalkit/api/otel.py,sha256=yDl-5L2HpU77NS1Get961fqo6jANVLX88Ppk1Qde3qg,13221
24
- evalkit/api/pull.py,sha256=ThiOd_ySQW1Dy7glq_2m8EE7rDub0xqoj5iFNMLy7P8,6750
24
+ evalkit/api/pull.py,sha256=JRNyFZVAf-Z_E2_Hh9rzlBJYTmkXKBuFUehrnUXhn7s,6777
25
25
  evalkit/api/review.py,sha256=I5vm5hVZp-pJlwFvIw2rSR_22qaysG5jo8SX_R8kZBk,9894
26
26
  evalkit/api/runs.py,sha256=AaYue9uTPJlyNxZltvRnRnZVsUrbqu3FHO23OFlh8Y8,19464
27
27
  evalkit/api/server_keys.py,sha256=KzaeB82YzRREF9dR5kwGaivstpW5qplI2fKa_GX5K7M,1792
@@ -86,7 +86,7 @@ evalkit/core/lint.py,sha256=f8NMPzQkpVpHOjETGLXnJXa9dhRrxY7w-7Z9YEaI14I,8756
86
86
  evalkit/core/overlays.py,sha256=B1SnJAsV6u_t-sJUoMukJK20hdKBDL_geKhQEjHAP74,2647
87
87
  evalkit/core/paths.py,sha256=tOwJFqZODe2vPkyzwVUwZYOCG6zmGgsd-30N7cKVqdg,623
88
88
  evalkit/core/promotion.py,sha256=fLRsdz5NzIKH9sOzEPngSEsQkmaol9iaSFY8UibV88s,2432
89
- evalkit/core/pull.py,sha256=ml9QLh_GFu5wVM4G5CltYxJ0jCkCOWxvBJxf1hDoPc8,6482
89
+ evalkit/core/pull.py,sha256=8ZHxdPD9YX5QCGpNgqwj19qd_hFBLjK__JNkB7_6lbw,6615
90
90
  evalkit/core/python_eval.py,sha256=SmbiMuvCQRAL5PEQy0yVa732iMaIlA_hFMNmIBChfOo,1935
91
91
  evalkit/core/remote_evaluators.py,sha256=dRYnZ6cZ_Udk6Sdtt2D9CZhFmnq6GnUmcOAyZXCzTr4,896
92
92
  evalkit/core/review.py,sha256=YM2C7yPZbVcbOVgqk21TdBUb8fFx5Rv39zkW_JZBJLk,6212
@@ -179,13 +179,13 @@ evalkit/bundled/docs/try-locally.md,sha256=6gEll1ZOf1YMlS7fFxuwmWKV0Uw9kdUZh0DB1
179
179
  evalkit/bundled/docs/workspaces.md,sha256=vxH1PPbZi6R-pl58XMQBxJX9Ufewobgobgv-NAFhapw,8724
180
180
  evalkit/bundled/ui/favicon.svg,sha256=fld5EQRjkfnAL9mDYPt2mAthyCpPLEXhlj_V7DqRvV4,448
181
181
  evalkit/bundled/ui/index.html,sha256=LoMLG8OSoG2UQE3TYwgtPv0WeG-xzj9iKLwqUY-2lHA,457
182
- evalkit/bundled/skills/authoring-eval-cases/SKILL.md,sha256=Rwj_rk8SubsNp30jp5KJDef51DSw0TiKZlGtnv9QJT4,22016
182
+ evalkit/bundled/skills/authoring-eval-cases/SKILL.md,sha256=uOy0vU7Kqy1Mx8O6qJKz83cja1DeyUIPxsnsDrUnGSk,22114
183
183
  evalkit/bundled/skills/connect-traces/SKILL.md,sha256=bSAXEclpT-8D34rn8QJROsZLFd6kiEcvK3VI-wuwa7Q,16942
184
- evalkit/bundled/skills/eval-driven-development/SKILL.md,sha256=D9BRhiit-hbN0eOa_9UvcNPf9ckhrO6uFr9mEqQ1Jt4,24239
184
+ evalkit/bundled/skills/eval-driven-development/SKILL.md,sha256=1uLFzfQvnxh5wZ-W0FE6iEKqrFNRHYoe_s5grv-WXsI,25702
185
185
  evalkit/bundled/skills/evalkit-deployment/SKILL.md,sha256=1pdRWvQV-7KoNJivJY_RR_9ZNRhij3BJQkoLsVFKEQs,18771
186
186
  evalkit/bundled/skills/evalkit-deployment/config.example.yaml,sha256=bIvhl_VCHcfHvTtvQ-Dxk9DLtc6mLwF-wqOTbf-DATA,3416
187
187
  evalkit/bundled/skills/evalkit-deployment/docker-compose.yml,sha256=bYFriCcxRUeqNMTan3iKnZRl4QdzBnJRSekkdhUpEHU,1928
188
- evalkit/bundled/skills/evalkit-usage/SKILL.md,sha256=-oizgIYFLxwZ3cyyRCNNrHZ2nbEhPX16fwSLQWHokYc,27816
188
+ evalkit/bundled/skills/evalkit-usage/SKILL.md,sha256=fUAuQOZH9ktVTPl0ohr6pjKexMsiN_I2kRw0G3hY7Z8,27954
189
189
  evalkit/bundled/ui/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2,sha256=DN04fJWQoan5eUVgAi27WWVKfYbxh6oMgUla1C06cwg,28076
190
190
  evalkit/bundled/ui/assets/KaTeX_AMS-Regular-DMm9YOAa.woff,sha256=MNqR6EyJP4deJSaJ-uvcWQsocRReitx_mp1NvYzgslE,33516
191
191
  evalkit/bundled/ui/assets/KaTeX_AMS-Regular-DRggAlZN.ttf,sha256=aFNIQLz90r_7bw6N60hoTdAefwTqKBMmdXevuQbeHRM,63632
@@ -349,14 +349,14 @@ evalkit/bundled/ui/assets/wgsl-DpFanUEy.js,sha256=M1uSecn4lmt1G3mQyTCdxT4mfHC4g3
349
349
  evalkit/bundled/ui/assets/workers-Bd9MSI6m.js,sha256=MtLXtZr2U6tlwj4DYKwFhttrBqNQZQ-SMkz_9N4Sjmc,1255
350
350
  evalkit/bundled/ui/assets/xml-6GJQ1Yjv.js,sha256=Gjjk2CetjGDJDSmDULsv7MCFfrtJXTLe2pxjn24T_xg,1923
351
351
  evalkit/bundled/ui/assets/yaml-DPCmvdc2.js,sha256=V8FlGYnOt3Ud9LMqAMPyaBRogIeWaz1wGvDGVwRs1uo,3543
352
- evalkit/bundled/skills/authoring-eval-cases/references/overlays.md,sha256=zhZ_bX4orcXK6y_CoyyHYZoeGm98-j2BgisJGgPqYRg,3765
352
+ evalkit/bundled/skills/authoring-eval-cases/references/overlays.md,sha256=MpFewKd0Oxucw_nbXzh5Pv3pCWXBWwHw8eqMB9I6678,3837
353
353
  evalkit/bundled/skills/authoring-eval-cases/references/tool-checks.md,sha256=n9rCeTPbV7TRn_Z2k7sgjCzufyS6a3luDAXCxZdKdPg,2762
354
354
  evalkit/bundled/skills/connect-traces/references/gen_ai.json,sha256=3mC-jYEj_-C9piQ8GrpvhzKDisKyOhVZqEMC_k0Uh9g,2060
355
355
  evalkit/bundled/skills/connect-traces/references/openinference.json,sha256=pCXdSCHRdP7NK6sHrdpBJywQo-NFMlVCEg95bwDXSXk,1634
356
356
  evalkit/bundled/skills/connect-traces/references/span-mapping-schema.md,sha256=F00e8VKjomfqOTZfnQc5A7RGh1Ns0HWWQH4wina40eE,5905
357
- evalkit/bundled/skills/eval-driven-development/references/analyze-run.md,sha256=vJLB_0k6v6Gmr3ruvYv0WFWbpv3dkE3ibCL_xq_Olz4,4783
357
+ evalkit/bundled/skills/eval-driven-development/references/analyze-run.md,sha256=0cD8cBsFT7BNFX9_gSt1mLABixoY77_C1lGg_CHIrtY,4821
358
358
  evalkit/bundled/skills/eval-driven-development/references/diagnose.md,sha256=4Anq8Z8mcP6kZsYbdHrhjmfvZskTvbI2k_g9uPcsqqg,7712
359
- evalkit/bundled/skills/eval-driven-development/references/synthesize-cases.md,sha256=CbK6oAOJCp16b1I1zvY2ifISBkHgWDYaVte_qJ4JCz8,3582
359
+ evalkit/bundled/skills/eval-driven-development/references/synthesize-cases.md,sha256=dCkUTXYGsq0BZNmpOm8ypmGOF4-5CmDSvmSte65gKdU,3658
360
360
  evalkit/bundled/skills/eval-driven-development/references/synthesize.md,sha256=le5KMpPCGMh6F1zT2kt6IFLbhGWkReb6nV6QRu6_lII,8052
361
361
  evalkit/bundled/skills/evalkit-deployment/references/config-and-deploy.md,sha256=gb_T_TmAPVl2Rv7TYQN9t-AYx6EauwwVINgoyzoT9FY,21248
362
362
  evalkit/bundled/skills/evalkit-deployment/references/harness-api.md,sha256=EgCj1h6Q434AysAR6gkCLjWtypgkrgNaIcm-qcBPb1k,11031
@@ -370,8 +370,8 @@ evalkit/bundled/skills/evalkit-deployment/try/run.py,sha256=WgsfixnPaIYirpAxwhTN
370
370
  evalkit/bundled/skills/evalkit-usage/references/suite-fixtures.md,sha256=plz5MvzIG4qQaMUkuPDcqIcf4M1n_Wn_G5zfXZPNctU,1814
371
371
  evalkit/bundled/skills/evalkit-deployment/try/cases/acme/balance-sheet/cases.yaml,sha256=IowaNJaLwa-sahiqpvw9xX_Mj3TrfeVZX93f_RfENU0,802
372
372
  evalkit/bundled/skills/evalkit-deployment/try/cases/acme/income-statement/cases.yaml,sha256=tf2DalZVlSI4Km-w6B0ER13bLGXEutY0_LxFO0nIroA,1235
373
- evalkit_py-0.3.0.dev29.dist-info/METADATA,sha256=3yT75oc1xwPdtebRihwV73MCOlYU00DF1Sq8M83b8KU,8546
374
- evalkit_py-0.3.0.dev29.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
375
- evalkit_py-0.3.0.dev29.dist-info/entry_points.txt,sha256=wugnobwgFyE6Kotv-Z9R0Xk4Um1ROfx5UU-DntvQQVA,49
376
- evalkit_py-0.3.0.dev29.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
377
- evalkit_py-0.3.0.dev29.dist-info/RECORD,,
373
+ evalkit_py-0.3.0.dev30.dist-info/METADATA,sha256=U07T9Y4IJBm5j4BPAmwrNtPzwKv-dNgAhKXGtEe8rx0,8546
374
+ evalkit_py-0.3.0.dev30.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
375
+ evalkit_py-0.3.0.dev30.dist-info/entry_points.txt,sha256=wugnobwgFyE6Kotv-Z9R0Xk4Um1ROfx5UU-DntvQQVA,49
376
+ evalkit_py-0.3.0.dev30.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
377
+ evalkit_py-0.3.0.dev30.dist-info/RECORD,,