@deepraxis/sdk 0.1.0-dev.723d9cb → 0.1.0-dev.7ec6f84

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.
@@ -61,7 +61,7 @@ export const operations = [
61
61
  "resource": "agent.agents",
62
62
  "method": "create",
63
63
  "summary": "Create agent",
64
- "description": "Create a reusable agent definition, then pass its returned id to sessions.create to start a conversation. The definition includes model, system prompt, tools, MCP servers and an optional multiagent roster. It is saved as version 1; real updates create new versions. Unlike Anthropic Managed Agents, nonempty skills attachments return 400; the native skill tool is separate from the skills field. Use tools: [{type: \"agent_toolset_20260401\"}] for built-in tools including codemode, skill and agent; inspect toolsets.list for names and schemas, and keep bash enabled for native additions. To offer only some tools, set default_config: {enabled: false} and list the tools to keep in configs, e.g. tools: [{type: \"agent_toolset_20260401\", default_config: {enabled: false}, configs: [{name: \"codemode\", enabled: true}, {name: \"bash\", enabled: true, permission_policy: {type: \"always_ask\"}}]}]; every tool not listed, including todo_write, enter_plan_mode, ask_user_question and goal_read, follows default_config, and the response echoes it. codemode runs through bash, so enabling codemode while bash is disabled returns 400. Optional mcp_toolset entries pair with mcp_servers. model accepts platform model IDs such as deepseek-flash, not only the Claude IDs in the protocol examples. model.settings.reasoning sets default thinking; other extra model controls return 400. Example: {\"name\":\"helper\",\"model\":{\"id\":\"deepseek-flash\"},\"tools\":[{\"type\":\"agent_toolset_20260401\"}]}.",
64
+ "description": "Create a reusable agent definition, then pass its returned id to sessions.create to start a conversation. The definition includes model, system prompt, tools, MCP servers and an optional multiagent roster. It is saved as version 1; real updates create new versions. skills attaches uploaded custom skills as [{type: \"custom\", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send \"latest\", to use the skill's newest version when a session starts. type anthropic returns 400. Use tools: [{type: \"agent_toolset_20260401\"}] for built-in tools including codemode, skill and agent; inspect toolsets.list for names and schemas, and keep bash enabled for native additions. To offer only some tools, set default_config: {enabled: false} and list the tools to keep in configs, e.g. tools: [{type: \"agent_toolset_20260401\", default_config: {enabled: false}, configs: [{name: \"codemode\", enabled: true}, {name: \"bash\", enabled: true, permission_policy: {type: \"always_ask\"}}]}]; every tool not listed, including todo_write, enter_plan_mode, ask_user_question and goal_read, follows default_config, and the response echoes it. codemode runs through bash, so enabling codemode while bash is disabled returns 400. Optional mcp_toolset entries pair with mcp_servers. model accepts platform model IDs such as deepseek-flash, not only the Claude IDs in the protocol examples. model.settings.reasoning sets default thinking; other extra model controls return 400. model and every models.allowed entry must be a catalog model that can run an agent: an unknown id returns 400 \"model <id> is not in the model catalog\" and an embedding, image or speech model returns 400 \"model <id> cannot run an agent\". name is a label, not a unique key: 1 to 256 characters after trimming, no NUL or line breaks. avatar is trimmed, must not contain spaces or point at a loopback, private or internal host, and its scheme is stored in lowercase. script and workflow binding ids are stored in lowercase, the form automation matches; bindings together with environment_id null return 400 because bindings need a machine. Example: {\"name\":\"helper\",\"model\":{\"id\":\"deepseek-flash\"},\"tools\":[{\"type\":\"agent_toolset_20260401\"}]}.",
65
65
  "http": "POST",
66
66
  "path": "/agent/v1/agents",
67
67
  "streaming": "no",
@@ -75,13 +75,13 @@ export const operations = [
75
75
  "name": "model",
76
76
  "type": "object",
77
77
  "required": true,
78
- "description": "Model identifier. Accepts the\n[model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison),\ne.g. `claude-opus-5`, or a `model_config` object for additional configuration\ncontrol"
78
+ "description": "A model id from the Praxis model catalog (`praxis.model.models.list`), or a `model_config` object for additional configuration control. Unlike Anthropic, Claude model ids other than those in the catalog are rejected."
79
79
  },
80
80
  {
81
81
  "name": "name",
82
82
  "type": "string",
83
83
  "required": true,
84
- "description": "Human-readable name for the agent."
84
+ "description": "Display name of the agent, 1 to 256 characters after trimming, with no NUL or line breaks. A label, not a unique key: two agents may share a name."
85
85
  },
86
86
  {
87
87
  "name": "description",
@@ -113,7 +113,7 @@ export const operations = [
113
113
  "type": "array",
114
114
  "itemType": "object",
115
115
  "required": false,
116
- "description": "Skill attachments are not supported: a nonempty array returns 400. Omit this field or send an empty array; the native skill tool is configured separately through tools."
116
+ "description": "Custom skills attached to the agent, each {type: \"custom\", skill_id, version?}: skill_id comes from skills.create or skills.list, at most 20 skills, no repeated skill_id. Omit version, or send \"latest\", to use the skill's newest version at the moment a session starts; a pinned version stays fixed. type anthropic returns 400: upload the skill and attach it as custom. On update, omit the field to keep the list, send an array to replace it, or send [] or null to clear it."
117
117
  },
118
118
  {
119
119
  "name": "system",
@@ -129,25 +129,11 @@ export const operations = [
129
129
  "description": "Tool configurations available to the agent. Maximum of 128 tools\nacross all toolsets allowed."
130
130
  },
131
131
  {
132
- "name": "databases",
133
- "type": "array",
134
- "itemType": "object",
135
- "required": false,
136
- "description": "Database allowlist for platform resources accessible through service-agent codemode. Only kind=service accepts nonempty bindings; personal agents return 400. At most 20 bindings per resource type, with no duplicate ids. Newly added bindings apply only to new sessions; disabling or removing a binding immediately revokes access in running sessions. Unbound resources return 404; writes to read_only resources are refused. Other platform APIs return 403, except public API discovery. Invalid bindings and unknown item fields return 400. Omit on create for no bindings."
137
- },
138
- {
139
- "name": "vector_stores",
140
- "type": "array",
141
- "itemType": "object",
142
- "required": false,
143
- "description": "Knowledge vector store allowlist for platform resources accessible through service-agent codemode. Only kind=service accepts nonempty bindings; personal agents return 400. At most 20 bindings per resource type, with no duplicate ids. Newly added bindings apply only to new sessions; disabling or removing a binding immediately revokes access in running sessions. Unbound resources return 404; writes to read_only resources are refused. Other platform APIs return 403, except public API discovery. Invalid bindings and unknown item fields return 400. Omit on create for no bindings."
144
- },
145
- {
146
- "name": "files",
132
+ "name": "bindings",
147
133
  "type": "array",
148
134
  "itemType": "object",
149
135
  "required": false,
150
- "description": "File allowlist for platform resources accessible through service-agent codemode. Only kind=service accepts nonempty bindings; personal agents return 400. At most 20 bindings per resource type, with no duplicate ids. Newly added bindings apply only to new sessions; disabling or removing a binding immediately revokes access in running sessions. Unbound resources return 404; writes to read_only resources are refused. Other platform APIs return 403, except public API discovery. Invalid bindings and unknown item fields return 400. Omit on create for no bindings."
136
+ "description": "Platform resources and services this service agent's codemode may reach, as one list of typed bindings. Only kind=service accepts a nonempty list; personal agents return 400. There are two kinds. A resource binding names one resource with id and access: database (id db_..., read_only or read_write), vector_store (id vs_..., read_only or read_write), file (id file- plus 24 letters or digits, as the File API returns it; read_only), media_library (any id without ':' or whitespace, read_only or read_write), model (a model catalog id, invoke), workflow and script (id <namespace>/<name>, invoke). A service binding opens a whole service and carries only enabled: search or browser. At most 20 bindings per type, no repeated type and id, and each service type at most once. A session is authorized by the agent version it runs: newly added bindings apply only to new sessions, and a version saved with apply=false changes no access until it is applied. Applying a version that disables, removes or downgrades a binding revokes it immediately in running sessions on older versions. A resource that is not bound returns 404, a service that is not opened returns 403, and a write to a resource bound read_only returns 403 BINDING_READ_ONLY. Unknown types, fields on the wrong kind (id, access or instructions on a service binding), wrong access and malformed ids return 400. The former databases, vector_stores and files fields are removed and return 400. Omit on create for no bindings."
151
137
  },
152
138
  {
153
139
  "name": "kind",
@@ -197,6 +183,25 @@ export const operations = [
197
183
  "required": false,
198
184
  "description": "Praxis extension: switchable model ids on /agent/v1 only. The default model must be included. When omitted, only the default model is selectable."
199
185
  },
186
+ {
187
+ "name": "avatar",
188
+ "type": "string",
189
+ "required": false,
190
+ "description": "Avatar image of the agent: an absolute https URL of at most 2048 characters, without credentials; any other value returns 400 avatar must be an https URL. It is the default picture in agent lists, the agent detail, the chat header and embedded chat when the embed appearance sets none. Saved with the agent version like other configuration, so apply=false keeps the previous avatar in effect until that version is applied. Omit on create for no avatar; on update, omit to keep it and send null to clear it. Both personal and service agents accept it. /agent/v1 only; /anthropic neither accepts nor returns it."
191
+ },
192
+ {
193
+ "name": "environment_id",
194
+ "type": "string",
195
+ "required": false,
196
+ "description": "Default environment of a service agent: the environment_id a new session gets when it names none. Use light, node22 or the env_ id of an active environment of your organization; any other value returns 400 environment_id <id> was not found. null means no environment, so sessions are plain conversation without codemode or bash. Saved with the agent version like other configuration, so apply=false keeps the previous environment in effect for new sessions until that version is applied; a session that sets environment_id itself, null included, overrides it. Omit on create for light; on update, omit to keep it. Versions saved before this field existed read as light. Personal agents use a Computer: a non-null value returns 400 and the field is not returned. /agent/v1 only; /anthropic neither accepts nor returns it."
197
+ },
198
+ {
199
+ "name": "vault_ids",
200
+ "type": "array",
201
+ "itemType": "string",
202
+ "required": false,
203
+ "description": "Default vaults of a service agent: the vault_ids a new session gets when it names none, so the agent's credentials follow the version. At most 50 ids without duplicates; each must be a vault of your organization that is not archived, otherwise 400 vault_ids[<index>] <id> was not found. Saved with the agent version like other configuration, so apply=false keeps the previous vaults in effect for new sessions until that version is applied; a session that sets vault_ids itself, [] included, overrides it. Omit on create for []; on update, omit to keep the list and send an array to replace it as a whole. Versions saved before this field existed read as []. Embed tokens use the vault_ids of the version they pin; vault_ids on the embed policy is deprecated, still accepted and ignored. Personal agents get no default vaults: a non-empty value returns 400 and the field is not returned. /agent/v1 only; /anthropic neither accepts nor returns it."
204
+ },
200
205
  {
201
206
  "name": "preset",
202
207
  "type": "string",
@@ -215,7 +220,7 @@ export const operations = [
215
220
  "resource": "agent.agents",
216
221
  "method": "retrieve",
217
222
  "summary": "Get agent",
218
- "description": "Read one agent by id, at its latest version or, with version, at a specific earlier version. The response lists every native tool with its resolved configuration in one agent_toolset_20260401 entry, so it can be sent back unchanged to agents.update. Use agents.versions.list to enumerate versions.",
223
+ "description": "Read one agent by id. The top level is the latest saved version, the editable head whose version you send back for optimistic concurrency; after a save with apply false it differs from active_version, and new sessions use active_version, which you read with version=active. With version, read a specific saved version. The response lists every native tool with its resolved configuration in one agent_toolset_20260401 entry, so it can be sent back unchanged to agents.update. Use agents.versions.list to enumerate versions.",
219
224
  "http": "GET",
220
225
  "path": "/agent/v1/agents/{agent_id}",
221
226
  "streaming": "no",
@@ -231,7 +236,7 @@ export const operations = [
231
236
  "name": "version",
232
237
  "type": "number",
233
238
  "required": false,
234
- "description": "Agent version to read; omit for the latest. Integer of at least 1; versions are listed by agents.versions.list."
239
+ "description": "Agent version to read; omit for the latest saved version. An integer of at least 1 (versions are listed by agents.versions.list), or the string active for the version new sessions use."
235
240
  }
236
241
  ]
237
242
  },
@@ -239,7 +244,7 @@ export const operations = [
239
244
  "resource": "agent.agents",
240
245
  "method": "update",
241
246
  "summary": "Update agent",
242
- "description": "Update an agent. Send the current version in the body for optimistic concurrency: a stale version returns 409, and an update that changes nothing keeps the version number. Any real change saves a new version; existing sessions keep the version they were created with. Omitted fields keep their value. multiagent takes null or a coordinator roster; subagent_model keeps its value when omitted and is cleared by null. Archived agents cannot be updated. Unlike Anthropic Managed Agents, nonempty skills attachments return 400; use the native skill tool for available runtime skills.",
247
+ "description": "Update an agent. Send the current version in the body for optimistic concurrency: a stale version returns 409, and an update that changes nothing keeps the version number. Any real change saves a new version. apply defaults to true and moves active_version to the new version, or to the latest when configuration is unchanged; apply false saves without applying. version_note optionally records up to 280 characters on a newly created version; null means no note, and a note sent when the request changes nothing else returns 400 because a note is stored only with a new version. Existing sessions and tokens keep their version. Omitted fields keep their value. multiagent takes null or a coordinator roster; subagent_model keeps its value when omitted and is cleared by null. Archived agents cannot be updated. tools: [] removes every tool, while tools: null returns 400 (tools cannot be null; send [] to remove every tool). On update, omit skills to keep them, send an array to replace them, or send [] or null to clear them. skills attaches uploaded custom skills as [{type: \"custom\", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send \"latest\", to use the skill's newest version when a session starts. type anthropic returns 400.",
243
248
  "http": "POST",
244
249
  "path": "/agent/v1/agents/{agent_id}",
245
250
  "streaming": "no",
@@ -277,7 +282,7 @@ export const operations = [
277
282
  "name": "model",
278
283
  "type": "object",
279
284
  "required": false,
280
- "description": "Model identifier. Accepts the\n[model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison),\ne.g. `claude-opus-5`, or a `model_config` object for additional configuration\ncontrol. Omit to preserve. Cannot be cleared."
285
+ "description": "A model id from the Praxis model catalog (`praxis.model.models.list`), or a `model_config` object for additional configuration control. Unlike Anthropic, Claude model ids other than those in the catalog are rejected."
281
286
  },
282
287
  {
283
288
  "name": "multiagent",
@@ -289,14 +294,14 @@ export const operations = [
289
294
  "name": "name",
290
295
  "type": "string",
291
296
  "required": false,
292
- "description": "Human-readable name. Must be non-empty. Omit to preserve. Cannot be\ncleared."
297
+ "description": "New display name, 1 to 256 characters after trimming, with no NUL or line breaks. A label, not a unique key; omit to keep the current name."
293
298
  },
294
299
  {
295
300
  "name": "skills",
296
301
  "type": "array",
297
302
  "itemType": "object",
298
303
  "required": false,
299
- "description": "Skill attachments are not supported: a nonempty array returns 400. Omit this field or send an empty array; the native skill tool is configured separately through tools."
304
+ "description": "Custom skills attached to the agent, each {type: \"custom\", skill_id, version?}: skill_id comes from skills.create or skills.list, at most 20 skills, no repeated skill_id. Omit version, or send \"latest\", to use the skill's newest version at the moment a session starts; a pinned version stays fixed. type anthropic returns 400: upload the skill and attach it as custom. On update, omit the field to keep the list, send an array to replace it, or send [] or null to clear it."
300
305
  },
301
306
  {
302
307
  "name": "system",
@@ -318,25 +323,23 @@ export const operations = [
318
323
  "description": "The agent's current version, used to prevent concurrent overwrites.\nObtain this value from a create or retrieve response. Must be at least 1 if\nspecified. When supplied, the request fails if it does not match the server's\ncurrent version; omit to apply the update unconditionally."
319
324
  },
320
325
  {
321
- "name": "databases",
322
- "type": "array",
323
- "itemType": "object",
326
+ "name": "apply",
327
+ "type": "boolean",
324
328
  "required": false,
325
- "description": "Replace this resource allowlist; omission preserves it, and null or [] clears it. Additions apply only to new sessions; disabling or removing a binding immediately revokes access in running sessions. Only service agents accept nonempty bindings."
329
+ "description": "Defaults to true: apply the newly saved version, or the latest version when configuration is unchanged. Set false to save without changing active_version. Unlike Managed Agents, saving and applying can be separate."
326
330
  },
327
331
  {
328
- "name": "vector_stores",
329
- "type": "array",
330
- "itemType": "object",
332
+ "name": "version_note",
333
+ "type": "string",
331
334
  "required": false,
332
- "description": "Replace this resource allowlist; omission preserves it, and null or [] clears it. Additions apply only to new sessions; disabling or removing a binding immediately revokes access in running sessions. Only service agents accept nonempty bindings."
335
+ "description": "Optional change explanation stored as note on the new immutable version, up to 280 characters. Omission or null stores no note. A note sent when nothing else changes returns 400 (nothing to save), because a note is stored only with a new version."
333
336
  },
334
337
  {
335
- "name": "files",
338
+ "name": "bindings",
336
339
  "type": "array",
337
340
  "itemType": "object",
338
341
  "required": false,
339
- "description": "Replace this resource allowlist; omission preserves it, and null or [] clears it. Additions apply only to new sessions; disabling or removing a binding immediately revokes access in running sessions. Only service agents accept nonempty bindings."
342
+ "description": "Replace the whole bindings list; omission preserves it, and null or [] clears it. Additions apply only to new sessions; once this version is applied, disabling, removing or downgrading a binding revokes it immediately in running sessions on older versions, while apply=false changes no access. Only service agents accept a nonempty list."
340
343
  },
341
344
  {
342
345
  "name": "kind",
@@ -386,6 +389,25 @@ export const operations = [
386
389
  "required": false,
387
390
  "description": "Praxis extension: switchable model ids on /agent/v1 only. The default model must be included. When omitted, only the default model is selectable."
388
391
  },
392
+ {
393
+ "name": "avatar",
394
+ "type": "string",
395
+ "required": false,
396
+ "description": "Avatar image of the agent: an absolute https URL of at most 2048 characters, without credentials; any other value returns 400 avatar must be an https URL. It is the default picture in agent lists, the agent detail, the chat header and embedded chat when the embed appearance sets none. Saved with the agent version like other configuration, so apply=false keeps the previous avatar in effect until that version is applied. Omit on create for no avatar; on update, omit to keep it and send null to clear it. Both personal and service agents accept it. /agent/v1 only; /anthropic neither accepts nor returns it."
397
+ },
398
+ {
399
+ "name": "environment_id",
400
+ "type": "string",
401
+ "required": false,
402
+ "description": "Default environment of a service agent: the environment_id a new session gets when it names none. Use light, node22 or the env_ id of an active environment of your organization; any other value returns 400 environment_id <id> was not found. null means no environment, so sessions are plain conversation without codemode or bash. Saved with the agent version like other configuration, so apply=false keeps the previous environment in effect for new sessions until that version is applied; a session that sets environment_id itself, null included, overrides it. Omit on create for light; on update, omit to keep it. Versions saved before this field existed read as light. Personal agents use a Computer: a non-null value returns 400 and the field is not returned. /agent/v1 only; /anthropic neither accepts nor returns it."
403
+ },
404
+ {
405
+ "name": "vault_ids",
406
+ "type": "array",
407
+ "itemType": "string",
408
+ "required": false,
409
+ "description": "Default vaults of a service agent: the vault_ids a new session gets when it names none, so the agent's credentials follow the version. At most 50 ids without duplicates; each must be a vault of your organization that is not archived, otherwise 400 vault_ids[<index>] <id> was not found. Saved with the agent version like other configuration, so apply=false keeps the previous vaults in effect for new sessions until that version is applied; a session that sets vault_ids itself, [] included, overrides it. Omit on create for []; on update, omit to keep the list and send an array to replace it as a whole. Versions saved before this field existed read as []. Embed tokens use the vault_ids of the version they pin; vault_ids on the embed policy is deprecated, still accepted and ignored. Personal agents get no default vaults: a non-empty value returns 400 and the field is not returned. /agent/v1 only; /anthropic neither accepts nor returns it."
410
+ },
389
411
  {
390
412
  "name": "preset",
391
413
  "type": "string",
@@ -417,6 +439,144 @@ export const operations = [
417
439
  ],
418
440
  "query": []
419
441
  },
442
+ {
443
+ "resource": "agent.agents.customers.auth.accessTokens",
444
+ "method": "create",
445
+ "summary": "Create customer access token",
446
+ "description": "Exchange a grant code, or the agent's publishable key for an anonymous visitor, for a customer access token that authorizes the agent's embedded sessions.\n\nNo Authorization header is required: the grant code or the publishable key is the credential. Agent Kit calls this from the browser, so send the page Origin. With grant_code, the code is consumed atomically: concurrent attempts have exactly one winner, and unknown, used, expired and other-agent codes all return the same 401 GRANT_CODE_INVALID. The sign-in starts now and lasts the code's max_session_seconds. Unlike Shopify, a visitor without an account gets a token too: send publishable_key instead and a new anonymous customer (anon_…) is created, bound to the request Origin, for 7 days. The access token lasts at most two hours and never outlives the sign-in; renew it with access_tokens/renew before expires_at. Both forms share the per-IP minute limit of anonymous issuance (default 20). Example body: {\"grant_code\":\"cgc_…\"}.",
447
+ "http": "POST",
448
+ "path": "/agent/v1/agents/{agent_id}/customers/auth/access_tokens",
449
+ "streaming": "no",
450
+ "pagination": false,
451
+ "pathParams": [
452
+ {
453
+ "name": "agent_id",
454
+ "sdkName": "agent_id"
455
+ }
456
+ ],
457
+ "query": [],
458
+ "body": {
459
+ "required": true,
460
+ "fields": []
461
+ }
462
+ },
463
+ {
464
+ "resource": "agent.agents.customers.auth.accessTokens",
465
+ "method": "deleteCurrent",
466
+ "summary": "Log out customer",
467
+ "description": "Log the customer out by revoking the sign-in of the presented access token and every token issued in it.\n\nSend the current customer access token as the Bearer credential, with no body, when the customer logs out of your site. Every token of the sign-in, including renewed ones, stops working, and their live event streams close; the customer's conversations are kept. Returns 204. Calling it again with the same token returns 401 ACCESS_TOKEN_REVOKED, so treat that as already logged out.",
468
+ "http": "DELETE",
469
+ "path": "/agent/v1/agents/{agent_id}/customers/auth/access_tokens/current",
470
+ "streaming": "no",
471
+ "pagination": false,
472
+ "pathParams": [
473
+ {
474
+ "name": "agent_id",
475
+ "sdkName": "agent_id"
476
+ }
477
+ ],
478
+ "query": []
479
+ },
480
+ {
481
+ "resource": "agent.agents.customers.auth.accessTokens.renew",
482
+ "method": "create",
483
+ "summary": "Renew customer access token",
484
+ "description": "Get a fresh customer access token in the same sign-in, authenticated with the current one.\n\nSend the current customer access token as the Bearer credential, with no body, a few minutes before expires_at. The new token keeps the version, budget, context, metadata and origin binding of the sign-in and lasts at most two hours, never past session_expires_at. Unlike Shopify, renewal does not revoke the presented token: it stays valid until its own expiry, so a reply that is streaming on it is not cut off. When less than 60 seconds of the sign-in remain, renewal returns 401 CUSTOMER_SESSION_EXPIRED; sign the customer in again with a new grant code from your backend. A token that was logged out or merged returns 401 ACCESS_TOKEN_REVOKED.",
485
+ "http": "POST",
486
+ "path": "/agent/v1/agents/{agent_id}/customers/auth/access_tokens/renew",
487
+ "streaming": "no",
488
+ "pagination": false,
489
+ "pathParams": [
490
+ {
491
+ "name": "agent_id",
492
+ "sdkName": "agent_id"
493
+ }
494
+ ],
495
+ "query": []
496
+ },
497
+ {
498
+ "resource": "agent.agents.customers.auth.grantCodes",
499
+ "method": "create",
500
+ "summary": "Create customer grant code",
501
+ "description": "Sign your logged-in customer in to a service agent from your backend with a one-time grant code that Agent Kit exchanges for a customer access token.\n\nCall this from your backend with your API key after your own login succeeds, then pass the returned code to Agent Kit in the browser; never call it from the browser. Customer authorization follows Shopify Storefront customer access tokens (Multipass-style sign-in, a short-lived token, renewal and logout), so that experience applies. customer_id is your own identifier for the customer: use an opaque id such as your database user id, not an email address or phone number. The value auth is reserved, and ids starting with anon_ are reserved for anonymous customers. The code works once and expires after expires_in seconds (default 900). The sign-in it starts lasts max_session_seconds (default 7 days); version, budget_cents, system_message, agent_override and metadata apply to every token of the sign-in. Unlike Shopify, origin binds the whole sign-in to one page origin, and anonymous_access_token merges the conversations of the anonymous visitor who chatted before signing in into this customer. Example body: {\"customer_id\":\"cus_8f2a91\",\"origin\":\"https://shop.example.com\"}.",
502
+ "http": "POST",
503
+ "path": "/agent/v1/agents/{agent_id}/customers/auth/grant_codes",
504
+ "streaming": "no",
505
+ "pagination": false,
506
+ "pathParams": [
507
+ {
508
+ "name": "agent_id",
509
+ "sdkName": "agent_id"
510
+ }
511
+ ],
512
+ "query": [],
513
+ "body": {
514
+ "required": true,
515
+ "fields": [
516
+ {
517
+ "name": "customer_id",
518
+ "type": "string",
519
+ "required": true,
520
+ "description": "Your stable, opaque identifier for the signed-in customer, such as your database user id. Do not use an email address or phone number. \"auth\" is reserved, and ids starting with anon_ are reserved for anonymous customers."
521
+ },
522
+ {
523
+ "name": "version",
524
+ "type": "integer",
525
+ "required": false,
526
+ "description": "Existing agent version that every token of this sign-in pins. Defaults to the agent's active_version when the code is issued."
527
+ },
528
+ {
529
+ "name": "budget_cents",
530
+ "type": "integer",
531
+ "required": false,
532
+ "description": "Budget in cents for each session the customer starts. Defaults to the embed policy session budget and cannot exceed its maximum."
533
+ },
534
+ {
535
+ "name": "system_message",
536
+ "type": "array",
537
+ "itemType": "object",
538
+ "required": false,
539
+ "description": "Optional context the agent receives at the start of each session, as text blocks, limited to 8192 UTF-8 bytes in total."
540
+ },
541
+ {
542
+ "name": "agent_override",
543
+ "type": "object",
544
+ "required": false,
545
+ "description": "Optional system prompt override, accepted only when the embed policy allows agent overrides."
546
+ },
547
+ {
548
+ "name": "metadata",
549
+ "type": "object",
550
+ "required": false,
551
+ "description": "Up to 16 string pairs copied onto every session the customer starts. The playground key is reserved."
552
+ },
553
+ {
554
+ "name": "origin",
555
+ "type": "string",
556
+ "required": false,
557
+ "description": "Page origin, such as https://shop.example.com, that must be one of the agent policy's allowed_origins (or localhost when the policy allows it). When set, every token of this sign-in works only from exactly this origin. Omit to accept any policy origin."
558
+ },
559
+ {
560
+ "name": "expires_in",
561
+ "type": "integer",
562
+ "required": false,
563
+ "description": "Seconds the code stays redeemable, from 60 to 86400. Defaults to 900."
564
+ },
565
+ {
566
+ "name": "max_session_seconds",
567
+ "type": "integer",
568
+ "required": false,
569
+ "description": "Total lifetime of the sign-in in seconds, from 3600 to 604800 (7 days). Tokens renew within it; after it the customer signs in again. Defaults to 604800."
570
+ },
571
+ {
572
+ "name": "anonymous_access_token",
573
+ "type": "string",
574
+ "required": false,
575
+ "description": "The current access token of the anonymous customer who used this agent before signing in. Their conversations become visible to the identified customer, and the anonymous sign-in ends at exchange."
576
+ }
577
+ ]
578
+ }
579
+ },
420
580
  {
421
581
  "resource": "agent.agents.endUsers",
422
582
  "method": "list",
@@ -607,7 +767,7 @@ export const operations = [
607
767
  "resource": "agent.agents.versions",
608
768
  "method": "list",
609
769
  "summary": "List agent versions",
610
- "description": "List the saved versions of one agent, in pages of at most 100 (default 20). Each item is the full agent definition at that version, so you can compare what changed between versions. Use agents.retrieve with version to read a single one; agent_id comes from agents.list or agents.create.",
770
+ "description": "List the saved versions of one agent, in pages of at most 100 (default 20). Each item is the full agent definition at that version, so you can compare what changed between versions. active is true only for the item that new sessions use; active_version on each item is the agent-level value, kept for compatibility. Use agents.retrieve with version to read a single one; agent_id comes from agents.list or agents.create.",
611
771
  "http": "GET",
612
772
  "path": "/agent/v1/agents/{agent_id}/versions",
613
773
  "streaming": "no",
@@ -633,11 +793,32 @@ export const operations = [
633
793
  }
634
794
  ]
635
795
  },
796
+ {
797
+ "resource": "agent.agents.versions",
798
+ "method": "apply",
799
+ "summary": "Apply Agent Version",
800
+ "description": "Apply a version from agents.versions.list by its version number. This idempotent operation changes active_version without creating a version; existing sessions and tokens keep their version. The response is the latest saved agent with its current active_version. Missing versions return 404 Agent version not found; archived agents return 409 Agent is archived. For example, POST /agent/v1/agents/{agent_id}/versions/2/apply with no body.",
801
+ "http": "POST",
802
+ "path": "/agent/v1/agents/{agent_id}/versions/{version}/apply",
803
+ "streaming": "no",
804
+ "pagination": false,
805
+ "pathParams": [
806
+ {
807
+ "name": "agent_id",
808
+ "sdkName": "agent_id"
809
+ },
810
+ {
811
+ "name": "version",
812
+ "sdkName": "version"
813
+ }
814
+ ],
815
+ "query": []
816
+ },
636
817
  {
637
818
  "resource": "agent.computers",
638
819
  "method": "list",
639
- "summary": "ComputersList",
640
- "description": "Tenant-owned durable computer resource.\n\nPraxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.",
820
+ "summary": "List Computers",
821
+ "description": "List the computers of your organization, archived ones included.\n\nPraxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.",
641
822
  "http": "GET",
642
823
  "path": "/agent/v1/computers",
643
824
  "streaming": "no",
@@ -661,8 +842,8 @@ export const operations = [
661
842
  {
662
843
  "resource": "agent.computers",
663
844
  "method": "create",
664
- "summary": "ComputersCreate",
665
- "description": "Tenant-owned durable computer resource.\n\nPraxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.",
845
+ "summary": "Create Computer",
846
+ "description": "Create a durable computer: a named machine whose files outlive sessions, for personal agents.\n\nPraxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.",
666
847
  "http": "POST",
667
848
  "path": "/agent/v1/computers",
668
849
  "streaming": "no",
@@ -707,8 +888,8 @@ export const operations = [
707
888
  {
708
889
  "resource": "agent.computers",
709
890
  "method": "retrieve",
710
- "summary": "ComputersRetrieve",
711
- "description": "Tenant-owned durable computer resource.\n\nPraxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.",
891
+ "summary": "Get Computer",
892
+ "description": "Read one computer's status, storage use and sandbox id.\n\nPraxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.",
712
893
  "http": "GET",
713
894
  "path": "/agent/v1/computers/{computer_id}",
714
895
  "streaming": "no",
@@ -724,8 +905,8 @@ export const operations = [
724
905
  {
725
906
  "resource": "agent.computers",
726
907
  "method": "update",
727
- "summary": "ComputersUpdate",
728
- "description": "Tenant-owned durable computer resource.\n\nPraxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.",
908
+ "summary": "Update Computer",
909
+ "description": "Rename a computer.\n\nPraxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.",
729
910
  "http": "POST",
730
911
  "path": "/agent/v1/computers/{computer_id}",
731
912
  "streaming": "no",
@@ -752,8 +933,8 @@ export const operations = [
752
933
  {
753
934
  "resource": "agent.computers",
754
935
  "method": "archive",
755
- "summary": "ComputersArchive",
756
- "description": "Tenant-owned durable computer resource.\n\nPraxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.",
936
+ "summary": "Archive Computer",
937
+ "description": "Archive a computer: its files stay readable but new sessions cannot use it.\n\nPraxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.",
757
938
  "http": "POST",
758
939
  "path": "/agent/v1/computers/{computer_id}/archive",
759
940
  "streaming": "no",
@@ -829,8 +1010,8 @@ export const operations = [
829
1010
  {
830
1011
  "resource": "agent.computers.files",
831
1012
  "method": "list",
832
- "summary": "ComputersFilesList",
833
- "description": "Tenant-owned durable computer resource.\n\nPraxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.",
1013
+ "summary": "List Computer Files",
1014
+ "description": "List the entries of one directory on a computer.\n\nPraxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.",
834
1015
  "http": "GET",
835
1016
  "path": "/agent/v1/computers/{computer_id}/files",
836
1017
  "streaming": "no",
@@ -853,8 +1034,8 @@ export const operations = [
853
1034
  {
854
1035
  "resource": "agent.computers.files",
855
1036
  "method": "retrieveContent",
856
- "summary": "ComputersFilesContent",
857
- "description": "Tenant-owned durable computer resource.\n\nPraxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.",
1037
+ "summary": "Get Computer File Content",
1038
+ "description": "Download the bytes of one file on a computer, up to 16 MiB, with single-range support.\n\nPraxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.",
858
1039
  "http": "GET",
859
1040
  "path": "/agent/v1/computers/{computer_id}/files/content",
860
1041
  "streaming": "no",
@@ -1569,7 +1750,7 @@ export const operations = [
1569
1750
  "resource": "agent.environments",
1570
1751
  "method": "create",
1571
1752
  "summary": "Create environment",
1572
- "description": "Create a tenant-owned cloud environment: a sandbox recipe (packages to install and networking policy) that sessions can select through environment_id. Package installation happens when the session's sandbox is created; a failed install terminates that session with ENVIRONMENT_PACKAGE_INSTALL_FAILED. Limited networking is applied at sandbox creation. Unlike Anthropic Managed Agents, self_hosted environments, scope and cross-session package caching are not supported.",
1753
+ "description": "Create a tenant-owned cloud environment: a sandbox recipe (packages to install and networking policy) that sessions can select through environment_id. Package installation happens when the session's sandbox is created; a failed install terminates that session with ENVIRONMENT_PACKAGE_INSTALL_FAILED. Limited networking is applied at sandbox creation. Unlike Anthropic Managed Agents, self_hosted environments, scope and cross-session package caching are not supported. config.template must name an available sandbox template, otherwise 400 lists the available ones.",
1573
1754
  "http": "POST",
1574
1755
  "path": "/agent/v1/environments",
1575
1756
  "streaming": "no",
@@ -1602,16 +1783,6 @@ export const operations = [
1602
1783
  "type": "object",
1603
1784
  "required": false,
1604
1785
  "description": "Free-form string key/value pairs."
1605
- },
1606
- {
1607
- "name": "scope",
1608
- "type": "string",
1609
- "enum": [
1610
- "organization",
1611
- "account"
1612
- ],
1613
- "required": false,
1614
- "description": "The visibility scope for this environment. 'organization' makes the\nenvironment visible to all accounts. 'account' restricts visibility to the\nowning account only. API organizations support only 'organization'; 'account' is\nrejected. If not specified, defaults based on organization type."
1615
1786
  }
1616
1787
  ]
1617
1788
  }
@@ -1637,7 +1808,7 @@ export const operations = [
1637
1808
  "resource": "agent.environments",
1638
1809
  "method": "update",
1639
1810
  "summary": "Update environment",
1640
- "description": "Update the configuration of a tenant-owned cloud environment. Built-in environments are read-only. Package installation and limited networking are applied when a session's sandbox is created. Omitted fields keep their value.",
1811
+ "description": "Update the configuration of a tenant-owned cloud environment. Built-in environments are read-only. Package installation and limited networking are applied when a session's sandbox is created. Omitted fields keep their value. A changed config.template must name an available sandbox template, otherwise 400 lists the available ones.",
1641
1812
  "http": "POST",
1642
1813
  "path": "/agent/v1/environments/{environment_id}",
1643
1814
  "streaming": "no",
@@ -1675,16 +1846,6 @@ export const operations = [
1675
1846
  "type": "string",
1676
1847
  "required": false,
1677
1848
  "description": "Updated name for the environment"
1678
- },
1679
- {
1680
- "name": "scope",
1681
- "type": "string",
1682
- "enum": [
1683
- "organization",
1684
- "account"
1685
- ],
1686
- "required": false,
1687
- "description": "The visibility scope for this environment. 'organization' makes the\nenvironment visible to all accounts. 'account' restricts visibility to the\nowning account only."
1688
1849
  }
1689
1850
  ]
1690
1851
  }
@@ -1693,7 +1854,7 @@ export const operations = [
1693
1854
  "resource": "agent.environments",
1694
1855
  "method": "archive",
1695
1856
  "summary": "Archive environment",
1696
- "description": "Soft-archive a tenant-owned cloud environment so it can no longer be used to create new sessions. Built-in environments are read-only and cannot be archived.",
1857
+ "description": "Soft-archive a tenant-owned cloud environment so it can no longer be used to create new sessions. Built-in environments are read-only and cannot be archived. An environment that the active version of a non-archived agent uses as environment_id returns 409 RESOURCE_IN_USE naming the agents; point them at another environment first.",
1697
1858
  "http": "POST",
1698
1859
  "path": "/agent/v1/environments/{environment_id}/archive",
1699
1860
  "streaming": "no",
@@ -1710,7 +1871,7 @@ export const operations = [
1710
1871
  "resource": "agent.sessions",
1711
1872
  "method": "list",
1712
1873
  "summary": "List sessions",
1713
- "description": "List sessions of the workspace behind your API key, newest first, in pages of at most 100 (default 20). Unlike Anthropic Managed Agents, only limit, page, agent_id and deployment_id are honored; the other filters declared here (agent_version, created_at ranges, memory_store_id, include_archived, order, statuses) are not supported and return 400. Use the returned id with sessions.retrieve or sessions.events.list; pass next_page as page for the next page.",
1874
+ "description": "List sessions of the workspace behind your API key, newest first, in pages of at most 100 (default 20). Archived sessions are hidden unless include_archived is true. Unlike Anthropic Managed Agents, only limit, page, agent_id, deployment_id and include_archived are honored; the other filters declared here (agent_version, created_at ranges, memory_store_id, order, statuses) are not supported and return 400. Use the returned id with sessions.retrieve or sessions.events.list; pass next_page as page for the next page.",
1714
1875
  "http": "GET",
1715
1876
  "path": "/agent/v1/sessions",
1716
1877
  "streaming": "no",
@@ -1739,7 +1900,7 @@ export const operations = [
1739
1900
  "name": "created_at[gte]",
1740
1901
  "type": "string",
1741
1902
  "required": false,
1742
- "description": "Created-at lower bound for sessions. Declared by the Managed Agents shape but not supported here: sessions.list honors only limit, page, agent_id and deployment_id, and other filters return 400."
1903
+ "description": "Created-at lower bound for sessions. Declared by the Managed Agents shape but not supported here: sessions.list honors only limit, page, agent_id, deployment_id and include_archived, and other filters return 400."
1743
1904
  },
1744
1905
  {
1745
1906
  "name": "created_at[lt]",
@@ -1751,7 +1912,7 @@ export const operations = [
1751
1912
  "name": "created_at[lte]",
1752
1913
  "type": "string",
1753
1914
  "required": false,
1754
- "description": "Created-at upper bound for sessions. Declared by the Managed Agents shape but not supported here: sessions.list honors only limit, page, agent_id and deployment_id, and other filters return 400."
1915
+ "description": "Created-at upper bound for sessions. Declared by the Managed Agents shape but not supported here: sessions.list honors only limit, page, agent_id, deployment_id and include_archived, and other filters return 400."
1755
1916
  },
1756
1917
  {
1757
1918
  "name": "deployment_id",
@@ -1767,7 +1928,7 @@ export const operations = [
1767
1928
  true
1768
1929
  ],
1769
1930
  "required": false,
1770
- "description": "Declared by the Managed Agents shape but not supported by sessions.list; sending it returns 400. Archived sessions are retrievable by id."
1931
+ "description": "Whether archived sessions are listed: true includes them, false (the default) hides them. A value other than true or false returns 400. Archived sessions stay retrievable by id either way."
1771
1932
  },
1772
1933
  {
1773
1934
  "name": "memory_store_id",
@@ -1835,7 +1996,7 @@ export const operations = [
1835
1996
  "resource": "agent.sessions",
1836
1997
  "method": "create",
1837
1998
  "summary": "Create session",
1838
- "description": "Create a session: one conversation with an agent. Pass agent as an agent id (latest version) or {id, version, type:\"agent\"}. Unlike Anthropic Managed Agents, omit environment_id to get a light machine, unless computer_id (explicit, or the agent's default) selects a Computer; pass an environment id for a sandbox recipe. For service agents, omission returns environment_id=light; explicit null allocates no machine, so codemode, bash and other machine tools are unavailable. Optional model must be one of the agent's allowed models; optional thinking is {effort: low|medium|high|xhigh|max|none} or null, where null inherits the agent default and then the model default (none requires the model to allow disabling thinking). Selections are saved before initial_events run; invalid ones return 400 invalid_request_error. Inline agent overrides are not supported. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. Omitted budget defaults to USD 20; null removes the limit, and a limit object uses a positive integer string of USD cents. Up to 500 file resources can be attached. Use initial_events to send a first user.message in this request, or send messages afterwards with sessions.events.send. The returned status can still be idle before initial events run; read agent.message and the subsequent session.status_idle event to confirm completion.",
1999
+ "description": "Create a session: one conversation with an agent. Pass agent as an agent id or {type:\"agent\", id, version?}; an id alone, or an object without version, pins the agent's active_version (the version chosen with agents.versions.apply, not necessarily the newest saved one). Unlike Anthropic Managed Agents, omit environment_id to use the default environment saved in the agent version (light for a new agent), unless computer_id (explicit, or the agent's default) selects a Computer; pass an environment id for a sandbox recipe. For service agents, explicit null allocates no machine, so codemode, bash and other machine tools are unavailable. Optional model must be one of the agent's allowed models; optional thinking is {effort: low|medium|high|xhigh|max|none} or null, where null inherits the agent default and then the model default (none requires the model to allow disabling thinking). Selections are saved before initial_events run; invalid ones return 400 invalid_request_error. Unlike Anthropic Managed Agents, the only inline agent override is system ({type:\"agent_with_overrides\", id, system}); to change the model, tools, MCP servers or skills, save a version instead. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. budget is {type:\"limit\", max_list_cost:{amount, currency:\"USD\"}} where amount is a positive integer string of US cents (\"2000\" is USD 20.00); omitted budget defaults to \"2000\" and null removes the limit. Up to 500 file resources can be attached. Use initial_events to send a first user.message in this request, or send messages afterwards with sessions.events.send. The returned status can still be idle before initial events run; read agent.message and the subsequent session.status_idle event to confirm completion.",
1839
2000
  "http": "POST",
1840
2001
  "path": "/agent/v1/sessions",
1841
2002
  "streaming": "no",
@@ -1849,19 +2010,19 @@ export const operations = [
1849
2010
  "name": "agent",
1850
2011
  "type": "object",
1851
2012
  "required": true,
1852
- "description": "Agent identifier. Accepts the `agent` ID string, which pins the\nlatest version for the session, or an `agent` object with both id and version\nspecified."
2013
+ "description": "The agent to run: an agent id string, or {type: \"agent\", id, version?}. An id alone, or an object without version, pins the agent's active_version at the moment the session is created (the version chosen with agents.versions.apply, not necessarily the newest saved one); version pins that exact version. Unlike Managed Agents, the only inline override is a system prompt ({type: \"agent_with_overrides\", id, system}); to change the model, tools, MCP servers or skills, save a version instead."
1853
2014
  },
1854
2015
  {
1855
2016
  "name": "environment_id",
1856
2017
  "type": "string",
1857
2018
  "required": false,
1858
- "description": "Execution environment id from agent.environments.list or agent.environments.create. For a service agent, omission selects the built-in light environment and returns session.environment_id=light; explicit null allocates no machine and makes machine tools, including codemode and bash, unavailable. Personal agents use their selected Computer."
2019
+ "description": "Execution environment id from agent.environments.list or agent.environments.create. For a service agent, omission uses the default environment saved in the agent version (light for a new agent) and returns it as session.environment_id; explicit null allocates no machine and makes machine tools, including codemode and bash, unavailable. Personal agents use their selected Computer."
1859
2020
  },
1860
2021
  {
1861
2022
  "name": "budget",
1862
2023
  "type": "object",
1863
2024
  "required": false,
1864
- "description": "Session spending limit in USD cents; null when unlimited. Creation defaults to USD 20 when omitted. A limit amount is a positive integer string; removing a limit with null prevents setting it again for that session."
2025
+ "description": "Session spending limit, {type: \"limit\", max_list_cost: {amount, currency}}; null when unlimited. Creation defaults to a limit of 2000 US cents (USD 20.00) when omitted. amount is a positive integer string of US cents; removing the limit with null prevents setting it again for that session."
1865
2026
  },
1866
2027
  {
1867
2028
  "name": "initial_events",
@@ -1982,12 +2143,6 @@ export const operations = [
1982
2143
  "body": {
1983
2144
  "required": true,
1984
2145
  "fields": [
1985
- {
1986
- "name": "agent",
1987
- "type": "object",
1988
- "required": false,
1989
- "description": "Agent definition the session uses after the change; null when unchanged."
1990
- },
1991
2146
  {
1992
2147
  "name": "budget",
1993
2148
  "type": "object",
@@ -2721,6 +2876,225 @@ export const operations = [
2721
2876
  }
2722
2877
  ]
2723
2878
  },
2879
+ {
2880
+ "resource": "agent.skills",
2881
+ "method": "list",
2882
+ "summary": "List skills",
2883
+ "description": "List the skills uploaded to your organization, newest first, in pages of at most 100 (default 20). Use it to find a skill id before reading, versioning or deleting it. Only source=custom has content; source=anthropic returns an empty list. Pass next_page from the response as page to read the next page; a null next_page means the end.",
2884
+ "http": "GET",
2885
+ "path": "/agent/v1/skills",
2886
+ "streaming": "no",
2887
+ "pagination": false,
2888
+ "pathParams": [],
2889
+ "query": [
2890
+ {
2891
+ "name": "source",
2892
+ "type": "string",
2893
+ "required": false,
2894
+ "description": "Filter skills by source.\n\nIf provided, only skills from the specified source will be returned:\n\n- `\"custom\"`: only return user-created skills\n- `\"anthropic\"`: only return Anthropic-created skills"
2895
+ },
2896
+ {
2897
+ "name": "limit",
2898
+ "type": "number",
2899
+ "required": false,
2900
+ "description": "Number of items per page."
2901
+ },
2902
+ {
2903
+ "name": "page",
2904
+ "type": "string",
2905
+ "required": false,
2906
+ "description": "Opaque pagination cursor: pass the next_page value of the previous response unchanged. Omit it for the first page. A cursor from a different query or a malformed one returns 400."
2907
+ }
2908
+ ]
2909
+ },
2910
+ {
2911
+ "resource": "agent.skills",
2912
+ "method": "create",
2913
+ "summary": "Create skill",
2914
+ "description": "Upload a skill: a directory that contains SKILL.md, which the agent reads when it needs the skill. Send multipart/form-data with one files part per file, each file name being its path under one top-level directory (pdf/SKILL.md, pdf/scripts/run.py), and an optional display_name. SKILL.md frontmatter needs a description; name defaults to the directory name and must be one folder name (1-255 characters, no \"/\", backslash or NUL, not \".\" or \"..\"), otherwise the upload returns 400 stating the allowed form. Limits: 8 MB in total, at most 200 files, no .. segments, absolute paths or empty names; a violation returns 400 naming the path or field. The upload creates the skill and its first version, and versions are immutable. Attach the skill to an agent with `skills` on the agent.",
2915
+ "http": "POST",
2916
+ "path": "/agent/v1/skills",
2917
+ "streaming": "no",
2918
+ "pagination": false,
2919
+ "multipart": true,
2920
+ "pathParams": [],
2921
+ "query": [],
2922
+ "body": {
2923
+ "required": true,
2924
+ "fields": [
2925
+ {
2926
+ "name": "files",
2927
+ "type": "array",
2928
+ "itemType": "string",
2929
+ "required": true,
2930
+ "description": "Files to upload for the skill.\n\nAll files must be in the same top-level directory and must include a SKILL.md\nfile at the root of that directory."
2931
+ },
2932
+ {
2933
+ "name": "display_name",
2934
+ "type": "string",
2935
+ "required": false,
2936
+ "description": "Human-readable, single-line label for the Skill. Maximum 255\ncharacters. Always set: derived from the SKILL.md frontmatter `name` when\nomitted at creation. Not unique."
2937
+ }
2938
+ ]
2939
+ }
2940
+ },
2941
+ {
2942
+ "resource": "agent.skills",
2943
+ "method": "delete",
2944
+ "summary": "Delete skill",
2945
+ "description": "Delete a skill together with all of its versions. A skill that is still attached to an agent returns 409 RESOURCE_IN_USE naming up to 10 agent ids (the active or latest version of a non-archived agent counts); remove it from those agents first. Returns {id, type: skill_deleted}. skill_id comes from skills.create or skills.list.",
2946
+ "http": "DELETE",
2947
+ "path": "/agent/v1/skills/{skill_id}",
2948
+ "streaming": "no",
2949
+ "pagination": false,
2950
+ "pathParams": [
2951
+ {
2952
+ "name": "skill_id",
2953
+ "sdkName": "skill_id"
2954
+ }
2955
+ ],
2956
+ "query": []
2957
+ },
2958
+ {
2959
+ "resource": "agent.skills",
2960
+ "method": "retrieve",
2961
+ "summary": "Get skill",
2962
+ "description": "Read one skill by id: its display_name, source and latest_version_id. skill_id comes from skills.create or skills.list. A skill of another organization, or a deleted one, returns 404 Skill not found.",
2963
+ "http": "GET",
2964
+ "path": "/agent/v1/skills/{skill_id}",
2965
+ "streaming": "no",
2966
+ "pagination": false,
2967
+ "pathParams": [
2968
+ {
2969
+ "name": "skill_id",
2970
+ "sdkName": "skill_id"
2971
+ }
2972
+ ],
2973
+ "query": []
2974
+ },
2975
+ {
2976
+ "resource": "agent.skills.versions",
2977
+ "method": "list",
2978
+ "summary": "List skill versions",
2979
+ "description": "List the live versions of one skill, newest first, in pages of at most 100 (default 20). Each item carries the name and description read from the SKILL.md of that version. Pass next_page from the response as page to read the next page; a null next_page means the end.",
2980
+ "http": "GET",
2981
+ "path": "/agent/v1/skills/{skill_id}/versions",
2982
+ "streaming": "no",
2983
+ "pagination": false,
2984
+ "pathParams": [
2985
+ {
2986
+ "name": "skill_id",
2987
+ "sdkName": "skill_id"
2988
+ }
2989
+ ],
2990
+ "query": [
2991
+ {
2992
+ "name": "limit",
2993
+ "type": "number",
2994
+ "required": false,
2995
+ "description": "Number of items per page."
2996
+ },
2997
+ {
2998
+ "name": "page",
2999
+ "type": "string",
3000
+ "required": false,
3001
+ "description": "Opaque pagination cursor: pass the next_page value of the previous response unchanged. Omit it for the first page. A cursor from a different query or a malformed one returns 400."
3002
+ }
3003
+ ]
3004
+ },
3005
+ {
3006
+ "resource": "agent.skills.versions",
3007
+ "method": "create",
3008
+ "summary": "Create skill version",
3009
+ "description": "Upload a new version of a skill with the same multipart/form-data shape and limits as skills.create (8 MB, 200 files, one top-level directory containing SKILL.md). The SKILL.md name must equal the name of the skill; a different name returns 400. The new version becomes latest_version_id of the skill, and earlier versions stay unchanged because versions are immutable. Attach it to an agent with `skills` on the agent.",
3010
+ "http": "POST",
3011
+ "path": "/agent/v1/skills/{skill_id}/versions",
3012
+ "streaming": "no",
3013
+ "pagination": false,
3014
+ "multipart": true,
3015
+ "pathParams": [
3016
+ {
3017
+ "name": "skill_id",
3018
+ "sdkName": "skill_id"
3019
+ }
3020
+ ],
3021
+ "query": [],
3022
+ "body": {
3023
+ "required": true,
3024
+ "fields": [
3025
+ {
3026
+ "name": "files",
3027
+ "type": "array",
3028
+ "itemType": "string",
3029
+ "required": true,
3030
+ "description": "Files to upload for the skill.\n\nAll files must be in the same top-level directory and must include a SKILL.md\nfile at the root of that directory."
3031
+ }
3032
+ ]
3033
+ }
3034
+ },
3035
+ {
3036
+ "resource": "agent.skills.versions",
3037
+ "method": "delete",
3038
+ "summary": "Delete skill version",
3039
+ "description": "Soft-delete one version of a skill so it can no longer be read or downloaded; latest_version_id of the skill falls back to the newest remaining version. Returns {id, type: skill_version_deleted}. A skill keeps at least one version: deleting the last remaining version returns 409 SKILL_LAST_VERSION (delete the skill instead), so latest_version_id is never null. A version that a non-archived agent pins returns 409 RESOURCE_IN_USE naming the agents.",
3040
+ "http": "DELETE",
3041
+ "path": "/agent/v1/skills/{skill_id}/versions/{version}",
3042
+ "streaming": "no",
3043
+ "pagination": false,
3044
+ "pathParams": [
3045
+ {
3046
+ "name": "skill_id",
3047
+ "sdkName": "skill_id"
3048
+ },
3049
+ {
3050
+ "name": "version",
3051
+ "sdkName": "version"
3052
+ }
3053
+ ],
3054
+ "query": []
3055
+ },
3056
+ {
3057
+ "resource": "agent.skills.versions",
3058
+ "method": "retrieve",
3059
+ "summary": "Get skill version",
3060
+ "description": "Read one version of a skill: its name, description and created_at as read from SKILL.md. version is the id returned by skills.versions.create or skills.versions.list. A deleted or unknown version returns 404 Skill version not found.",
3061
+ "http": "GET",
3062
+ "path": "/agent/v1/skills/{skill_id}/versions/{version}",
3063
+ "streaming": "no",
3064
+ "pagination": false,
3065
+ "pathParams": [
3066
+ {
3067
+ "name": "skill_id",
3068
+ "sdkName": "skill_id"
3069
+ },
3070
+ {
3071
+ "name": "version",
3072
+ "sdkName": "version"
3073
+ }
3074
+ ],
3075
+ "query": []
3076
+ },
3077
+ {
3078
+ "resource": "agent.skills.versions",
3079
+ "method": "retrieveContent",
3080
+ "summary": "Download skill version",
3081
+ "description": "Download the content of one version as a zip archive (application/zip): the uploaded directory with its top-level folder and every file. version is the id returned by skills.versions.create or skills.versions.list; a deleted version returns 404.",
3082
+ "http": "GET",
3083
+ "path": "/agent/v1/skills/{skill_id}/versions/{version}/content",
3084
+ "streaming": "no",
3085
+ "pagination": false,
3086
+ "pathParams": [
3087
+ {
3088
+ "name": "skill_id",
3089
+ "sdkName": "skill_id"
3090
+ },
3091
+ {
3092
+ "name": "version",
3093
+ "sdkName": "version"
3094
+ }
3095
+ ],
3096
+ "query": []
3097
+ },
2724
3098
  {
2725
3099
  "resource": "agent.toolsets",
2726
3100
  "method": "list",
@@ -3563,13 +3937,13 @@ export const operations = [
3563
3937
  "name": "namespace",
3564
3938
  "type": "string",
3565
3939
  "required": true,
3566
- "description": "Choose a namespace without prior registration; praxis is read-only. Folded to lowercase; matches [a-z0-9][a-z0-9._-]{0,63}."
3940
+ "description": "Choose a namespace without prior registration; praxis is reserved for built-in Actions. Folded to lowercase; matches [a-z0-9][a-z0-9_-]{0,63}."
3567
3941
  },
3568
3942
  {
3569
3943
  "name": "name",
3570
3944
  "type": "string",
3571
3945
  "required": true,
3572
- "description": "Name, folded to lowercase; matches [a-z0-9][a-z0-9._-]{0,63}."
3946
+ "description": "Name, folded to lowercase; matches [a-z0-9][a-z0-9_-]{0,63}."
3573
3947
  },
3574
3948
  {
3575
3949
  "name": "description",
@@ -3632,8 +4006,8 @@ export const operations = [
3632
4006
  {
3633
4007
  "resource": "automation.actions",
3634
4008
  "method": "retrieve",
3635
- "summary": "Get an action",
3636
- "description": "Read the action and its full current implementation. The response ETag is the current revision ID for conditional updates.",
4009
+ "summary": "Get an Action with its current input and output JSON Schemas",
4010
+ "description": "Read the Action and its full current implementation, with input and output JSON Schemas at current_revision.input_schema and current_revision.output_schema. To read a built-in Action, use ns=praxis and name=<bare name>, for example name=ocr; invoke it in a script with call(\"ocr\", input). The response ETag is the current revision ID for conditional updates.",
3637
4011
  "http": "GET",
3638
4012
  "path": "/automation/v1/actions/{ns}/{name}",
3639
4013
  "streaming": "no",
@@ -4207,8 +4581,8 @@ export const operations = [
4207
4581
  {
4208
4582
  "resource": "automation.runs",
4209
4583
  "method": "create",
4210
- "summary": "Create a run",
4211
- "description": "Execute a published script or workflow with target, or test unpublished code directly with source and language (ts for TypeScript, yaml for workflow YAML), without first saving or publishing a definition. target and source are mutually exclusive; target accepts ns/name@version, @tag or @range and defaults to latest when @ is omitted. Source/input validation precedes run creation, so a separate validate call is optional. input defaults to {} and must match the input schema and fit within 1 MiB. wait is 0–60 seconds (default 0): a terminal run returns 200, otherwise 202. Use the returned id with praxis.automation.runs.retrieve and inspect status, output and error; acceptance does not mean successful completion. Idempotency-Key is scoped to tenant, method and path for 24 hours, excluding wait from the fingerprint; replay returns the current run with Idempotent-Replayed: true, changed contents return 422 and an in-flight request returns 409. New non-deterministic run IDs contain 78 characters (run_ + 10-character base36 millisecond timestamp + 64-character hexadecimal DO ID), compared with 46 for legacy random IDs. Historical and deterministic IDs remain valid; same-millisecond order is not guaranteed. Minimal body: {\"source\":\"export default async () => ({ok: true});\",\"language\":\"ts\",\"wait\":10}.",
4584
+ "summary": "Run a published target or execute draft source",
4585
+ "description": "Execute a published script or workflow with target, or test unpublished code directly with source and language (ts for TypeScript, yaml for workflow YAML), without first saving or publishing a definition. Minimal script: `export default async ({ file_id }: { file_id: string }) => { const result = await call(\"ocr\", { document: { type: \"file\", file_id } }); return result; }`; send it as source with language=\"ts\", input={\"file_id\":\"<uploaded file ID>\"} and wait=0, using a PDF or image already uploaded to your account. To call a platform API directly in the same script, use the praxis SDK object, for example `praxis.model.ocr.create({ body: { model: \"glm-ocr\", document: { type: \"file\", file_id } } })`; Action IDs are strings passed to call(), not SDK methods such as praxis.ocr(...). praxis, call, invoke, console and codemode are module-scope bindings, not on globalThis, and need no import; invoke(\"namespace/name\", input) starts a child run. target and source are mutually exclusive; target accepts ns/name@version, @tag or @range and defaults to latest when @ is omitted. Source/input validation precedes run creation, so a separate validate call is optional. input defaults to {} and must match the input schema and fit within 1 MiB. wait is 0–60 seconds (default 0): a terminal run returns 200, otherwise 202. Use the returned id with praxis.automation.runs.retrieve and inspect status, output and error; acceptance does not mean successful completion. For long-running, background or batch work, use wait: 0 and poll the run, or split work into child runs or a workflow; wait only controls the response wait and does not extend execution limits. Actions time out after 30 s (run-sandbox after 10 min); scripts have a 5 min wall-clock limit and a 30 s CPU limit; workflows default to 24 h and allow up to 7 days. Each run can start at most 100 child runs, with at most 20 active at once; nesting depth is limited to 10. Idempotency-Key is scoped to tenant, method and path for 24 hours, excluding wait from the fingerprint; replay returns the current run with Idempotent-Replayed: true, changed contents return 422 and an in-flight request returns 409. New non-deterministic run IDs contain 78 characters, compared with 46 for legacy random IDs; treat IDs as opaque strings. Historical and deterministic IDs remain valid; same-millisecond order is not guaranteed.",
4212
4586
  "http": "POST",
4213
4587
  "path": "/automation/v1/runs",
4214
4588
  "streaming": "no",
@@ -4686,7 +5060,7 @@ export const operations = [
4686
5060
  "resource": "automation.scripts",
4687
5061
  "method": "create",
4688
5062
  "summary": "Create a script",
4689
- "description": "Save a TypeScript script as an editable draft for later reuse; this does not publish or start a run. Choose your own namespace without registering it first; praxis is read-only. Scripts and workflows share names within the tenant; a duplicate returns NAME_TAKEN. The draft is a source string with a default-exported function, for example `export default async (input: {name: string}) => ({greeting: \"Hello, \" + input.name});`. To test it, pass that source and language=ts to praxis.automation.runs.create without publishing. To publish later, use the returned draft.revision as expected_draft_revision.",
5063
+ "description": "Save a TypeScript script as an editable draft for later reuse; this does not publish or start a run. Choose your own namespace without registering it first; praxis is reserved for built-in Actions. Scripts and workflows share names within the tenant; a duplicate returns NAME_TAKEN. The draft is a source string with a default-exported function, for example `export default async (input: {name: string}) => ({greeting: \"Hello, \" + input.name});`. Scripts provide praxis, call, invoke, console and codemode as module-scope bindings, not on globalThis, with no import needed: praxis.<domain>.<resource>.<method>(...) calls a platform API, call(\"ocr\", input) calls a built-in Action, and invoke(\"namespace/name\", input) starts a child run. Action IDs are strings (bare names for built-ins, namespace/name for your own Actions); praxis.ocr(...) does not exist. To test it, pass that source and language=ts to praxis.automation.runs.create without publishing. To publish later, use the returned draft.revision as expected_draft_revision.",
4690
5064
  "http": "POST",
4691
5065
  "path": "/automation/v1/scripts",
4692
5066
  "streaming": "no",
@@ -4700,13 +5074,13 @@ export const operations = [
4700
5074
  "name": "namespace",
4701
5075
  "type": "string",
4702
5076
  "required": true,
4703
- "description": "Choose a namespace without prior registration; praxis is read-only. Folded to lowercase; matches [a-z0-9][a-z0-9._-]{0,63}."
5077
+ "description": "Choose a namespace without prior registration; praxis is reserved for built-in Actions. Folded to lowercase; matches [a-z0-9][a-z0-9_-]{0,63}."
4704
5078
  },
4705
5079
  {
4706
5080
  "name": "name",
4707
5081
  "type": "string",
4708
5082
  "required": true,
4709
- "description": "Name, folded to lowercase; matches [a-z0-9][a-z0-9._-]{0,63}."
5083
+ "description": "Name, folded to lowercase; matches [a-z0-9][a-z0-9_-]{0,63}."
4710
5084
  },
4711
5085
  {
4712
5086
  "name": "description",
@@ -4754,7 +5128,7 @@ export const operations = [
4754
5128
  "resource": "automation.scripts",
4755
5129
  "method": "update",
4756
5130
  "summary": "Update a script draft",
4757
- "description": "Update description, labels or draft with the current draft revision in If-Match. Even metadata-only updates create a new draft revision.",
5131
+ "description": "Update description, labels or draft with the current draft revision in If-Match. Even metadata-only updates create a new draft revision. Scripts provide praxis, call, invoke, console and codemode as module-scope bindings, not on globalThis, with no import needed: praxis.<domain>.<resource>.<method>(...) calls a platform API, call(\"ocr\", input) calls a built-in Action, and invoke(\"namespace/name\", input) starts a child run. Action IDs are strings (bare names for built-ins, namespace/name for your own Actions); praxis.ocr(...) does not exist.",
4758
5132
  "http": "PATCH",
4759
5133
  "path": "/automation/v1/scripts/{ns}/{name}",
4760
5134
  "streaming": "no",
@@ -5708,7 +6082,7 @@ export const operations = [
5708
6082
  "resource": "automation.workflows",
5709
6083
  "method": "create",
5710
6084
  "summary": "Create a workflow",
5711
- "description": "Save a YAML workflow as an editable draft without publishing or starting a run. Choose your own namespace without registering it first; praxis is read-only. To test the draft, send its source and language=yaml to praxis.automation.runs.create. Scripts and workflows share names within the tenant; a duplicate returns NAME_TAKEN. run.workflow accepts ns/name@range or {namespace, name, version, input}; run.script uses the same reference shape as a platform extension. Object namespace, name and version are required; version accepts an exact version, dist-tag or range, locked at publication. Object input defaults to {} and supports expressions; string references retain task-level with. run.await defaults to true and returns the child output. With false, the child uses detach and the task immediately returns {run_id}; parent cancellation does not cascade. Inline script.code returns DEFINITION_INVALID with a detail asking you to save a script and reference it first. raise.error retains its type URI, status, title and detail in the run error.",
6085
+ "description": "Save a YAML workflow as an editable draft without publishing or starting a run. Choose your own namespace without registering it first; praxis is reserved for built-in Actions. To test the draft, send its source and language=yaml to praxis.automation.runs.create. Scripts and workflows share names within the tenant; a duplicate returns NAME_TAKEN. run.workflow accepts ns/name@range or {namespace, name, version, input}; run.script uses the same reference shape as a platform extension. Object namespace, name and version are required; version accepts an exact version, dist-tag or range, locked at publication. Object input defaults to {} and supports expressions; string references retain task-level with. run.await defaults to true and returns the child output. With false, the child uses detach and the task immediately returns {run_id}; parent cancellation does not cascade. Inline script.code returns DEFINITION_INVALID with a detail asking you to save a script and reference it first. raise.error retains its type URI, status, title and detail in the run error.",
5712
6086
  "http": "POST",
5713
6087
  "path": "/automation/v1/workflows",
5714
6088
  "streaming": "no",
@@ -5722,13 +6096,13 @@ export const operations = [
5722
6096
  "name": "namespace",
5723
6097
  "type": "string",
5724
6098
  "required": true,
5725
- "description": "Choose a namespace without prior registration; praxis is read-only. Folded to lowercase; matches [a-z0-9][a-z0-9._-]{0,63}."
6099
+ "description": "Choose a namespace without prior registration; praxis is reserved for built-in Actions. Folded to lowercase; matches [a-z0-9][a-z0-9_-]{0,63}."
5726
6100
  },
5727
6101
  {
5728
6102
  "name": "name",
5729
6103
  "type": "string",
5730
6104
  "required": true,
5731
- "description": "Name, folded to lowercase; matches [a-z0-9][a-z0-9._-]{0,63}."
6105
+ "description": "Name, folded to lowercase; matches [a-z0-9][a-z0-9_-]{0,63}."
5732
6106
  },
5733
6107
  {
5734
6108
  "name": "description",