@evolvingmachines/evolve 0.0.55-project-sable.20260916.db0bc0bb

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.
Files changed (98) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +25 -0
  3. package/dist/chunk-5GVMBEYI.js +11 -0
  4. package/dist/chunk-HQJI3HHU.js +1 -0
  5. package/dist/chunk-JS2UTK2I.js +427 -0
  6. package/dist/cli/index.cjs +73 -0
  7. package/dist/cli/index.d.cts +270 -0
  8. package/dist/cli/index.d.ts +270 -0
  9. package/dist/cli/index.js +54 -0
  10. package/dist/index.cjs +669 -0
  11. package/dist/index.d.cts +5023 -0
  12. package/dist/index.d.ts +5023 -0
  13. package/dist/index.js +230 -0
  14. package/dist/managed-modal-IJW62SSK.js +4 -0
  15. package/dist/resumable-HFSICSH3.js +1 -0
  16. package/dist/tar-GVC4KE52.js +1 -0
  17. package/dist/types-DlpTxdR_.d.cts +4777 -0
  18. package/dist/types-DlpTxdR_.d.ts +4777 -0
  19. package/dist/upload-KPYDMWFJ.js +1 -0
  20. package/docs-agents/SKILL.md +138 -0
  21. package/docs-agents/index.md +81 -0
  22. package/docs-agents/python/01-getting-started.md +511 -0
  23. package/docs-agents/python/02-configuration.md +855 -0
  24. package/docs-agents/python/03-runtime.md +899 -0
  25. package/docs-agents/python/04-streaming.md +451 -0
  26. package/docs-agents/python/05-swarm-pipeline.md +953 -0
  27. package/docs-agents/python/index.md +122 -0
  28. package/docs-agents/typescript/01-getting-started.md +494 -0
  29. package/docs-agents/typescript/02-configuration.md +841 -0
  30. package/docs-agents/typescript/03-runtime.md +864 -0
  31. package/docs-agents/typescript/04-streaming.md +478 -0
  32. package/docs-agents/typescript/05-swarm-pipeline.md +957 -0
  33. package/docs-agents/typescript/index.md +121 -0
  34. package/docs-evals/SKILL.md +112 -0
  35. package/docs-evals/cli-reference/agent.mdx +67 -0
  36. package/docs-evals/cli-reference/analysis.mdx +91 -0
  37. package/docs-evals/cli-reference/analyze.mdx +74 -0
  38. package/docs-evals/cli-reference/auth.mdx +60 -0
  39. package/docs-evals/cli-reference/check.mdx +146 -0
  40. package/docs-evals/cli-reference/dataset.mdx +133 -0
  41. package/docs-evals/cli-reference/index.mdx +108 -0
  42. package/docs-evals/cli-reference/job.mdx +239 -0
  43. package/docs-evals/cli-reference/run.mdx +196 -0
  44. package/docs-evals/cli-reference/secrets.mdx +95 -0
  45. package/docs-evals/cli-reference/skill.mdx +51 -0
  46. package/docs-evals/cli-reference/skills.mdx +81 -0
  47. package/docs-evals/cli-reference/trial.mdx +112 -0
  48. package/docs-evals/cli-reference/upload.mdx +36 -0
  49. package/docs-evals/core-concepts/agents.mdx +106 -0
  50. package/docs-evals/core-concepts/analyze.mdx +86 -0
  51. package/docs-evals/core-concepts/check.mdx +51 -0
  52. package/docs-evals/core-concepts/datasets.mdx +138 -0
  53. package/docs-evals/core-concepts/index.mdx +42 -0
  54. package/docs-evals/core-concepts/jobs.mdx +136 -0
  55. package/docs-evals/core-concepts/models.mdx +68 -0
  56. package/docs-evals/core-concepts/sandboxes.mdx +52 -0
  57. package/docs-evals/core-concepts/secrets.mdx +41 -0
  58. package/docs-evals/core-concepts/skills.mdx +42 -0
  59. package/docs-evals/core-concepts/tasks.mdx +216 -0
  60. package/docs-evals/core-concepts/trial-outputs.mdx +103 -0
  61. package/docs-evals/core-concepts/trials.mdx +103 -0
  62. package/docs-evals/core-concepts/upload.mdx +45 -0
  63. package/docs-evals/dashboard/checks.mdx +15 -0
  64. package/docs-evals/dashboard/datasets.mdx +24 -0
  65. package/docs-evals/dashboard/jobs.mdx +65 -0
  66. package/docs-evals/dashboard/traces.mdx +15 -0
  67. package/docs-evals/dashboard/trial-viewer.mdx +30 -0
  68. package/docs-evals/docs.json +180 -0
  69. package/docs-evals/getting-started/installation.mdx +56 -0
  70. package/docs-evals/getting-started/quick-start.mdx +85 -0
  71. package/docs-evals/index.mdx +36 -0
  72. package/docs-evals/sdk/python.mdx +139 -0
  73. package/docs-evals/sdk/typescript.mdx +141 -0
  74. package/docs-evals/sdk-reference/agents.mdx +105 -0
  75. package/docs-evals/sdk-reference/analyses.mdx +125 -0
  76. package/docs-evals/sdk-reference/auth.mdx +76 -0
  77. package/docs-evals/sdk-reference/checks.mdx +166 -0
  78. package/docs-evals/sdk-reference/datasets.mdx +305 -0
  79. package/docs-evals/sdk-reference/errors.mdx +199 -0
  80. package/docs-evals/sdk-reference/index.mdx +58 -0
  81. package/docs-evals/sdk-reference/jobs.mdx +731 -0
  82. package/docs-evals/sdk-reference/meta.mdx +52 -0
  83. package/docs-evals/sdk-reference/skills.mdx +68 -0
  84. package/docs-evals/sdk-reference/trials.mdx +232 -0
  85. package/docs-evals/sdk-reference/types.mdx +272 -0
  86. package/docs-evals/snippets/global-options.mdx +13 -0
  87. package/docs-evals/snippets/list-flags.mdx +23 -0
  88. package/harness-capabilities.json +430 -0
  89. package/hosted-error-codes.json +120 -0
  90. package/package.json +163 -0
  91. package/skills/create-adapter/SKILL.md +287 -0
  92. package/skills/create-task/SKILL.md +491 -0
  93. package/skills/evolve/SKILL.md +39 -0
  94. package/skills/publish/SKILL.md +142 -0
  95. package/skills/rewardkit/SKILL.md +330 -0
  96. package/spec/atif/README.md +45 -0
  97. package/spec/atif/trajectory.schema.json +865 -0
  98. package/spec/openapi.yaml +13447 -0
