@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,511 @@
1
+ # Evolve Python SDK
2
+
3
+ Run CLI agents ([Claude Code](https://github.com/anthropics/claude-code), [Codex](https://github.com/openai/codex), [Gemini CLI](https://github.com/google-gemini/gemini-cli), [Qwen Code](https://github.com/QwenLM/qwen-code), [Kimi Code](https://github.com/MoonshotAI/kimi-code), [OpenCode](https://github.com/anomalyco/opencode), [Droid](https://docs.factory.ai/cli/droid-exec/overview)) in secure sandboxes with built-in observability.
4
+
5
+ ---
6
+
7
+ ## Installation
8
+
9
+ **Requirements:** [Python 3.10+](https://python.org/) and [Node.js 18+](https://nodejs.org/) (the SDK uses a lightweight Node.js bridge).
10
+
11
+ ```bash
12
+ pip install evolvingmachines-evolve
13
+ ```
14
+
15
+ Storage & checkpointing is available in [gateway mode](./03-runtime.md#storage--checkpointing) (`EVOLVE_API_KEY`) — no additional dependencies needed.
16
+
17
+ ---
18
+
19
+ ## Quick Start
20
+
21
+ **1. Get your API key** from [dashboard.evolvingmachines.ai](https://dashboard.evolvingmachines.ai) — $10 free credits, no CC required.
22
+
23
+ **2. Set environment variables:**
24
+
25
+ ```bash
26
+ # .env
27
+ EVOLVE_API_KEY=sk-... # Evolve gateway key (dashboard.evolvingmachines.ai)
28
+ ```
29
+
30
+ **3. Run your first agent:**
31
+
32
+ Evolve auto-resolves API keys and sandbox providers from environment variables — no need to pass them explicitly.
33
+
34
+ ```python
35
+ from evolve import Evolve, IntegrationsSetup
36
+
37
+ evolve = Evolve(
38
+ system_prompt='You are Manus Evolve, a powerful AI agent. You can execute code, browse the web, manage files, and solve complex tasks.',
39
+ browser={'provider': 'agent-browser', 'remote': True}, # optional: remote managed browser automation in Gateway mode
40
+ skills=['anthropics/skills', './my-skill'], # skills.sh / git / local references
41
+ integrations=IntegrationsSetup(user_id='root', apps=['gmail', 'notion']), # optional; managed integrations in Gateway mode
42
+ )
43
+
44
+ result = await evolve.run(
45
+ prompt='Go to Hacker News top posts. Spawn 5 parallel sub-agents to screenshot each of the top 5 posts.'
46
+ )
47
+
48
+ print(result.stdout)
49
+
50
+ output = await evolve.get_output_files()
51
+ for name, content in output.files.items():
52
+ print(name)
53
+
54
+ # Once done, destroy sandbox
55
+ await evolve.kill()
56
+ ```
57
+
58
+ ### Core Lifecycle
59
+
60
+ Every Evolve application follows this pattern:
61
+
62
+ ```
63
+ Evolve() → run() → get_output_files() → kill()
64
+ setup execute retrieve results ALWAYS cleanup
65
+ ```
66
+
67
+ > **IMPORTANT: Always call `kill()` when done.** Each `run()` creates a cloud sandbox that bills until destroyed. Forgetting `kill()` leaves sandboxes running indefinitely. Use try/finally to guarantee cleanup:
68
+
69
+ ```python
70
+ evolve = Evolve(config=AgentConfig(type='claude'))
71
+ try:
72
+ await evolve.run(prompt='Analyze the dataset')
73
+ output = await evolve.get_output_files()
74
+ print(output.files) # All files from output/
75
+ print(output.data) # Parsed result.json (if schema set)
76
+ finally:
77
+ await evolve.kill() # Always destroy sandbox
78
+ ```
79
+
80
+ - `run()` can be called multiple times — each continues in the same sandbox session with full context/history.
81
+ - `get_output_files()` returns files from the `output/` folder. If `schema=` was set, `output.data` contains the validated result.
82
+ - `kill()` destroys the sandbox. The next `run()` creates a fresh one.
83
+
84
+ ### Streaming
85
+
86
+ Subscribe to real-time agent output:
87
+
88
+ ```python
89
+ evolve.on('content', lambda event: print(event['update']))
90
+ evolve.on('lifecycle', lambda event: print(event['reason'], event['sandbox'], event['agent']))
91
+ ```
92
+
93
+ See [Streaming Events](./04-streaming.md) for all event types, type definitions, and a full UI integration example.
94
+
95
+ ### Gateway Features
96
+
97
+ When using `EVOLVE_API_KEY`:
98
+
99
+ - **Tracing:** Automatic tracing and agent analytics at [dashboard.evolvingmachines.ai](https://dashboard.evolvingmachines.ai) for observability and replay — no extra setup needed. Use `session_tag_prefix` to label sessions for easy filtering.
100
+ - **Browser Automation:** Use `browser={'provider': 'agent-browser', 'remote': True}` for the default and recommended managed browser path with dashboard live view and replay.
101
+ - **Checkpointing:** Snapshot sandbox state to Evolve-managed storage with `storage=StorageConfig()` — no S3 credentials needed. See [Storage & Checkpointing](./03-runtime.md#storage--checkpointing).
102
+ - **Hosted Evals:** Score agents against datasets of tasks on managed infrastructure with `jobs()` and `datasets()`, or the `evolve` CLI. See https://docs.evolvingmachines.ai.
103
+
104
+ ---
105
+
106
+ ## Authentication
107
+
108
+ | | Gateway Mode | Managed BYO Provider Keys | Direct Provider Key Mode |
109
+ |---|---------|---------------------------|--------------------------|
110
+ | Setup | `EVOLVE_API_KEY` | `EVOLVE_API_KEY` + provider key saved in Dashboard → Secrets → BYO Provider Keys | Model provider keys + [`E2B_API_KEY`](https://e2b.dev) |
111
+ | Provider key location | Evolve-managed | Encrypted Dashboard secret | Your local environment or app config |
112
+ | Sandbox receives | Evolve gateway runtime config | A short-lived, sandbox-scoped credential — never your raw provider key or `EVOLVE_API_KEY` for that route | Raw provider key environment variable |
113
+ | Observability | [dashboard.evolvingmachines.ai](https://dashboard.evolvingmachines.ai) | [dashboard.evolvingmachines.ai](https://dashboard.evolvingmachines.ai) | `~/.evolve-sdk/observability/` |
114
+ | Browser | `browser={'provider': 'agent-browser', 'remote': True}` is the default and recommended managed browser path with live view and replay. | Same as Gateway Mode | Self-managed browser runtime; no managed live/replay |
115
+ | Model billing | Evolving Machines | Your provider account for enabled providers | Your provider accounts |
116
+
117
+ ---
118
+
119
+ ### Gateway Mode (EVOLVE_API_KEY)
120
+
121
+ Get API key from [dashboard.evolvingmachines.ai](https://dashboard.evolvingmachines.ai).
122
+
123
+ ```bash
124
+ # .env
125
+ EVOLVE_API_KEY=sk-...
126
+ ```
127
+
128
+ ```python
129
+ from evolve import Evolve, AgentConfig
130
+
131
+ evolve = Evolve(
132
+ config=AgentConfig(type='claude'),
133
+ )
134
+
135
+ await evolve.run(prompt='Hello')
136
+ ```
137
+
138
+ ---
139
+
140
+ ### Managed BYO Provider Keys
141
+
142
+ Use this when you want supported provider usage billed to your provider account while keeping gateway features.
143
+
144
+ 1. Save your provider key in Dashboard → Secrets → BYO Provider Keys.
145
+ 2. Keep `EVOLVE_API_KEY` in your app.
146
+ 3. Run any supported agent normally.
147
+
148
+ **You can save a key for Anthropic and OpenAI.** Those are the two providers this route serves today, so a Claude run or a Codex run can bill your own account. The gateway itself reaches seven providers — Anthropic, OpenAI, Gemini, DashScope, Kimi, OpenRouter, and Droid/Factory — but the other five have no bring-your-own path, and a run that routes through one of them is billed to Evolve whether or not you have a key saved. That is not a silent fallback so much as arithmetic: an Anthropic key cannot pay for a Moonshot call.
149
+
150
+ When enabled, Evolve routes supported provider calls through a short-lived, sandbox-scoped credential. The SDK does not receive the raw provider key, and the sandbox does not receive `EVOLVE_API_KEY` for that provider route. If no managed key is enabled for that provider, gateway mode falls back to Evolve-managed model routing.
151
+
152
+ ---
153
+
154
+ ### Direct Provider Key Mode (Local BYOK)
155
+
156
+ Use this when you want to pass provider keys from your own local environment or app config. Requires [`E2B_API_KEY`](https://e2b.dev) for sandbox.
157
+
158
+ ```bash
159
+ # .env
160
+ ANTHROPIC_API_KEY=sk-...
161
+ E2B_API_KEY=e2b_...
162
+ ```
163
+
164
+ ```python
165
+ import os
166
+ from evolve import Evolve, AgentConfig, E2BProvider
167
+
168
+ sandbox = E2BProvider(
169
+ api_key=os.getenv('E2B_API_KEY'),
170
+ )
171
+
172
+ evolve = Evolve(
173
+ config=AgentConfig(
174
+ type='claude',
175
+ provider_api_key=os.getenv('ANTHROPIC_API_KEY'),
176
+ ),
177
+ sandbox=sandbox,
178
+ )
179
+ ```
180
+
181
+ ---
182
+
183
+ ### BYO Claude Max Subscription
184
+
185
+ ```bash
186
+ # Run in terminal, follow login steps → receive token:
187
+ claude --setup-token
188
+
189
+ # ✓ Long-lived authentication token created successfully!
190
+ # Your OAuth token (valid for 1 year): sk-ant-...
191
+ ```
192
+
193
+ ```bash
194
+ # .env
195
+ CLAUDE_CODE_OAUTH_TOKEN=sk-ant-...
196
+ E2B_API_KEY=e2b_...
197
+ ```
198
+
199
+ ```python
200
+ import os
201
+ from evolve import Evolve, AgentConfig, E2BProvider
202
+
203
+ sandbox = E2BProvider(
204
+ api_key=os.getenv('E2B_API_KEY'),
205
+ )
206
+
207
+ evolve = Evolve(
208
+ config=AgentConfig(
209
+ type='claude',
210
+ # SDK reads token from CLAUDE_CODE_OAUTH_TOKEN automatically
211
+ ),
212
+ sandbox=sandbox,
213
+ )
214
+ ```
215
+
216
+ ### BYO Codex Subscription
217
+
218
+ ```bash
219
+ # Run in terminal, follow login steps:
220
+ codex auth --provider openai
221
+
222
+ # Creates auth file at ~/.codex/auth.json
223
+ ```
224
+
225
+ ```bash
226
+ # .env
227
+ CODEX_OAUTH_FILE_PATH=~/.codex/auth.json
228
+ E2B_API_KEY=e2b_...
229
+ ```
230
+
231
+ ```python
232
+ import os
233
+ from evolve import Evolve, AgentConfig, E2BProvider
234
+
235
+ sandbox = E2BProvider(
236
+ api_key=os.getenv('E2B_API_KEY'),
237
+ )
238
+
239
+ evolve = Evolve(
240
+ config=AgentConfig(
241
+ type='codex',
242
+ # SDK reads auth file from CODEX_OAUTH_FILE_PATH automatically
243
+ ),
244
+ sandbox=sandbox,
245
+ )
246
+ ```
247
+
248
+ ### BYO Gemini Subscription
249
+
250
+ ```bash
251
+ # Run in terminal, follow login steps:
252
+ gemini auth login
253
+
254
+ # Creates credentials file at ~/.gemini/oauth_creds.json
255
+ ```
256
+
257
+ ```bash
258
+ # .env
259
+ GEMINI_OAUTH_FILE_PATH=~/.gemini/oauth_creds.json
260
+ E2B_API_KEY=e2b_...
261
+ ```
262
+
263
+ ```python
264
+ import os
265
+ from evolve import Evolve, AgentConfig, E2BProvider
266
+
267
+ sandbox = E2BProvider(
268
+ api_key=os.getenv('E2B_API_KEY'),
269
+ )
270
+
271
+ evolve = Evolve(
272
+ config=AgentConfig(
273
+ type='gemini',
274
+ # SDK reads credentials file from GEMINI_OAUTH_FILE_PATH automatically
275
+ ),
276
+ sandbox=sandbox,
277
+ )
278
+ ```
279
+
280
+ ---
281
+
282
+ ### Auto-resolve from Environment
283
+
284
+ Set env vars and the SDK picks them up automatically — no need to pass explicitly.
285
+
286
+ ### Agent Reference
287
+
288
+ > **IMPORTANT: Only use the exact model names listed below.** The SDK will error on unrecognized model names. Do not invent or guess model identifiers.
289
+
290
+ The Direct key column applies to Direct Provider Key Mode. Managed BYO Provider Keys use Gateway Mode plus Dashboard-stored provider keys.
291
+
292
+ | type | models | default | Gateway | Direct key |
293
+ |------|--------|---------|---------|------|
294
+ | `'claude'` | `'fable'` `'opus'` `'sonnet'` `'haiku'` `'opus[1m]'` `'sonnet[1m]'` `'glm-5.3'` `'glm-5.3-flash'` `'openrouter/deepseek/deepseek-v4.1-flash'` `'fireworks/deepseek-v4.1-flash'` | `'opus'` | `EVOLVE_API_KEY` | `ANTHROPIC_API_KEY` or `CLAUDE_CODE_OAUTH_TOKEN` |
295
+ | `'codex'` | `'gpt-5.6-sol'` `'gpt-5.6-terra'` `'gpt-5.6-luna'` `'gpt-5.5'` `'gpt-5.3-codex'` | `'gpt-5.6-sol'` | `EVOLVE_API_KEY` | `OPENAI_API_KEY` or `CODEX_OAUTH_FILE_PATH` |
296
+ | `'gemini'` | `'gemini-3.5-flash'` `'gemini-3.5-flash-lite'` `'gemini-3.1-pro-preview'` `'gemini-3.7-flash'` *(not selectable yet — see below)* | `'gemini-3.5-flash'` | `EVOLVE_API_KEY` | `GEMINI_API_KEY` or `GEMINI_OAUTH_FILE_PATH` |
297
+ | `'qwen'` | `'qwen3.7-max'` `'qwen3.7-plus'` `'qwen3.6-flash'` | `'qwen3.7-max'` | `EVOLVE_API_KEY` | `OPENAI_API_KEY` |
298
+ | `'kimi'` | `'kimi-k3'` `'kimi-k2.7-code'` `'kimi-k3-raptor'` `'kimi-k2p7-code-raptor'` | `'kimi-k3'` | `EVOLVE_API_KEY` | `KIMI_API_KEY` |
299
+ | `'opencode'` | `'openrouter/anthropic/claude-fable-5.1'` `'openrouter/anthropic/claude-opus-5'` `'openrouter/anthropic/claude-sonnet-5'` `'openrouter/anthropic/claude-haiku-4.5'` `'openrouter/openai/gpt-5.6-sol'` `'openrouter/openai/gpt-5.6-terra'` `'openrouter/openai/gpt-5.6-luna'` `'openrouter/google/gemini-3.6-flash'` `'openrouter/qwen/qwen3.7-max'` `'openrouter/moonshotai/kimi-k3'` `'openrouter/z-ai/glm-5.3'` `'openrouter/z-ai/glm-5.3-flash'` `'openrouter/deepseek/deepseek-v4.1-flash'` `'fireworks/deepseek-v4.1-flash'` | `'openrouter/anthropic/claude-opus-5'` | `EVOLVE_API_KEY` | `OPENROUTER_API_KEY` |
300
+ | `'droid'` | `'claude-fable-5.1'` `'claude-opus-5'` `'claude-sonnet-5'` `'claude-haiku-4-5'` `'gpt-5.6-sol'` `'gpt-5.6-terra'` `'gpt-5.6-luna'` `'gemini-3.6-flash'` `'qwen3.7-max'` `'kimi-k3'` `'glm-5.3'` `'glm-5.3-flash'` `'openrouter/deepseek/deepseek-v4.1-flash'` `'fireworks/deepseek-v4.1-flash'` | `'claude-opus-5'` | `EVOLVE_API_KEY` | `FACTORY_API_KEY` |
301
+
302
+ `'gemini-3.7-flash'` is named here for completeness: the gateway carries it as a correctly priced entry and serves it under its own name on a raw call. It is not selectable through the `gemini` agent, and nothing rejects it if you pass it anyway — the stable `gemini` CLI (0.55.1) rewrites the model client-side before the request ever leaves the sandbox, collapsing every name ending in `flash` onto its own current flash model. Ask for `'gemini-3.7-flash'` (or `'gemini-3.6-flash'`) today and you are silently served, and billed for, `gemini-3.5-flash`. Names that do not end in `flash` skip that rewrite, which is why `'gemini-3.5-flash-lite'` and `'gemini-3.1-pro-preview'` serve under their own names. A newer CLI release is not enough on its own, because the swap follows the CLI's own default flash, so a `-flash` name joins the selectable set only once a live probe shows the CLI actually serving it. On the hosted platform the wrong-model integrity guard refuses such a trial rather than scoring it; with your own provider key there is no backstop, so treat the three names above as the gemini lineup you can really run.
303
+
304
+ Model names route by themselves: pass just the name from the table and Evolve serves it on its default provider, or pass a provider-prefixed name (`openai/gpt-5.5`, `openrouter/moonshotai/kimi-k3`) to pick the provider explicitly. The table's names are the supported, priced set — prefixed routing beyond it works for advanced use but is outside the supported lineup. One agent differs: on 'opencode' a prefixed name outside its table is sent as an OpenRouter id (`openrouter/<name>`), so pick a provider there through OpenRouter's own ids; the other agents pass a prefixed name through as written.
305
+
306
+ `'glm-5.3-flash'` is GLM-5.3 Flash served from one pinned Fireworks host through the gateway: $0.15/M input and $0.50/M output ($0.03/M cached input); `'glm-5.3'` is the full model on OpenRouter.
307
+
308
+ `'openrouter/deepseek/deepseek-v4.1-flash'` is DeepSeek V4.1 Flash served through OpenRouter, under the same spelling on `'claude'`, `'droid'` and `'opencode'`. The `openrouter/<vendor>/<model>` form is OpenRouter's own model id: the gateway routes any id in that form to OpenRouter and bills the call at OpenRouter's price for it, so other OpenRouter models work the same way — the table lists the supported ones. It is also the default model of the hosted evals analyzer (its default reasoning effort is `'high'`).
309
+
310
+ `'fireworks/deepseek-v4.1-flash'` is the same DeepSeek V4.1 Flash on a second route, served from Fireworks through the gateway, on the same three agents: $0.22/M input and $0.66/M output ($0.007/M cached input). Pick it when you want the Fireworks host; `'openrouter/deepseek/deepseek-v4.1-flash'` remains the default model of the hosted evals analyzer and task checker. It is served through the Evolve gateway; direct mode has no Fireworks key, so `'opencode'` with your own `OPENROUTER_API_KEY` refuses the name at configuration with an error naming the model, instead of sending it.
311
+
312
+ Agent-specific option: `reasoning_effort` controls how much reasoning/thinking the selected agent uses when that agent supports it.
313
+
314
+ | Agent | Default when omitted (pinned by Evolve) | Supported `reasoning_effort` |
315
+ |-------|------------------------------------------|------------------------------|
316
+ | `'claude'` | `'high'` — Claude Code's documented default | `'low'` `'medium'` `'high'` `'xhigh'` `'max'` |
317
+ | `'codex'` | `'high'` — pinned by Evolve (owner policy: graded harnesses run high) | `'none'` `'low'` `'medium'` `'high'` `'xhigh'` `'max'` (`'none'` and `'max'` are GPT-5.6 values) |
318
+ | `'gemini'` | No effort control | Not supported |
319
+ | `'qwen'` | `'thinking'` | `'thinking'` `'no-thinking'` |
320
+ | `'kimi'` | `'thinking'` at `'max'` effort — the Kimi K3 API default | `'thinking'` `'no-thinking'` `'low'` `'medium'` `'high'` `'xhigh'` `'max'` |
321
+ | `'opencode'` | `'thinking'` + `'high'` | `'thinking'` `'no-thinking'` `'minimal'` `'low'` `'medium'` `'high'` `'xhigh'` `'max'` |
322
+ | `'droid'` | `'high'` — matches Droid’s own default for Opus 5, pinned by Evolve | `'off'` `'minimal'` `'low'` `'medium'` `'high'` `'xhigh'` `'max'`; exact values depend on the Droid model |
323
+
324
+ When you omit `reasoning_effort`, Evolve does not leave the choice to the CLI. For every harness with an effort control, the SDK stamps the pinned default from the table explicitly on the run — as a flag, an environment variable, or a config-file entry, whatever that CLI reads. This keeps runs reproducible: the effort a run used is always recorded in the run itself, never implied by a vendor default that could change under you. Where the vendor documents a default, the pin matches it; `gemini` has no effort control, so nothing is stamped there.
325
+
326
+ Note that thinking cannot be disabled on Kimi K3 at the API level — `'no-thinking'` applies to the K2-generation models.
327
+
328
+ Agent-specific option: `config` supplies the harness's own native settings — a local file path or an inline dict. Claude receives it as a settings JSON passed through `--settings`; Codex receives it as the base `~/.codex/config.toml` (an inline dict must be losslessly representable as TOML — no `None` values). Your document is the base layer: Evolve's own inputs — gateway routing, MCP servers, the model and effort stamps — always land on top of it, so a config can tune permissions, sandbox settings, or tool behavior but never re-route where the model traffic goes. Only `claude` and `codex` support a native config; naming one on any other agent type raises rather than being silently ignored.
329
+
330
+ ```python
331
+ evolve = Evolve().with_agent(AgentConfig(
332
+ type='claude',
333
+ config={'permissions': {'deny': ['WebSearch', 'WebFetch']}},
334
+ ))
335
+ ```
336
+
337
+ Instead of hand-writing such a config, `preset` names a bundle Evolve ships and guarantees. `preset='no-internet'` turns off the vendor's server-side web tools — Claude gets that exact `permissions.deny` stamp, Codex gets `-c web_search=disabled` on its command line (Codex's default is `'cached'`, an OpenAI-maintained web index, so only the explicit flag removes the tool). `preset='pinned-context'` pins one fixed effective context window (200000 tokens) — Claude via `autoCompactWindow`, Codex via `-c model_context_window` — so vendor-side window tuning never changes what a run had to work with. A preset is stamped **on top** of any `config` you also pass, and a preset stamp always wins where the two disagree: your document cannot undo the guarantee. Only `claude` and `codex` can guarantee the presets today; naming one on any other agent type raises rather than running without its guarantee.
338
+
339
+ ```python
340
+ evolve = Evolve().with_agent(AgentConfig(type='codex', preset='no-internet'))
341
+ ```
342
+
343
+ For Claude Fable 5.1, use `model='fable'`. For OpenCode via OpenRouter, use `model='openrouter/anthropic/claude-fable-5.1'`. For Claude 1M context window, use `model='sonnet[1m]'` or `model='opus[1m]'`.
344
+
345
+ #### Harness and Model Pairing
346
+
347
+ A harness and its model are chosen together, and a few harnesses only accept models from their own family:
348
+
349
+ - **`qwen`** must run a Qwen-native model (the `qwen3.x` aliases, routed via DashScope). Qwen Code injects the DashScope-only `enable_thinking` request parameter on every call, which OpenAI-family models reject with a `400` — so pointing the `qwen` harness at a non-Qwen model fails.
350
+ - **`opencode`** routes every model through OpenRouter, so its models are the `openrouter/…` ids in the table above (a bare id is prefixed with `openrouter/` for you).
351
+ - **`kimi`** must be told a context ceiling, which Kimi Code sends as the request's `max_tokens`. Its own models get Kimi's 262144; any other model (say `gpt-5.5` behind an OpenAI-compatible gateway) gets a conservative 128000 instead, because an oversized `max_tokens` is rejected outright — LiteLLM answers `400 max_tokens is too large`. Pass the model's real ceiling to skip the guess:
352
+
353
+ ```python
354
+ AgentConfig(
355
+ type='kimi',
356
+ model='gpt-5.5',
357
+ max_context_size=128000, # (optional) the model's real completion ceiling, used verbatim
358
+ )
359
+ ```
360
+
361
+ `max_context_size` is an SDK option, never an environment variable. Harnesses that do not send a ceiling ignore it.
362
+
363
+ Two harness quirks the SDK handles automatically, with nothing for you to set: the `claude` harness runs with `IS_SANDBOX=1` so Claude Code's `--dangerously-skip-permissions` is allowed under root, and the `gemini` harness boots with workspace trust set so Gemini CLI runs headless instead of refusing an untrusted workspace.
364
+
365
+ #### Evolve-Provided Gateway Models
366
+
367
+ These models require Gateway mode (`EVOLVE_API_KEY`) and are routed by Evolve for latency-sensitive runs. Direct provider keys do not apply.
368
+
369
+ | Agent | Model | Use |
370
+ |-------|-------|-----|
371
+ | `'kimi'` | `'kimi-k3-raptor'` | Kimi K3 fast route for latency-sensitive agent runs |
372
+ | `'kimi'` | `'kimi-k2p7-code-raptor'` | Kimi K2.7 Code Raptor route for interactive coding and agent runs |
373
+
374
+ ### Agent Examples
375
+
376
+ ```bash
377
+ # .env - set env vars for auto-pickup
378
+ ANTHROPIC_API_KEY=sk-... # claude
379
+ OPENAI_API_KEY=sk-... # codex, qwen
380
+ GEMINI_API_KEY=... # gemini
381
+ KIMI_API_KEY=... # kimi
382
+ OPENROUTER_API_KEY=sk-... # opencode
383
+ FACTORY_API_KEY=... # droid
384
+ E2B_API_KEY=e2b_... # sandbox
385
+ ```
386
+
387
+ ```python
388
+ # claude (auto-picks ANTHROPIC_API_KEY + E2B_API_KEY)
389
+ evolve = Evolve(
390
+ config=AgentConfig(type='claude'),
391
+ )
392
+
393
+ evolve = Evolve(
394
+ config=AgentConfig(type='claude', model='opus'),
395
+ )
396
+
397
+ evolve = Evolve(
398
+ config=AgentConfig(type='claude', model='fable'),
399
+ )
400
+
401
+ evolve = Evolve(
402
+ config=AgentConfig(type='claude', reasoning_effort='max'),
403
+ )
404
+
405
+ evolve = Evolve(
406
+ config=AgentConfig(
407
+ type='claude',
408
+ model='sonnet[1m]', # 1M context window
409
+ ),
410
+ )
411
+ ```
412
+
413
+ ```python
414
+ # codex (auto-picks OPENAI_API_KEY + E2B_API_KEY)
415
+ evolve = Evolve(
416
+ config=AgentConfig(type='codex'),
417
+ )
418
+
419
+ evolve = Evolve(
420
+ config=AgentConfig(type='codex', model='gpt-5.3-codex'),
421
+ )
422
+
423
+ evolve = Evolve(
424
+ config=AgentConfig(type='codex', reasoning_effort='high'),
425
+ )
426
+ ```
427
+
428
+ ```python
429
+ # gemini (auto-picks GEMINI_API_KEY + E2B_API_KEY)
430
+ evolve = Evolve(
431
+ config=AgentConfig(type='gemini'),
432
+ )
433
+
434
+ evolve = Evolve(
435
+ config=AgentConfig(type='gemini', model='gemini-3.1-pro-preview'),
436
+ )
437
+ ```
438
+
439
+ ```python
440
+ # qwen (auto-picks OPENAI_API_KEY + E2B_API_KEY)
441
+ evolve = Evolve(
442
+ config=AgentConfig(type='qwen'),
443
+ )
444
+
445
+ evolve = Evolve(
446
+ config=AgentConfig(type='qwen', model='qwen3.7-max'),
447
+ )
448
+
449
+ evolve = Evolve(
450
+ config=AgentConfig(type='qwen', reasoning_effort='no-thinking'),
451
+ )
452
+ ```
453
+
454
+ ```python
455
+ # kimi (auto-picks KIMI_API_KEY + E2B_API_KEY)
456
+ evolve = Evolve(
457
+ config=AgentConfig(type='kimi'),
458
+ )
459
+
460
+ evolve = Evolve(
461
+ config=AgentConfig(type='kimi', model='kimi-k3'),
462
+ )
463
+
464
+ evolve = Evolve(
465
+ config=AgentConfig(
466
+ type='kimi',
467
+ model='kimi-k2p7-code-raptor',
468
+ reasoning_effort='thinking',
469
+ ),
470
+ )
471
+ ```
472
+
473
+ ```python
474
+ # opencode — OpenRouter (auto-picks OPENROUTER_API_KEY + E2B_API_KEY)
475
+ evolve = Evolve(
476
+ config=AgentConfig(type='opencode'),
477
+ )
478
+
479
+ evolve = Evolve(
480
+ config=AgentConfig(type='opencode', model='openrouter/openai/gpt-5.6-sol'),
481
+ )
482
+
483
+ evolve = Evolve(
484
+ config=AgentConfig(type='opencode', model='openrouter/anthropic/claude-fable-5.1'),
485
+ )
486
+
487
+ evolve = Evolve(
488
+ config=AgentConfig(type='opencode', reasoning_effort='xhigh'),
489
+ )
490
+ ```
491
+
492
+ ```python
493
+ # droid (auto-picks FACTORY_API_KEY + E2B_API_KEY)
494
+ evolve = Evolve(
495
+ config=AgentConfig(type='droid'),
496
+ )
497
+
498
+ evolve = Evolve(
499
+ config=AgentConfig(type='droid', model='gpt-5.5'),
500
+ )
501
+ ```
502
+
503
+ ---
504
+
505
+ ## Where to go next
506
+
507
+ - [Configuration](./02-configuration.md) shapes the sandbox: which provider, which image, which skills, secrets and integrations.
508
+ - [Runtime](./03-runtime.md) covers everything after `run()` — files in and out, sessions, checkpointing, cost.
509
+ - [Streaming](./04-streaming.md) is the event surface a UI subscribes to.
510
+ - [Swarm & Pipeline](./05-swarm-pipeline.md) runs many agents in parallel and chains the results.
511
+ - [Hosted evals](https://docs.evolvingmachines.ai) is the other half of the SDK, and the part that is easiest to miss. Instead of driving one agent yourself, you hand Evolve datasets and a list of agents and read back scored trials — `jobs()` and `datasets()`, or the `evolve` CLI, with no `Evolve` instance involved. Start with `datasets().list()`: what comes back is whatever the platform has published to your account. If that list is empty, you have not hit a wall — [Bring your own dataset](https://docs.evolvingmachines.ai/core-concepts/datasets) publishes a corpus of your own.