@aexhq/sdk 0.23.0 → 0.25.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.
Files changed (44) hide show
  1. package/README.md +36 -125
  2. package/dist/_contracts/models.js +1 -2
  3. package/dist/_contracts/operations.d.ts +2 -2
  4. package/dist/_contracts/operations.js +4 -4
  5. package/dist/_contracts/provider-support.d.ts +23 -23
  6. package/dist/_contracts/provider-support.js +7 -14
  7. package/dist/_contracts/run-config.d.ts +24 -0
  8. package/dist/_contracts/run-config.js +6 -0
  9. package/dist/_contracts/run-trace.d.ts +7 -5
  10. package/dist/_contracts/run-trace.js +7 -5
  11. package/dist/_contracts/run-unit.js +21 -3
  12. package/dist/_contracts/runtime-types.d.ts +7 -8
  13. package/dist/_contracts/submission.d.ts +13 -1
  14. package/dist/_contracts/submission.js +93 -4
  15. package/dist/bundle.d.ts +13 -0
  16. package/dist/bundle.js +51 -0
  17. package/dist/bundle.js.map +1 -1
  18. package/dist/cli.mjs +13 -18
  19. package/dist/cli.mjs.sha256 +1 -1
  20. package/dist/client.d.ts +10 -4
  21. package/dist/client.js +61 -10
  22. package/dist/client.js.map +1 -1
  23. package/dist/index.d.ts +3 -2
  24. package/dist/index.js +3 -2
  25. package/dist/index.js.map +1 -1
  26. package/dist/tool.d.ts +41 -0
  27. package/dist/tool.js +138 -0
  28. package/dist/tool.js.map +1 -0
  29. package/dist/version.d.ts +1 -1
  30. package/dist/version.js +1 -1
  31. package/docs/concepts/agent-tools.md +48 -0
  32. package/docs/concepts/composition.md +43 -0
  33. package/docs/concepts/providers-and-runtimes.md +53 -0
  34. package/docs/concepts/runs.md +40 -0
  35. package/docs/credentials.md +3 -1
  36. package/docs/limits.md +44 -0
  37. package/docs/provider-runtime-capabilities.md +52 -54
  38. package/docs/public-surface.json +81 -0
  39. package/docs/quickstart.md +28 -105
  40. package/docs/run-config.md +1 -1
  41. package/docs/secrets.md +123 -0
  42. package/docs/vision-skills.md +3 -6
  43. package/package.json +2 -2
  44. package/docs/product-boundaries.md +0 -57
@@ -4,54 +4,52 @@ title: Provider runtime capabilities
4
4
 
5
5
  # Provider runtime capabilities
6
6
 
7
- Generated from `packages/contracts/src/provider-support.ts`; runtime cells are derived through `checkRuntimeSupported` and `selectRuntime` in `packages/contracts/src/submission.ts`.
7
+ Generated from `packages/contracts/src/provider-support.ts` and `packages/contracts/src/models.ts`; runtime routing is derived through `checkRuntimeSupported` and `selectRuntime` in `packages/contracts/src/submission.ts`.
8
8
 
9
9
  Regenerate with `pnpm capabilities:generate`; check with `pnpm capabilities:check`.
10
10
 