@@ -0,0 +1,180 @@
1
+ {
2
+ "$schema": "https://mintlify.com/docs.json",
3
+ "name": "Evolve",
4
+ "description": "Evolve hosted evals: run any model on any agent harness against datasets of Harbor-format tasks, in cloud sandboxes, from the evolve CLI and the TypeScript and Python SDKs. Use when the user wants to: (1) start, watch, or read a hosted eval job (evolve run, evolve job, jobs()), (2) browse the dataset catalog or publish their own dataset (evolve dataset), (3) check task quality (evolve check) or analyze trial traces (evolve analyze), (4) inspect or download trials, artifacts and traces (evolve trial, trials()), (5) register their own agent, mount skills, attach secrets, or choose models and sandbox providers, (6) upload a job run elsewhere (evolve upload), (7) use the dashboard's jobs, datasets, checks, traces and trial viewer pages. For running agents in sandboxes from code (the SDK's run(), Swarm, Pipeline) read `evolve skills get agents`.",
5
+ "theme": "maple",
6
+ "colors": {
7
+ "primary": "#B026FF",
8
+ "light": "#B026FF",
9
+ "dark": "#B026FF"
10
+ },
11
+ "favicon": "/favicon.png",
12
+ "logo": {
13
+ "light": "/logo/wordmark-light.png",
14
+ "dark": "/logo/wordmark-dark.png",
15
+ "href": "https://evolvingmachines.ai"
16
+ },
17
+ "appearance": {
18
+ "default": "light"
19
+ },
20
+ "background": {
21
+ "color": {
22
+ "light": "#f7f6f5",
23
+ "dark": "#0a0a0a"
24
+ }
25
+ },
26
+ "fonts": {
27
+ "family": "Google Sans Flex",
28
+ "weight": 400,
29
+ "heading": {
30
+ "family": "Google Sans Flex",
31
+ "weight": 600
32
+ }
33
+ },
34
+ "icons": {
35
+ "library": "lucide"
36
+ },
37
+ "styling": {
38
+ "eyebrows": "breadcrumbs",
39
+ "codeblocks": "dark"
40
+ },
41
+ "navbar": {
42
+ "links": [
43
+ {
44
+ "type": "github",
45
+ "href": "https://github.com/evolving-machines-lab/evolve"
46
+ }
47
+ ],
48
+ "primary": {
49
+ "type": "button",
50
+ "label": "Dashboard",
51
+ "href": "https://dashboard.evolvingmachines.ai"
52
+ }
53
+ },
54
+ "footer": {
55
+ "socials": {
56
+ "website": "https://evolvingmachines.ai",
57
+ "github": "https://github.com/evolving-machines-lab/evolve",
58
+ "discord": "https://discord.gg/Q36D8dGyNF"
59
+ }
60
+ },
61
+ "contextual": {
62
+ "options": [
63
+ "copy",
64
+ "view",
65
+ "claude",
66
+ "chatgpt"
67
+ ],
68
+ "display": "header"
69
+ },
70
+ "redirects": [
71
+ {
72
+ "source": "/core-concepts/tasks-and-datasets",
73
+ "destination": "/core-concepts/datasets"
74
+ }
75
+ ],
76
+ "navigation": {
77
+ "tabs": [
78
+ {
79
+ "tab": "Docs",
80
+ "groups": [
81
+ {
82
+ "group": "Getting started",
83
+ "pages": [
84
+ "index",
85
+ "getting-started/installation",
86
+ "getting-started/quick-start"
87
+ ]
88
+ },
89
+ {
90
+ "group": "Core concepts",
91
+ "pages": [
92
+ "core-concepts/index",
93
+ "core-concepts/tasks",
94
+ "core-concepts/datasets",
95
+ "core-concepts/jobs",
96
+ "core-concepts/trials",
97
+ "core-concepts/trial-outputs",
98
+ "core-concepts/agents",
99
+ "core-concepts/models",
100
+ "core-concepts/sandboxes",
101
+ "core-concepts/analyze",
102
+ "core-concepts/check",
103
+ "core-concepts/skills",
104
+ "core-concepts/secrets",
105
+ "core-concepts/upload"
106
+ ]
107
+ },
108
+ {
109
+ "group": "Dashboard",
110
+ "pages": [
111
+ "dashboard/datasets",
112
+ "dashboard/jobs",
113
+ "dashboard/trial-viewer",
114
+ "dashboard/checks",
115
+ "dashboard/traces"
116
+ ]
117
+ },
118
+ {
119
+ "group": "SDK",
120
+ "pages": [
121
+ "sdk/typescript",
122
+ "sdk/python"
123
+ ]
124
+ }
125
+ ]
126
+ },
127
+ {
128
+ "tab": "CLI reference",
129
+ "groups": [
130
+ {
131
+ "group": "The evolve command",
132
+ "pages": [
133
+ "cli-reference/index",
134
+ "cli-reference/run",
135
+ "cli-reference/analyze",
136
+ "cli-reference/check",
137
+ "cli-reference/upload"
138
+ ]
139
+ },
140
+ {
141
+ "group": "Command groups",
142
+ "pages": [
143
+ "cli-reference/job",
144
+ "cli-reference/trial",
145
+ "cli-reference/analysis",
146
+ "cli-reference/dataset",
147
+ "cli-reference/skill",
148
+ "cli-reference/skills",
149
+ "cli-reference/agent",
150
+ "cli-reference/auth",
151
+ "cli-reference/secrets"
152
+ ]
153
+ }
154
+ ]
155
+ },
156
+ {
157
+ "tab": "SDK reference",
158
+ "groups": [
159
+ {
160
+ "group": "Clients",
161
+ "pages": [
162
+ "sdk-reference/index",
163
+ "sdk-reference/jobs",
164
+ "sdk-reference/trials",
165
+ "sdk-reference/datasets",
166
+ "sdk-reference/analyses",
167
+ "sdk-reference/checks",
168
+ "sdk-reference/skills",
169
+ "sdk-reference/agents",
170
+ "sdk-reference/auth",
171
+ "sdk-reference/meta",
172
+ "sdk-reference/types",
173
+ "sdk-reference/errors"
174
+ ]
175
+ }
176
+ ]
177
+ }
178
+ ]
179
+ }
180
+ }
@@ -0,0 +1,56 @@
1
+ ---
2
+ title: "Installation"
3
+ description: "Install the evolve command and the SDKs, and set your API key."
4
+ ---
5
+
6
+ ## The CLI
7
+
8
+ The `evolve` command ships inside the npm package `@evolvingmachines/evolve`.
9
+
10
+ ```bash
11
+ npm install -g @evolvingmachines/evolve
12
+ evolve --version
13
+ ```
14
+
15
+ Inside a project that has the package, `npx evolve` runs it. For a one-off without installing, name the package: `npx --package=@evolvingmachines/evolve evolve --help`. A bare `npx evolve` fetches an unrelated package of that name from the public registry.
16
+
17
+ ## The SDKs
18
+
19
+ The same surface is available as a library in TypeScript and in Python.
20
+
21
+ <CodeGroup>
22
+
23
+ ```bash TypeScript
24
+ npm install @evolvingmachines/evolve
25
+ ```
26
+
27
+ ```bash Python
28
+ pip install evolvingmachines-evolve
29
+ ```
30
+
31
+ </CodeGroup>
32
+
33
+ The Python package needs Python 3.10 or newer. The hosted clients on these pages talk to the platform directly. Node.js and npm are needed only to run agents on your own machine through `run()`, which these pages do not cover.
34
+
35
+ ## Your API key
36
+
37
+ Create a key on the dashboard's [API keys page](https://dashboard.evolvingmachines.ai/api-keys), then export it. Every command and every SDK client reads `EVOLVE_API_KEY`.
38
+
39
+ ```bash
40
+ export EVOLVE_API_KEY="<your key>"
41
+ evolve auth status
42
+ ```
43
+
44
+ `auth status` prints who the platform thinks you are and which key is in use. The key itself is never printed back. To use a different key for one call, pass `--api-key <key>` on the command line, or `{ apiKey }` to an SDK client.
45
+
46
+ ## Your coding agent
47
+
48
+ ```bash
49
+ evolve skills install
50
+ ```
51
+
52
+ One small skill, `evolve`, lands in the skill folder of every coding agent on your machine: Claude Code, Codex, Cursor, Copilot, Gemini CLI and OpenCode. From then on, when you mention Evolve, evals, datasets, jobs or tasks, the agent reads the manual from the command itself, `evolve skills get evals`, one page at a time. The manual ships inside the package, so it always matches the version you installed. See [evolve skills](/cli-reference/skills).
53
+
54
+ <Card title="Quick start" icon="play" href="/getting-started/quick-start">
55
+ Start your first job.
56
+ </Card>
@@ -0,0 +1,85 @@
1
+ ---
2
+ title: "Quick start"
3
+ description: "Start your first job, watch it run, and download a trial."
4
+ ---
5
+
6
+ This page takes you from an empty terminal to a downloaded trial: one API key, any harness, any model, any sandbox provider, and every trial's trace streamed live. A trial is one agent's attempt at one task. A job is a set of trials: the tasks of one or more datasets, run by one or more agents.
7
+
8
+ <Steps>
9
+ <Step title="Install the CLI and set your key">
10
+ ```bash
11
+ npm install -g @evolvingmachines/evolve
12
+ export EVOLVE_API_KEY="<your key>"
13
+ evolve auth status
14
+ ```
15
+
16
+ Create a key on the dashboard's [API keys page](https://dashboard.evolvingmachines.ai/api-keys), then export it. See [installation](/getting-started/installation) for the SDKs.
17
+ </Step>
18
+
19
+ <Step title="Pick a dataset">
20
+ The catalog lists every dataset you can run, with its versions.
21
+
22
+ ```bash
23
+ evolve dataset list
24
+ evolve dataset show terminal-bench-4@4.0
25
+ ```
26
+
27
+ `dataset show` prints the version's tasks and, for each task, which sandbox providers can run it.
28
+ </Step>
29
+
30
+ <Step title="Start a job and watch it">
31
+ Name a dataset, an agent, and a model. `--watch` streams the job's events until it finishes; `-l 5` caps the run at five tasks so the first job is small.
32
+
33
+ ```bash
34
+ evolve run \
35
+ -d terminal-bench-4@4.0 \
36
+ -a codex \
37
+ -m gpt-5.5 \
38
+ -l 5 \
39
+ --watch
40
+ ```
41
+
42
+ The final block prints the job id, how many trials landed in each status, and what the trials spent. Without `--watch` the command returns the id at once and the job keeps running.
43
+ </Step>
44
+
45
+ <Step title="Read the result">
46
+ ```bash
47
+ evolve job show <job-id>
48
+ evolve job trials <job-id>
49
+ evolve trial show <trial-id>
50
+ ```
51
+
52
+ `job show` is the whole job: how many trials landed in each status, the rewards, the spend. `job trials` lists the trials one per line with their ids. `trial show` is one trial in full, with its reward and, when it failed, why.
53
+ </Step>
54
+
55
+ <Step title="Download the trial">
56
+ A trial downloads as a trial tree: the trajectory, the agent's stdout and stderr, the verifier log, and the reward.
57
+
58
+ ```bash
59
+ evolve trial download <trial-id> -o trials/
60
+ ```
61
+
62
+ To read one artifact without saving anything, stream it instead.
63
+
64
+ ```bash
65
+ evolve trial download <trial-id> --stream verifier
66
+ ```
67
+ </Step>
68
+ </Steps>
69
+
70
+ ## Next
71
+
72
+ <Columns cols={2}>
73
+ <Card title="Jobs" icon="list-checks" href="/core-concepts/jobs">
74
+ Attempts, concurrency, retries, spend caps, and what to do with a finished job.
75
+ </Card>
76
+ <Card title="Analyze" icon="search" href="/core-concepts/analyze">
77
+ Judge every trial's trace against a rubric with `--analyze`.
78
+ </Card>
79
+ <Card title="Agents" icon="bot" href="/core-concepts/agents">
80
+ The seven built-in harnesses, and how to bring your own.
81
+ </Card>
82
+ <Card title="CLI reference" icon="terminal" href="/cli-reference/run">
83
+ Every flag of `evolve run`.
84
+ </Card>
85
+ </Columns>
@@ -0,0 +1,36 @@
1
+ ---
2
+ title: "Evolve documentation"
3
+ description: "Environment-driven agent evaluations: any model, any harness, any sandbox, one API key. Every task versioned and checked, every trajectory analyzed."
4
+ ---
5
+
6
+ Evolve is hosted evaluation for agents: bring your own tasks or pick a public dataset, and run any model on any agent harness against them, in parallel, in cloud sandboxes. Each task is pinned to one versioned environment, so every run starts from the same place today or next month. Every trial returns its reward, its live trace, its files and its logs, with a quality verdict on any task before you spend on it and a judged analysis of any trajectory after.
7
+
8
+ - **One API key.** Any model with `-m`, any agent harness with `-a`, any sandbox provider with `-e`; no provider keys to manage.
9
+ - **Task quality control.** `evolve check` runs each task and judges it against a rubric before you spend a job on it.
10
+ - **Full observability.** Every trial streams its trace live; its files, artifacts, agent logs and verifier logs are yours to read and download when it ends.
11
+ - **Trace analysis after every trial.** `evolve analyze` judges every trial's trace against a rubric, cheap and scalable.
12
+
13
+ ```bash
14
+ export EVOLVE_API_KEY="<your key>" # from https://dashboard.evolvingmachines.ai/api-keys
15
+ evolve run \
16
+ -d terminal-bench-4@4.0 \
17
+ -a codex \
18
+ -m gpt-5.5 \
19
+ -l 5 \
20
+ --watch
21
+ ```
22
+
23
+ <Columns cols={2}>
24
+ <Card title="Quick start" icon="play" href="/getting-started/quick-start">
25
+ Install the CLI, start a job, read its result.
26
+ </Card>
27
+ <Card title="Core concepts" icon="layers" href="/core-concepts">
28
+ How tasks, jobs, trials, agents and sandboxes fit together.
29
+ </Card>
30
+ <Card title="CLI reference" icon="terminal" href="/cli-reference">
31
+ Every verb and flag of the `evolve` command.
32
+ </Card>
33
+ <Card title="Dashboard" icon="layout-dashboard" href="/dashboard/datasets">
34
+ Datasets, jobs and the trial viewer in the browser.
35
+ </Card>
36
+ </Columns>
@@ -0,0 +1,139 @@
1
+ ---
2
+ title: "Python SDK"
3
+ description: "Start a job, wait for it, read the result, and download it from Python."
4
+ ---
5
+
6
+ ```bash
7
+ pip install evolvingmachines-evolve
8
+ ```
9
+
10
+ The hosted surface is a set of clients, one per noun. Each one reads `EVOLVE_API_KEY` from the environment, or takes a `HostedClientConfig(api_key=..., base_url=...)`. Create a key on the dashboard's [API keys page](https://dashboard.evolvingmachines.ai/api-keys).
11
+
12
+ Every call is a coroutine, and every client is an async context manager with `close()`. A request never follows a redirect: the client refuses every 3xx and raises it as an error, so the key only reaches the host you configured.
13
+
14
+ ```python
15
+ import asyncio
16
+ from evolve import jobs, trials, datasets
17
+
18
+ evals = jobs()
19
+ ```
20
+
21
+ ## Start a job
22
+
23
+ ```python
24
+ job = await evals.start(
25
+ datasets=[{"name": "terminal-bench-4", "version": "4.0", "n_tasks": 5}],
26
+ agents=[{"name": "codex", "model_name": "gpt-5.5"}],
27
+ n_attempts=1,
28
+ n_concurrent_trials=4,
29
+ max_trial_spend_usd=25,
30
+ )
31
+
32
+ print(job.id, job.status) # "QUEUED"
33
+ ```
34
+
35
+ `datasets` is a list of selectors, as dicts or `DatasetSelector` dataclasses. A bare `name` resolves to the active version; `task_names`, `exclude_task_names` and `n_tasks` narrow the task set. Every arm in `agents`, a dict or an `AgentArm`, names a `model_name`, and `version`, `reasoning_effort`, `kwargs`, `preset` and `skills` are optional.
36
+
37
+ `sandbox_provider` picks `"e2b"`, `"daytona"` or `"modal"`. The retry policy is a `JobRetryConfigInput` dict and comes back resolved as `JobRetryConfig`. The fields are the same ones a `-c` config file takes on the CLI.
38
+
39
+ Results are dataclasses with the wire's `snake_case` names and `Literal` vocabularies for every closed set. Four keys the wire spells in camelCase are mapped: `next_cursor`, `has_more`, `by_status` and `task_matrix`. A refused request raises `EvolveAPIError`; see [errors](/sdk-reference/errors).
40
+
41
+ ## Wait for it
42
+
43
+ `watch()` returns a handle you either await, for the final job, or iterate, for each event. Pick one form per call.
44
+
45
+ ```python
46
+ final = await evals.watch(job.id)
47
+ print(final.status, final.trials.by_status, final.stats.get("cost_usd"))
48
+ ```
49
+
50
+ ```python
51
+ async for event in evals.watch(job.id):
52
+ if event.type == "trial.settled":
53
+ print(event.data["task_name"], event.data["status"], event.data.get("reward"))
54
+ ```
55
+
56
+ The stream replays from the beginning, so attaching late loses nothing, and it resumes on its own after a disconnect. `event.data` is a plain dict; branch on `event.type` and read it by key.
57
+
58
+ ## Read the result
59
+
60
+ ```python
61
+ detail = await evals.get(job.id)
62
+
63
+ async for trial in evals.trials(job.id):
64
+ print(trial.task_name, trial.agent_info.name, trial.status, trial.reward)
65
+
66
+ failures = await evals.trials(
67
+ job.id,
68
+ status=["INFRASTRUCTURE_ERROR", "SCORING_ERROR"],
69
+ )
70
+ ```
71
+
72
+ Every list on this surface works the same way: await it for one page, iterate it to walk every page. `pass_at_k(job)` reads a finished job's pass@k out of its stats as sorted numbers.
73
+
74
+ A trial id is global, so `trials()` reaches one without the job.
75
+
76
+ ```python
77
+ t = trials()
78
+
79
+ trial = await t.get(trial_id)
80
+ print(trial.reward, trial.exception_info and trial.exception_info.exception_type)
81
+
82
+ verifier_log = await t.artifact(trial_id, "verifier") # str | None
83
+ home = await t.artifact(trial_id, "agent-home") # dict[str, str] | None
84
+
85
+ async for event in t.trace_events(trial_id):
86
+ print(event.seq, event.type)
87
+ ```
88
+
89
+ `artifact()` takes the same names as `evolve trial download --stream`. None means the trial never stored that artifact; it is a normal answer, not an error.
90
+
91
+ ## Download
92
+
93
+ ```python
94
+ path = await evals.download(
95
+ job.id,
96
+ to="./results",
97
+ ) # the saved file's path
98
+ data = await evals.download(job.id) # bytes
99
+ ```
100
+
101
+ The archive is the standard job directory, the same tree `evolve job download` unpacks.
102
+
103
+ ## Analyze
104
+
105
+ ```python
106
+ await evals.analyze(
107
+ job.id,
108
+ failing=True,
109
+ n_trials=20,
110
+ )
111
+ analyzed = await evals.watch_analysis(job.id)
112
+ ```
113
+
114
+ `analyze()` enqueues one analysis per trial and returns at once. `watch_analysis()` follows the batch of analyses to its end.
115
+
116
+ ## The catalog
117
+
118
+ ```python
119
+ catalog = datasets()
120
+
121
+ async for dataset in catalog.list():
122
+ print(dataset.name, dataset.active_version and dataset.active_version.version)
123
+
124
+ version = await catalog.get("terminal-bench-4@4.0")
125
+ ```
126
+
127
+ ## Everything else
128
+
129
+ `analyses()`, `checks()`, `skills()`, `agents()`, `auth()` and `orgs()` are built the same way. `meta()` fetches the platform's capability document, the live list of harnesses, models and limits, and needs no key. `hosted()` builds every client from one configuration.
130
+
131
+ ```python
132
+ from evolve import hosted
133
+
134
+ evolve = hosted()
135
+ doc = await evolve.meta()
136
+ job = await evolve.jobs.start(...)
137
+ ```
138
+
139
+ Run any of the snippets above inside an `async def main()` and start it with `asyncio.run(main())`.
@@ -0,0 +1,141 @@
1
+ ---
2
+ title: "TypeScript SDK"
3
+ description: "Start a job, wait for it, read the result, and download it from TypeScript."
4
+ ---
5
+
6
+ ```bash
7
+ npm install @evolvingmachines/evolve
8
+ ```
9
+
10
+ The hosted surface is a set of clients, one per noun. Each one reads `EVOLVE_API_KEY` from the environment, or takes `{ apiKey, baseUrl }`. Create a key on the dashboard's [API keys page](https://dashboard.evolvingmachines.ai/api-keys).
11
+
12
+ ```ts
13
+ import { jobs, trials, datasets } from "@evolvingmachines/evolve";
14
+
15
+ const evals = jobs();
16
+ ```
17
+
18
+ ## Start a job
19
+
20
+ ```ts
21
+ const job = await evals.start({
22
+ datasets: [{ name: "terminal-bench-4", version: "4.0", n_tasks: 5 }],
23
+ agents: [{ name: "codex", model_name: "gpt-5.5" }],
24
+ n_attempts: 1,
25
+ n_concurrent_trials: 4,
26
+ max_trial_spend_usd: 25,
27
+ });
28
+
29
+ console.log(job.id, job.status); // "QUEUED"
30
+ ```
31
+
32
+ `datasets` is a list of selectors. A bare `name` resolves to the active version; `task_names`, `exclude_task_names` and `n_tasks` narrow the task set.
33
+
34
+ Every arm in `agents` names a `model_name`, and `version`, `reasoning_effort`, `kwargs`, `preset` and `skills` are optional. `sandbox_provider` picks `"e2b"`, `"daytona"` or `"modal"`. The fields are the same ones a `-c` config file takes on the CLI.
35
+
36
+ ## Wait for it
37
+
38
+ `watch()` returns a handle you either await, for the final job, or iterate, for each event. Pick one form per call.
39
+
40
+ ```ts
41
+ const final = await evals.watch(job.id);
42
+ console.log(final.status, final.trials.byStatus, final.stats.cost_usd);
43
+ ```
44
+
45
+ ```ts
46
+ for await (const event of evals.watch(job.id)) {
47
+ if (event.type === "trial.settled") {
48
+ console.log(event.data.task_name, event.data.status, event.data.reward);
49
+ }
50
+ }
51
+ ```
52
+
53
+ The stream replays from the beginning, so attaching late loses nothing, and it resumes on its own after a disconnect. `event.type` narrows `event.data`, so the fields above are typed.
54
+
55
+ ## Read the result
56
+
57
+ ```ts
58
+ const detail = await evals.get(job.id);
59
+
60
+ for await (const trial of evals.trials(job.id)) {
61
+ console.log(trial.task_name, trial.agent_info.name, trial.status, trial.reward);
62
+ }
63
+
64
+ const failures = await evals.trials(job.id, {
65
+ status: ["INFRASTRUCTURE_ERROR", "SCORING_ERROR"],
66
+ });
67
+ ```
68
+
69
+ Every list on this surface works the same way: await it for one page, iterate it to walk every page. `passAtK(job)` reads a finished job's pass@k out of its stats as sorted numbers. A refused request throws `EvolveApiError`; see [errors](/sdk-reference/errors).
70
+
71
+ A trial id is global, so `trials()` reaches one without the job.
72
+
73
+ ```ts
74
+ const t = trials();
75
+
76
+ const trial = await t.get(trialId);
77
+ console.log(trial.reward, trial.exception_info?.exception_type);
78
+
79
+ const verifierLog = await t.artifact(trialId, "verifier"); // string | null
80
+ const home = await t.artifact(
81
+ trialId,
82
+ "agent-home",
83
+ ); // Record<string, string> | null
84
+
85
+ for await (const event of t.traceEvents(trialId)) {
86
+ console.log(event.seq, event.type);
87
+ }
88
+ ```
89
+
90
+ `artifact()` takes the same names as `evolve trial download --stream`. Null means the trial never stored that artifact; it is a normal answer, not an error.
91
+
92
+ ## Download
93
+
94
+ ```ts
95
+ const path = await evals.download(
96
+ job.id,
97
+ { to: "./results" },
98
+ ); // the saved file's path
99
+ const bytes = await evals.download(job.id); // a Buffer
100
+ ```
101
+
102
+ The archive is the standard job directory, the same tree `evolve job download` unpacks.
103
+
104
+ ## Analyze
105
+
106
+ ```ts
107
+ await evals.analyze(
108
+ job.id,
109
+ {
110
+ failing: true,
111
+ n_trials: 20,
112
+ },
113
+ );
114
+ const analyzed = await evals.watchAnalysis(job.id);
115
+ ```
116
+
117
+ `analyze()` enqueues one analysis per trial and returns at once. `watchAnalysis()` follows the batch of analyses to its end.
118
+
119
+ ## The catalog
120
+
121
+ ```ts
122
+ const catalog = datasets();
123
+
124
+ for await (const dataset of catalog.list()) {
125
+ console.log(dataset.name, dataset.active_version?.version);
126
+ }
127
+
128
+ const version = await catalog.get("terminal-bench-4@4.0");
129
+ ```
130
+
131
+ ## Everything else
132
+
133
+ `analyses()`, `checks()`, `skills()`, `agents()`, `auth()` and `orgs()` are built the same way. `meta()` fetches the platform's capability document, the live list of harnesses, models and limits, and needs no key. `hosted()` builds every client from one configuration.
134
+
135
+ ```ts
136
+ import { hosted } from "@evolvingmachines/evolve";
137
+
138
+ const evolve = hosted({ apiKey: process.env.EVOLVE_API_KEY });
139
+ const doc = await evolve.meta();
140
+ const job = await evolve.jobs.start({ /* … */ });
141
+ ```