11
11
  Providers: [Anthropic](#anthropic) (`anthropic`), [DeepSeek](#deepseek) (`deepseek`), [OpenAI](#openai) (`openai`), [Gemini](#gemini) (`gemini`), [Mistral](#mistral) (`mistral`), [OpenRouter](#openrouter) (`openrouter`), [Doubao](#doubao) (`doubao`), [Doubao (China)](#doubao-cn) (`doubao-cn`). Runtime selectors: `managed`.
12
12
 
13
- All new submissions run on the managed runtime. Public support facts are listed separately from runtime dispatch facts.
13
+ All new submissions run on the managed runtime. Public support is expressed as supported providers and supported model ids.
14
14
 
15
- Status vocabulary: `supported`, `live-unverified`, `rejected`.
15
+ ## Supported models
16
16
 
17
- ## Public support
18
-
19
- | Provider | Wire value | Status | Docs | Evidence |
17
+ | Provider | Selector | Supported models | Docs | Evidence |
20
18
  | --- | --- | --- | --- | --- |
21
- | [Anthropic](#anthropic) | `anthropic` | supported | [Credentials](credentials.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts); [Installed-SDK Anthropic live user test](../../../apps/user-tests/test/live/live-sdk-anthropic-managed.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts) |
22
- | [DeepSeek](#deepseek) | `deepseek` | supported | [Credentials](credentials.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts); [Installed-SDK DeepSeek live user test](../../../apps/user-tests/test/live/live-sdk-deepseek.test.ts); [Installed-SDK DeepSeek comprehensive live user matrix](../../../apps/user-tests/test/live/live-sdk-comprehensive.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts) |
23
- | [OpenAI](#openai) | `openai` | live-unverified | [Credentials](credentials.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
24
- | [Gemini](#gemini) | `gemini` | live-unverified | [Credentials](credentials.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
25
- | [Mistral](#mistral) | `mistral` | live-unverified | [Credentials](credentials.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
26
- | [OpenRouter](#openrouter) | `openrouter` | live-unverified | [Credentials](credentials.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
27
- | [Doubao](#doubao) | `doubao` | live-unverified | [Credentials](credentials.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
28
- | [Doubao (China)](#doubao-cn) | `doubao-cn` | live-unverified | [Credentials](credentials.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
19
+ | [Anthropic](#anthropic) | `anthropic` | `claude-haiku-4-5`, `claude-3-5-haiku-latest`, `claude-3-5-sonnet-latest`, `claude-sonnet-4-6` | [Secrets](secrets.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts); [Installed-SDK Anthropic live user test](../../../apps/user-tests/test/live/live-sdk-anthropic-managed.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts) |
20
+ | [DeepSeek](#deepseek) | `deepseek` | `deepseek-v4-flash`, `deepseek-v4-pro`, `deepseek-chat`, `deepseek-reasoner` | [Secrets](secrets.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts); [Installed-SDK DeepSeek live user test](../../../apps/user-tests/test/live/live-sdk-deepseek.test.ts); [Installed-SDK DeepSeek comprehensive live user matrix](../../../apps/user-tests/test/live/live-sdk-comprehensive.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts) |
21
+ | [OpenAI](#openai) | `openai` | `gpt-4.1`, `gpt-4o-mini` | [Secrets](secrets.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
22
+ | [Gemini](#gemini) | `gemini` | `gemini-2.0-flash`, `gemini-2.5-flash` | [Secrets](secrets.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
23
+ | [Mistral](#mistral) | `mistral` | `mistral-large-latest`, `mistral-small-latest` | [Secrets](secrets.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
24
+ | [OpenRouter](#openrouter) | `openrouter` | `gpt-4o-mini`, `gpt-4o`, `gemini-2.0-flash` | [Secrets](secrets.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
25
+ | [Doubao](#doubao) | `doubao` | `doubao-seed-pro`, `doubao-seed-flash` | [Secrets](secrets.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
26
+ | [Doubao (China)](#doubao-cn) | `doubao-cn` | `doubao-seed-pro`, `doubao-seed-flash` | [Secrets](secrets.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
29
27
 
30
28
  ## Runtime routing
31
29
 
32
- | Provider | Default provider | Auto route | `runtime: "managed"` |
30
+ | Provider | Default provider | Auto route | Runtime selector |
31
+ | --- | --- | --- | --- |
32
+ | `anthropic` | yes | `managed` | [managed](#anthropic) |
33
+ | `deepseek` | no | `managed` | [managed](#deepseek) |
34
+ | `openai` | no | `managed` | [managed](#openai) |
35
+ | `gemini` | no | `managed` | [managed](#gemini) |
36
+ | `mistral` | no | `managed` | [managed](#mistral) |
37
+ | `openrouter` | no | `managed` | [managed](#openrouter) |
38
+ | `doubao` | no | `managed` | [managed](#doubao) |
39
+ | `doubao-cn` | no | `managed` | [managed](#doubao-cn) |
40
+
41
+ ## Runtime evidence
42
+
43
+ | Provider | Runtime | Enforcement path | Evidence |
33
44
  | --- | --- | --- | --- |
34
- | `anthropic` | yes | `managed` | [supported](#anthropic) |
35
- | `deepseek` | no | `managed` | [supported](#deepseek) |
36
- | `openai` | no | `managed` | [live-unverified](#openai) |
37
- | `gemini` | no | `managed` | [live-unverified](#gemini) |
38
- | `mistral` | no | `managed` | [live-unverified](#mistral) |
39
- | `openrouter` | no | `managed` | [live-unverified](#openrouter) |
40
- | `doubao` | no | `managed` | [live-unverified](#doubao) |
41
- | `doubao-cn` | no | `managed` | [live-unverified](#doubao-cn) |
42
-
43
- ## Runtime cell evidence
44
-
45
- | Provider | Runtime | Status | Ownership | Enforcement path | Evidence |
46
- | --- | --- | --- | --- | --- | --- |
47
- | `anthropic` | `managed` | supported | supported | submission parser + managed dispatch | [Installed-SDK Anthropic live user test](../../../apps/user-tests/test/live/live-sdk-anthropic-managed.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts) |
48
- | `deepseek` | `managed` | supported | supported | submission parser + managed dispatch | [Installed-SDK DeepSeek live user test](../../../apps/user-tests/test/live/live-sdk-deepseek.test.ts); [Installed-SDK DeepSeek comprehensive live user matrix](../../../apps/user-tests/test/live/live-sdk-comprehensive.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts) |
49
- | `openai` | `managed` | live-unverified | live-unverified | submission parser + managed dispatch | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
50
- | `gemini` | `managed` | live-unverified | live-unverified | submission parser + managed dispatch | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
51
- | `mistral` | `managed` | live-unverified | live-unverified | submission parser + managed dispatch | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
52
- | `openrouter` | `managed` | live-unverified | live-unverified | submission parser + managed dispatch | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
53
- | `doubao` | `managed` | live-unverified | live-unverified | submission parser + managed dispatch | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
54
- | `doubao-cn` | `managed` | live-unverified | live-unverified | submission parser + managed dispatch | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
45
+ | `anthropic` | `managed` | submission parser + managed dispatch | [Installed-SDK Anthropic live user test](../../../apps/user-tests/test/live/live-sdk-anthropic-managed.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts) |
46
+ | `deepseek` | `managed` | submission parser + managed dispatch | [Installed-SDK DeepSeek live user test](../../../apps/user-tests/test/live/live-sdk-deepseek.test.ts); [Installed-SDK DeepSeek comprehensive live user matrix](../../../apps/user-tests/test/live/live-sdk-comprehensive.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts) |
47
+ | `openai` | `managed` | submission parser + managed dispatch | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
48
+ | `gemini` | `managed` | submission parser + managed dispatch | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
49
+ | `mistral` | `managed` | submission parser + managed dispatch | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
50
+ | `openrouter` | `managed` | submission parser + managed dispatch | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
51
+ | `doubao` | `managed` | submission parser + managed dispatch | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
52
+ | `doubao-cn` | `managed` | submission parser + managed dispatch | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
55
53
 
56
54
  ## Validation errors
57
55
 
@@ -65,72 +63,72 @@ Provider-hosted skill refs (a `kind:"provider"` skill ref) are rejected because
65
63
 
66
64
  Notes:
67
65
 
68
- - Public status describes provider availability on the SDK surface. Runtime routing describes how a validated submission is dispatched.
66
+ - Supported models are the public SDK model ids accepted for each provider.
67
+ - Runtime routing describes how a validated submission is dispatched.
69
68
  - `runtime: "native"` is not a runtime selector; the submission parser rejects it as an invalid enum value.
70
- - `live-unverified` means the shape is accepted by code but does not yet have equal live user-test evidence.
71
69
 
72
70
  ## Provider anchors
73
71
 
74
72
  ### Anthropic
75
73
 
76
74
  - Wire provider: `anthropic`
77
- - Public status: supported
75
+ - Supported models: `claude-haiku-4-5`, `claude-3-5-haiku-latest`, `claude-3-5-sonnet-latest`, `claude-sonnet-4-6`
78
76
  - Auto route: `managed`
79
- - Docs: [Credentials](credentials.md); [Events](events.md)
77
+ - Docs: [Secrets](secrets.md); [Events](events.md)
80
78
  - Evidence: [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts); [Installed-SDK Anthropic live user test](../../../apps/user-tests/test/live/live-sdk-anthropic-managed.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts)
81
79
 
82
80
  ### DeepSeek
83
81
 
84
82
  - Wire provider: `deepseek`
85
- - Public status: supported
83
+ - Supported models: `deepseek-v4-flash`, `deepseek-v4-pro`, `deepseek-chat`, `deepseek-reasoner`
86
84
  - Auto route: `managed`
87
- - Docs: [Credentials](credentials.md); [Events](events.md)
85
+ - Docs: [Secrets](secrets.md); [Events](events.md)
88
86
  - Evidence: [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts); [Installed-SDK DeepSeek live user test](../../../apps/user-tests/test/live/live-sdk-deepseek.test.ts); [Installed-SDK DeepSeek comprehensive live user matrix](../../../apps/user-tests/test/live/live-sdk-comprehensive.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts)
89
87
 
90
88
  ### OpenAI
91
89
 
92
90
  - Wire provider: `openai`
93
- - Public status: live-unverified
91
+ - Supported models: `gpt-4.1`, `gpt-4o-mini`
94
92
  - Auto route: `managed`
95
- - Docs: [Credentials](credentials.md); [Events](events.md)
93
+ - Docs: [Secrets](secrets.md); [Events](events.md)
96
94
  - Evidence: [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts)
97
95
 
98
96
  ### Gemini
99
97
 
100
98
  - Wire provider: `gemini`
101
- - Public status: live-unverified
99
+ - Supported models: `gemini-2.0-flash`, `gemini-2.5-flash`
102
100
  - Auto route: `managed`
103
- - Docs: [Credentials](credentials.md); [Events](events.md)
101
+ - Docs: [Secrets](secrets.md); [Events](events.md)
104
102
  - Evidence: [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts)
105
103
 
106
104
  ### Mistral
107
105
 
108
106
  - Wire provider: `mistral`
109
- - Public status: live-unverified
107
+ - Supported models: `mistral-large-latest`, `mistral-small-latest`
110
108
  - Auto route: `managed`
111
- - Docs: [Credentials](credentials.md); [Events](events.md)
109
+ - Docs: [Secrets](secrets.md); [Events](events.md)
112
110
  - Evidence: [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts)
113
111
 
114
112
  ### OpenRouter
115
113
 
116
114
  - Wire provider: `openrouter`
117
- - Public status: live-unverified
115
+ - Supported models: `gpt-4o-mini`, `gpt-4o`, `gemini-2.0-flash`
118
116
  - Auto route: `managed`
119
- - Docs: [Credentials](credentials.md); [Events](events.md)
117
+ - Docs: [Secrets](secrets.md); [Events](events.md)
120
118
  - Evidence: [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts)
121
119
 
122
120
  ### Doubao
123
121
 
124
122
  - Wire provider: `doubao`
125
- - Public status: live-unverified
123
+ - Supported models: `doubao-seed-pro`, `doubao-seed-flash`
126
124
  - Auto route: `managed`
127
- - Docs: [Credentials](credentials.md); [Events](events.md)
125
+ - Docs: [Secrets](secrets.md); [Events](events.md)
128
126
  - Evidence: [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts)
129
127
 
130
128
  ### Doubao (China)
131
129
 
132
130
  - Wire provider: `doubao-cn`
133
- - Public status: live-unverified
131
+ - Supported models: `doubao-seed-pro`, `doubao-seed-flash`
134
132
  - Auto route: `managed`
135
- - Docs: [Credentials](credentials.md); [Events](events.md)
133
+ - Docs: [Secrets](secrets.md); [Events](events.md)
136
134
  - Evidence: [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts)
@@ -0,0 +1,81 @@
1
+ {
2
+ "brand": "aex",
3
+ "productName": "Agent Executor",
4
+ "oneLine": "aex is an agent execution platform for launching autonomous agents from a simple TypeScript SDK and CLI.",
5
+ "description": "Submit typed runs, stream durable events, capture outputs, and compose agents with skills, files, MCP, proxy endpoints, and subagents across the managed runtime.",
6
+ "installCommand": "npm install @aexhq/sdk",
7
+ "examples": {
8
+ "typescriptLines": [
9
+ "import { AgentExecutor, Models, Providers } from \"@aexhq/sdk\";",
10
+ "",
11
+ "const aex = new AgentExecutor({ apiToken: process.env.AEX_API_TOKEN! });",
12
+ "",
13
+ "const runId = await aex.submit({",
14
+ " provider: Providers.ANTHROPIC,",
15
+ " model: Models.CLAUDE_HAIKU_4_5,",
16
+ " prompt: \"Write the report and save outputs.\",",
17
+ " secrets: { apiKey: process.env.ANTHROPIC_API_KEY! }",
18
+ "});",
19
+ "",
20
+ "for await (const event of aex.stream(runId)) console.log(event.type);",
21
+ "await aex.wait(runId);",
22
+ "await aex.download(runId, { to: \"./run.zip\" });"
23
+ ],
24
+ "cliLines": [
25
+ "aex run \\",
26
+ " --api-token \"$AEX_API_TOKEN\" \\",
27
+ " --anthropic-api-key \"$ANTHROPIC_API_KEY\" \\",
28
+ " --model claude-haiku-4-5 \\",
29
+ " --prompt \"Write the report and save outputs.\" \\",
30
+ " --follow"
31
+ ]
32
+ },
33
+ "providers": [
34
+ { "id": "anthropic", "name": "Anthropic" },
35
+ { "id": "deepseek", "name": "DeepSeek" },
36
+ { "id": "openai", "name": "OpenAI" },
37
+ { "id": "gemini", "name": "Gemini" },
38
+ { "id": "mistral", "name": "Mistral" },
39
+ { "id": "openrouter", "name": "OpenRouter" },
40
+ { "id": "doubao", "name": "Doubao" },
41
+ { "id": "doubao-cn", "name": "Doubao China" }
42
+ ],
43
+ "featureAreas": [
44
+ {
45
+ "slug": "agent-runtime",
46
+ "href": "/docs/features/#agent-runtime",
47
+ "title": "Agent runtime",
48
+ "description": "Managed autonomous runs with shell, filesystem, editing, notebook, web fetch/search, background command, and post-hook repair tools."
49
+ },
50
+ {
51
+ "slug": "durable-infrastructure",
52
+ "href": "/docs/features/#durable-infrastructure",
53
+ "title": "Durable infrastructure",
54
+ "description": "Run records, status, wait/cancel/delete, idempotency, typed events, output capture, downloads, timeouts, and runtime sizes."
55
+ },
56
+ {
57
+ "slug": "agent-composition",
58
+ "href": "/docs/features/#agent-composition",
59
+ "title": "Agent composition",
60
+ "description": "Skills, files, AGENTS.md, remote MCP servers, proxy endpoints, environment variables, packages, and networking controls."
61
+ },
62
+ {
63
+ "slug": "subagents",
64
+ "href": "/docs/features/#subagents",
65
+ "title": "Subagents",
66
+ "description": "Typed parent/child lineage for async child runs, output handoff, and bounded agent delegation."
67
+ },
68
+ {
69
+ "slug": "models-and-providers",
70
+ "href": "/docs/features/#models-and-providers",
71
+ "title": "Models and providers",
72
+ "description": "Anthropic, DeepSeek, OpenAI, Gemini, Mistral, OpenRouter, Doubao, and Doubao China behind one submission shape."
73
+ },
74
+ {
75
+ "slug": "typed-control-surface",
76
+ "href": "/docs/features/#typed-control-surface",
77
+ "title": "Typed control surface",
78
+ "description": "Strongly typed SDK inputs, CLI parity, BYOK secrets, scoped proxy auth, redaction, and output modes."
79
+ }
80
+ ]
81
+ }
@@ -1,137 +1,60 @@
1
1
  ---
2
- title: aex quickstart
2
+ title: Quickstart
3
3
  ---
4
4
 
5
5
  # Quickstart
6
6
 
7
- 1. Get an aex SDK API token (`ant_…`).
8
- 2. Create `AgentExecutor` — the workspace is derived server-side from the token.
9
- 3. Submit the run with the agent's brief plus an inline `secrets` bundle. Wait for terminal status. Fetch outputs.
7
+ ## 1. Install
8
+
9
+ ```bash
10
+ npm install @aexhq/sdk
11
+ ```
12
+
13
+ ## 2. Submit a run
10
14
 
11
15
  ```ts
12
- import { AgentExecutor, RunModels } from "@aexhq/sdk";
16
+ import { AgentExecutor, Models, Providers } from "@aexhq/sdk";
13
17
 
14
18
  const aex = new AgentExecutor({
15
- apiToken: process.env.AEX_API_TOKEN!,
16
- // baseUrl defaults to https://api.aex.dev - set it for local or staging planes.
19
+ apiToken: process.env.AEX_API_TOKEN!
17
20
  });
18
21
 
19
22
  const runId = await aex.submit({
20
- model: RunModels.CLAUDE_HAIKU_4_5,
21
- prompt: "Write a short answer about agent-first SDK design.",
23
+ provider: Providers.ANTHROPIC,
24
+ model: Models.CLAUDE_HAIKU_4_5,
25
+ prompt: "Write a short report and save it as a file.",
22
26
  secrets: { apiKey: process.env.ANTHROPIC_API_KEY! }
23
27
  });
24
-
25
- const run = await aex.wait(runId);
26
- console.log(run.status);
27
- console.log(await aex.outputs(runId));
28
28
  ```
29
29
 
30
- For reusable, credential-free configs, use an ordinary function:
30
+ ## 3. Stream, wait, and download
31
31
 
32
32
  ```ts
33
- function summarise(topic: string) {
34
- return {
35
- model: RunModels.CLAUDE_HAIKU_4_5,
36
- prompt: `Write a short answer about ${topic}.`
37
- };
33
+ for await (const event of aex.stream(runId)) {
34
+ console.log(event.type);
38
35
  }
39
36
 
40
- const runId = await aex.submit({
41
- ...summarise("agent-first SDK design"),
42
- secrets: { apiKey: process.env.ANTHROPIC_API_KEY! }
43
- });
37
+ const run = await aex.wait(runId);
38
+ console.log(run.status);
39
+
40
+ await aex.download(runId, { to: "./run.zip" });
44
41
  ```
45
42
 
46
- Or from the shell:
43
+ The same run from the CLI:
47
44
 
48
45
  ```bash
49
46
  aex run \
50
47
  --api-token "$AEX_API_TOKEN" \
51
48
  --anthropic-api-key "$ANTHROPIC_API_KEY" \
52
49
  --model claude-haiku-4-5 \
53
- --prompt "Write a short answer about agent-first SDK design." \
50
+ --prompt "Write a short report and save it as a file." \
54
51
  --follow
55
52
  ```
56
53
 
57
- For a config-file flow, pass `--config <path>` with a run-config JSON file for a single run request (`{ model, system?, prompt, skills?, mcpServers?, environment?, runtimeSize?, timeout?, postHook?, proxyEndpoints?, metadata? }`). Both surfaces hit the same aex backend and operate on the same durable run records. The JSON `model` value is validated against `RUN_MODELS`.
58
-
59
- ## Runtime controls
60
-
61
- `submit` also accepts per-run controls that are not secrets:
62
-
63
- - `runtimeSize` - a closed managed-runtime preset. Prefer `RuntimeSizes`, e.g. `RuntimeSizes.SHARED_2X_2GB`.
64
- - `timeout` - run deadline as a duration string such as `"30m"` or `"2h"`; bounded server-side.
65
- - `postHook` - optional post-agent verifier, e.g. `{ command: "pnpm test", timeout: "5m", maxTurns: 3, maxChars: 12000 }`. It runs after the agent process exits successfully; failures are sent back to the agent for repair until `maxTurns` is exhausted. Empty `command` is treated as omitted.
66
- - `builtins` - managed-runtime builtin extensions. Omit it to use the default `["developer"]` toolkit. Pass `[]` for a pure-MCP run with no builtins.
67
- - `outputMode` - `"buffered"` by default; pass `"stream"` for per-token assistant text deltas.
68
-
69
- ## Where things go: customer → primitive mapping
70
-
71
- Every kind of thing you want to ship at run time has exactly one right primitive in the SDK. Reach for the right one rather than rolling your own wrapper.
72
-
73
- | What you have | Primitive | What it does |
74
- |---|---|---|
75
- | Non-secret paths or config (`BROLL_STORE`, mode flags) | `environment.envVars` | Mounted as `RUNTIME.env` / `RUNTIME.json`; `__KEY__` substitution in agent-facing markdown; echoed back as `run.runtimeManifest.envVars` |
76
- | Upstream HTTPS API keys (TMDB, Brave, Tavily, …) | `ProxyEndpoint` | Credentials live server-side; aex proxy injects them on outbound calls. The key never enters the container. |
77
- | MCP server credentials | `secrets.mcpServers` | Held in run-scoped custody, attached per run |
78
- | Provider API key | `secrets.apiKey` | Required on every `submit`; held in run-scoped custody. Carries the BYOK key for the selected `provider` |
79
- | Non-secret reference data files or folders (transcripts, persona docs, PDFs) | `File.fromPath('./subtitles.srt')` / `File.fromPath('./customer-folder/')` | Unzipped into the `mountPath` directory (default `/workspace`, the agent's cwd), preserving the real filename + extension — e.g. `/workspace/subtitles.srt`. See [Files: where they land](#files-where-they-land). |
80
- | Executable skill code (a `.pyz` wrapper, scripts, prompts) | `Skill.fromPath('./skills/my-skill/')` | Mounted under `skills/<name>/`; the bundle's `SKILL.md` is composed into the agent's instructions |
81
- | Agent instructions file | `AgentsMd.fromPath('./AGENTS.md')` | Prepended as the first user turn |
82
-
83
- `Skill`, `AgentsMd`, and `File` values are materialized for the run before the first agent turn. `environment.envVars` values surface in runtime metadata and can be referenced by `__KEY__` placeholders in agent-facing markdown.
84
-
85
- ### Files: where they land
86
-
87
- A `File` is uploaded as a content-addressed archive and **unzipped on the runtime into a directory**, preserving the real filename + extension — the agent sees the actual file, never a `.zip` to unpack.
88
-
89
- - **`mountPath` is the directory the archive unzips into.** It must be an absolute container path (`/...`, no `..` traversal). It defaults to **`/workspace`**, which is also the agent's default working directory — so a file handed with no `mountPath` lands directly in the agent's cwd.
90
- - **A single file keeps its real basename.** `File.fromPath('./source-video-subtitles.srt')` lands at `/workspace/source-video-subtitles.srt` (not a slug, not a `.zip`). `File.fromBytes({ name: 'data.csv', bytes })` lands at `/workspace/data.csv` — `name` is the real filename here.
91
- - **A folder lands its entries under the mount directory.** `File.fromPath('./repo/', { mountPath: '/workspace/repo' })` puts each file at `/workspace/repo/<relative-path>`.
92
- - **The resolved mount directory is surfaced back on the run.** Read `run.runtimeManifest.mountedFiles` (an array of `{ name, mountPath }`) to learn where each handed file landed.
93
-
94
- ```ts
95
- const subtitles = await File.fromPath('./source-video-subtitles.srt'); // → /workspace/source-video-subtitles.srt
96
- const dataset = await File.fromPath('./data/', { mountPath: '/workspace/input' }); // → /workspace/input/<files>
97
- const run = await client.submit({ model, prompt, files: [subtitles, dataset], secrets: { apiKey } });
98
- const resolved = (await client.getRun(run.id)).runtimeManifest?.mountedFiles;
99
- // [{ name: 'source-video-subtitles', mountPath: '/workspace' }, { name: 'data', mountPath: '/workspace/input' }]
100
- ```
101
-
102
- ## Safe retries with `idempotencyKey`
103
-
104
- Every `submit` call carries an `idempotencyKey`. When omitted the SDK auto-generates a UUID per call. Supplying your own key makes retries deterministic:
105
-
106
- | Submit shape | Server response |
107
- | --- | --- |
108
- | New `idempotencyKey` | HTTP 202 — returns the new run id. |
109
- | Same key + identical request body hash | HTTP 200 — returns the original run id. The SDK call resolves with that id. |
110
- | Same key + **different** request body hash | HTTP 409 — body `{ error: { message, code: "idempotency_conflict", details: { existingRunId } } }`. The SDK throws an `HttpError` carrying that body. Use `details.existingRunId` to adopt the pre-existing run, or pick a fresh key. |
111
- | Omitted `idempotencyKey` | A new UUID is generated on every call — repeat submissions create new runs. |
112
-
113
- The request hash is computed server-side over the canonical submission JSON (model, prompt, system, environment, skill refs, MCP server descriptors, proxy endpoints, `outputs`, etc.) so reordering JSON keys, adding whitespace, or rotating the inline secret bundle does **not** change the hash. Changing the prompt, model, system, or any other non-secret field does.
114
-
115
- Pattern for safe retries:
116
-
117
- ```ts
118
- const idempotencyKey = crypto.randomUUID();
119
- async function submitWithRetry() {
120
- for (let attempt = 0; attempt < 3; attempt++) {
121
- try {
122
- return await aex.submit({
123
- model: RunModels.CLAUDE_HAIKU_4_5,
124
- prompt: "...",
125
- idempotencyKey,
126
- secrets: { apiKey: process.env.ANTHROPIC_API_KEY! }
127
- });
128
- } catch (err) {
129
- if (err instanceof Error && err.message.includes("network")) continue;
130
- throw err;
131
- }
132
- }
133
- throw new Error("submit failed after retries");
134
- }
135
- ```
54
+ ## Add capabilities
136
55
 
137
- The same `idempotencyKey` reused with the same body will deterministically resolve to the same run id regardless of how many times the network drops between attempts. Query, stream, wait, or download the run by that id.
56
+ - Add files, skills, AGENTS.md, MCP servers, proxy endpoints, packages, and networking controls with [Composition](concepts/composition.md).
57
+ - Inspect runtime tools with [Agent tools](concepts/agent-tools.md).
58
+ - Use parent/child run delegation from the [Features](https://aex.dev/docs/features/#subagents) page.
59
+ - Narrow output capture or download individual files with [Outputs](outputs.md).
60
+ - Check supported providers and models in the [provider/runtime capability matrix](provider-runtime-capabilities.md).
@@ -22,7 +22,7 @@ Allowed fields:
22
22
 
23
23
  `agentsMd`, `files`, `outputs`, `builtins`, and `outputMode` are top-level `submit` options, not run-config fields. They carry bytes, capture behavior, or agent tool/output controls that belong on a concrete run submission.
24
24
 
25
- Secrets never live in run config. Pass credentials through `submit({ ...config, secrets })` in the SDK or the equivalent host-mode flags (`--anthropic-api-key`, `--mcp-auth`, `--proxy-auth`) in the CLI. See [Credentials](credentials.md) for the proxy endpoint policy/auth split and retry fields.
25
+ Secrets never live in run config. Pass credentials through `submit({ ...config, secrets })` in the SDK or the equivalent host-mode flags (`--anthropic-api-key`, `--mcp-auth`, `--proxy-auth`) in the CLI. See [Secrets](secrets.md) for secret lifecycles and [Credentials](credentials.md) for the proxy endpoint policy/auth split and retry fields.
26
26
 
27
27
  ## Reuse in code
28
28
 
@@ -0,0 +1,123 @@
1
+ ---
2
+ title: Secrets
3
+ ---
4
+
5
+ # Secrets
6
+
7
+ aex supports BYOK provider keys, per-run credentials, and reusable workspace
8
+ secrets. Secret values are excluded from the idempotency fingerprint and do not
9
+ belong in run config.
10
+
11
+ ## Use A Provider Key For One Run
12
+
13
+ ### TypeScript
14
+
15
+ ```ts
16
+ import { AgentExecutor, Models, Providers } from "@aexhq/sdk";
17
+
18
+ const aex = new AgentExecutor({ apiToken: process.env.AEX_API_TOKEN! });
19
+
20
+ await aex.submit({
21
+ provider: Providers.ANTHROPIC,
22
+ model: Models.CLAUDE_HAIKU_4_5,
23
+ prompt: "Write the report and save outputs.",
24
+ secrets: { apiKey: process.env.ANTHROPIC_API_KEY! }
25
+ });
26
+ ```
27
+
28
+ ### CLI
29
+
30
+ ```bash
31
+ aex run \
32
+ --api-token "$AEX_API_TOKEN" \
33
+ --anthropic-api-key "$ANTHROPIC_API_KEY" \
34
+ --model claude-haiku-4-5 \
35
+ --prompt "Write the report and save outputs."
36
+ ```
37
+
38
+ ## Upload An Env Secret
39
+
40
+ Use `Secret.value(...).upload(...)` when you start with an ephemeral value and
41
+ want to persist it as a named workspace secret for later runs.
42
+
43
+ ```ts
44
+ import { AgentExecutor, Models, Providers, Secret } from "@aexhq/sdk";
45
+
46
+ const aex = new AgentExecutor({ apiToken: process.env.AEX_API_TOKEN! });
47
+
48
+ const githubToken = await Secret.value(process.env.GITHUB_TOKEN!).upload(aex, {
49
+ name: "github-token"
50
+ });
51
+
52
+ await aex.submit({
53
+ provider: Providers.ANTHROPIC,
54
+ model: Models.CLAUDE_HAIKU_4_5,
55
+ prompt: "Inspect the repository issues.",
56
+ secretEnv: { GITHUB_TOKEN: githubToken },
57
+ secrets: { apiKey: process.env.ANTHROPIC_API_KEY! }
58
+ });
59
+ ```
60
+
61
+ ## Set Or Rotate A Workspace Secret
62
+
63
+ Use `client.secrets.set(...)` to create a named secret directly. Use
64
+ `client.secrets.rotate(...)` to replace its value while keeping the same name.
65
+
66
+ ```ts
67
+ await aex.secrets.set({
68
+ name: "serper-api-key",
69
+ value: process.env.SERPER_API_KEY!
70
+ });
71
+
72
+ await aex.secrets.rotate({
73
+ name: "serper-api-key",
74
+ value: process.env.SERPER_API_KEY_NEXT!
75
+ });
76
+ ```
77
+
78
+ ## Retrieve Secret Metadata
79
+
80
+ `list` and `get` return metadata only. They never return the secret value.
81
+
82
+ ```ts
83
+ const secrets = await aex.secrets.list();
84
+ const metadata = await aex.secrets.get("serper-api-key");
85
+ ```
86
+
87
+ ## Get A Secret Value
88
+
89
+ Use `get_value` only when the value is intentionally needed outside a run. It is
90
+ the explicit audited value-read path.
91
+
92
+ ```ts
93
+ const secretValue = await aex.secrets.get_value("serper-api-key");
94
+ console.log(secretValue.value);
95
+ ```
96
+
97
+ ## Inject A Workspace Secret Into A Run
98
+
99
+ Reference workspace secrets with `Secret.ref(name)`. The value resolves
100
+ server-side and is injected as the named environment variable.
101
+
102
+ ```ts
103
+ import { Models, Providers, Secret } from "@aexhq/sdk";
104
+
105
+ await aex.submit({
106
+ provider: Providers.ANTHROPIC,
107
+ model: Models.CLAUDE_HAIKU_4_5,
108
+ prompt: "Use SERPER_API_KEY for web search.",
109
+ secretEnv: {
110
+ SERPER_API_KEY: Secret.ref("serper-api-key")
111
+ },
112
+ secrets: { apiKey: process.env.ANTHROPIC_API_KEY! }
113
+ });
114
+ ```
115
+
116
+ ## Delete A Workspace Secret
117
+
118
+ ```ts
119
+ await aex.secrets.delete("serper-api-key");
120
+ ```
121
+
122
+ The CLI supports per-run provider, MCP, and proxy credentials. Workspace secret
123
+ administration is exposed through the SDK.
@@ -32,7 +32,7 @@ a raised `maxRequestBytes` (so the base64 image fits):
32
32
  ```ts
33
33
  import { AgentExecutor, RunModels, Skill, ProxyEndpoint, validateProxyAuth } from "@aexhq/sdk";
34
34
 
35
- const aex = new AgentExecutor({ apiToken: process.env.AEX_WORKSPACE_TOKEN! });
35
+ const aex = new AgentExecutor({ apiToken: process.env.AEX_API_TOKEN! });
36
36
 
37
37
  const proxyEndpoints = [
38
38
  ProxyEndpoint.bearer({
@@ -146,11 +146,8 @@ frame_%03d.jpg`) — full-res adds payload and cost, not signal.
146
146
 
147
147
  ## Notes
148
148
 
149
- - **Egress.** The named proxy reaches any HTTPS host you declare as `baseUrl`
150
- (no upstream allow-list; only a literal-IP SSRF deny-list). The international
151
- BytePlus host (`ark.ap-southeast.bytepluses.com`) is a normal public host. The
152
- China host (`ark.cn-beijing.volces.com`) is reachable in principle but the
153
- platform's egress to Beijing is currently unverified — prefer the BytePlus host.
149
+ - **Host selection.** Use the provider endpoint that matches your account and
150
+ declare it as the proxy endpoint `baseUrl`.
154
151
  - **Keyless model hosts.** If the upstream takes no credential, declare the
155
152
  endpoint with `authShape: { type: "none" }` and omit the `proxyEndpointAuth`
156
153
  entry (see `credentials.md`).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aexhq/sdk",
3
- "version": "0.23.0",
3
+ "version": "0.25.0",
4
4
  "description": "TypeScript SDK for running autonomous agent sessions across providers (Anthropic, OpenAI, DeepSeek, Gemini, Mistral) behind one interface.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -26,7 +26,7 @@
26
26
  "examples"
27
27
  ],
28
28
  "devDependencies": {
29
- "@aexhq/contracts": "0.23.0"
29
+ "@aexhq/contracts": "0.25.0"
30
30
  },
31
31
  "engines": {
32
32
  "node": ">=20"