@deepraxis/sdk 0.1.1-dev.d25d171 → 0.1.1-dev.d775f1e

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.
@@ -106,7 +106,7 @@ export const operations = [
106
106
  "name": "multiagent",
107
107
  "type": "object",
108
108
  "required": false,
109
- "description": "A coordinator topology: the session's primary thread orchestrates\nwork by spawning session threads, each running an agent drawn from the `agents`\nroster."
109
+ "description": "Coordinator roster. A bare string agent id is equivalent to {type: \"agent\", id}; omitting its version pins the referenced agent's current saved version when this roster is saved. {type: \"self\"} refers to this agent. Specify a concrete version to pin it explicitly."
110
110
  },
111
111
  {
112
112
  "name": "skills",
@@ -133,7 +133,7 @@ export const operations = [
133
133
  "type": "array",
134
134
  "itemType": "object",
135
135
  "required": false,
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."
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. Saving checks added or changed database, vector_store, media_library and file bindings in the organization: unknown or deleted ids return 400. If an owner is unavailable or takes more than 3 seconds, saving succeeds with verified=false for the affected bindings. Unchanged bindings keep their previous verification result and are not rechecked. workflow and script ids are not verified at save time."
137
137
  },
138
138
  {
139
139
  "name": "kind",
@@ -157,6 +157,12 @@ export const operations = [
157
157
  "required": false,
158
158
  "description": "Praxis extension: default subagent model ID, pinned in the agent revision. Call model overrides this; otherwise it overrides the roster member model or the parent model for built-ins. Null clears the default. /agent/v1 only."
159
159
  },
160
+ {
161
+ "name": "image_model",
162
+ "type": "string",
163
+ "required": false,
164
+ "description": "Model used by the imagine image tool; defaults to gpt-image-2 when unset. Only models that can generate images are accepted. Omit to preserve; null clears the configured model. /agent/v1 only."
165
+ },
160
166
  {
161
167
  "name": "subagents",
162
168
  "type": "array",
@@ -220,7 +226,7 @@ export const operations = [
220
226
  "resource": "agent.agents",
221
227
  "method": "retrieve",
222
228
  "summary": "Get agent",
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.",
229
+ "description": "Read the agent configuration currently effective for new sessions. By default, version equals active_version and latest_version identifies the newest saved version, including an unapplied save. Use latest_version for optimistic concurrency when updating. Pass version as a positive integer to read that saved version; version=active is equivalent to omission. The response lists every native tool with its resolved configuration in one agent_toolset_20260401 entry, so tools can be sent back unchanged to agents.update. Use agents.versions.list to enumerate saved versions.",
224
230
  "http": "GET",
225
231
  "path": "/agent/v1/agents/{agent_id}",
226
232
  "streaming": "no",
@@ -237,7 +243,7 @@ export const operations = [
237
243
  "name": "version",
238
244
  "type": "number",
239
245
  "required": false,
240
- "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."
246
+ "description": "Agent version to read. Omit, or send active, for the currently effective version used by new sessions. Send an integer of at least 1 from agents.versions.list to read that saved version. The default response also includes latest_version, the newest saved version number."
241
247
  }
242
248
  ]
243
249
  },
@@ -245,7 +251,7 @@ export const operations = [
245
251
  "resource": "agent.agents",
246
252
  "method": "update",
247
253
  "summary": "Update agent",
248
- "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.",
254
+ "description": "Save configuration changes as a new immutable version. Send latest_version from a default retrieve or update response as the request version for optimistic concurrency; a stale value returns 409. apply defaults to true and makes the new version effective; apply false saves without changing active_version. The response contains the effective configuration, with version equal to active_version and latest_version naming the newest saved version. An unchanged configuration, including a note-only update, is a no-op returning 200 and the current effective version without creating or activating a version. version_note records up to 280 characters only when a configuration change creates a new version; null is equivalent to omission. Use agents.versions.apply to activate an existing saved 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.",
249
255
  "http": "POST",
250
256
  "path": "/agent/v1/agents/{agent_id}",
251
257
  "streaming": "no",
@@ -290,7 +296,7 @@ export const operations = [
290
296
  "name": "multiagent",
291
297
  "type": "object",
292
298
  "required": false,
293
- "description": "A coordinator topology: the session's primary thread orchestrates\nwork by spawning session threads, each running an agent drawn from the `agents`\nroster."
299
+ "description": "Coordinator roster. A bare string agent id is equivalent to {type: \"agent\", id}; omitting its version pins the referenced agent's current saved version when this roster is saved. {type: \"self\"} refers to this agent. Specify a concrete version to pin it explicitly."
294
300
  },
295
301
  {
296
302
  "name": "name",
@@ -322,19 +328,19 @@ export const operations = [
322
328
  "name": "version",
323
329
  "type": "number",
324
330
  "required": false,
325
- "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."
331
+ "description": "Newest saved version used for optimistic concurrency. Obtain latest_version from the default retrieve or update response, or version from versions.list. A stale value returns 409; omit for an unconditional update."
326
332
  },
327
333
  {
328
334
  "name": "apply",
329
335
  "type": "boolean",
330
336
  "required": false,
331
- "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."
337
+ "description": "Defaults to true: apply a newly saved configuration version. Set false to save without changing active_version. An unchanged configuration is a no-op, including note-only updates; use versions.apply to activate a saved version."
332
338
  },
333
339
  {
334
340
  "name": "version_note",
335
341
  "type": "string",
336
342
  "required": false,
337
- "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."
343
+ "description": "Optional change explanation, at most 280 characters. Recorded only when a configuration change creates a new immutable version. A note-only update is a no-op returning 200 and the current effective version. Null is equivalent to omission."
338
344
  },
339
345
  {
340
346
  "name": "bindings",
@@ -365,6 +371,12 @@ export const operations = [
365
371
  "required": false,
366
372
  "description": "Praxis extension: default subagent model ID, pinned in the agent revision. Call model overrides this; otherwise it overrides the roster member model or the parent model for built-ins. Null clears the default. /agent/v1 only."
367
373
  },
374
+ {
375
+ "name": "image_model",
376
+ "type": "string",
377
+ "required": false,
378
+ "description": "Model used by the imagine image tool; defaults to gpt-image-2 when unset. Only models that can generate images are accepted. Omit to preserve; null clears the configured model. /agent/v1 only."
379
+ },
368
380
  {
369
381
  "name": "subagents",
370
382
  "type": "array",
@@ -424,6 +436,24 @@ export const operations = [
424
436
  ]
425
437
  }
426
438
  },
439
+ {
440
+ "resource": "agent.agents",
441
+ "method": "retrieveAppearance",
442
+ "summary": "Get agent appearance",
443
+ "description": "Read the saved chat appearance of a service agent.\n\nAgent Kit calls this from the page with a customer access token of this agent; your API key and console members can read it too. A token of another agent returns 404. The body is the same as the embed appearance read; a missing appearance returns the agent's own name and avatar only. Responses are private and cacheable for 60 seconds.",
444
+ "http": "GET",
445
+ "path": "/agent/v1/agents/{agent_id}/appearance",
446
+ "streaming": "no",
447
+ "pagination": false,
448
+ "pathParams": [
449
+ {
450
+ "name": "agent_id",
451
+ "sdkName": "agent_id",
452
+ "description": "Service agent id from agent creation or listing; with a customer access token, the agent the token was issued for."
453
+ }
454
+ ],
455
+ "query": []
456
+ },
427
457
  {
428
458
  "resource": "agent.agents",
429
459
  "method": "archive",
@@ -442,6 +472,59 @@ export const operations = [
442
472
  ],
443
473
  "query": []
444
474
  },
475
+ {
476
+ "resource": "agent.agents.customers",
477
+ "method": "list",
478
+ "summary": "List customers",
479
+ "description": "List the customers of a service agent, identified and anonymous, most recently seen first.\n\nCall this from your backend with your API key, or from the console. Customers follow Shopify Admin customers (list, retrieve, block, sign-out and data deletion of the people who use your storefront), so that experience applies. The list includes customers who signed in but have not started a session yet, and customers recorded under your own ids by embed tokens before customer sign-in existed; an id first seen that way is identified unless it starts with anon_. Unlike Shopify, a customer can be anonymous: a visitor admitted with the publishable key gets an anon_ id, and when it later signs in with anonymous_access_token it is merged: merged_into names the identified customer, and its sessions count toward that customer. Filter with q (a case-sensitive customer id prefix), type (identified or anonymous) and blocked (true or false). limit is 1 to 100, default 20; reuse next_page with the same filters and limit. A customer access token gets 404. Example: GET /agent/v1/agents/agent_example/customers?type=identified&blocked=false&limit=50.",
480
+ "http": "GET",
481
+ "path": "/agent/v1/agents/{agent_id}/customers",
482
+ "streaming": "no",
483
+ "pagination": false,
484
+ "pathParams": [
485
+ {
486
+ "name": "agent_id",
487
+ "sdkName": "agent_id",
488
+ "description": "Active service agent id from agent creation or listing."
489
+ }
490
+ ],
491
+ "query": [
492
+ {
493
+ "name": "limit",
494
+ "type": "integer",
495
+ "required": false,
496
+ "description": "Maximum customers per page, 1 to 100; defaults to 20."
497
+ },
498
+ {
499
+ "name": "page",
500
+ "type": "string",
501
+ "required": false,
502
+ "description": "next_page from the previous response with the same q, type, blocked and limit."
503
+ },
504
+ {
505
+ "name": "q",
506
+ "type": "string",
507
+ "required": false,
508
+ "description": "Case-sensitive literal prefix of the customer id; omit for all customers."
509
+ },
510
+ {
511
+ "name": "type",
512
+ "type": "string",
513
+ "enum": [
514
+ "identified",
515
+ "anonymous"
516
+ ],
517
+ "required": false,
518
+ "description": "Only identified or only anonymous customers; omit for both."
519
+ },
520
+ {
521
+ "name": "blocked",
522
+ "type": "boolean",
523
+ "required": false,
524
+ "description": "true for blocked customers only, false for customers who are not blocked; omit for both."
525
+ }
526
+ ]
527
+ },
445
528
  {
446
529
  "resource": "agent.agents.customers.auth.accessTokens",
447
530
  "method": "create",
@@ -591,61 +674,24 @@ export const operations = [
591
674
  }
592
675
  },
593
676
  {
594
- "resource": "agent.agents.endUsers",
595
- "method": "list",
596
- "summary": "List End Users",
597
- "description": "List users who have sessions or token issuance history on a service agent.\n\nOrdered by last_active_at and external_user_id descending. q is a case-sensitive literal prefix, including underscores. limit is 1–100, default 20. Reuse next_page with the same organization, agent, q and limit. Preemptively blocked users without history do not appear. End-user credentials and inaccessible or personal agents return 404.",
598
- "http": "GET",
599
- "path": "/agent/v1/agents/{agent_id}/end_users",
600
- "streaming": "no",
601
- "pagination": false,
602
- "pathParams": [
603
- {
604
- "name": "agent_id",
605
- "sdkName": "agent_id",
606
- "description": "Active service agent identifier from agent creation or listing."
607
- }
608
- ],
609
- "query": [
610
- {
611
- "name": "limit",
612
- "type": "integer",
613
- "required": false,
614
- "description": "Maximum users per page; defaults to 20."
615
- },
616
- {
617
- "name": "page",
618
- "type": "string",
619
- "required": false,
620
- "description": "next_page from the previous response with the same agent, q and limit."
621
- },
622
- {
623
- "name": "q",
624
- "type": "string",
625
- "required": false,
626
- "description": "Case-sensitive literal prefix of external_user_id; omit or use an empty string for all users."
627
- }
628
- ]
629
- },
630
- {
631
- "resource": "agent.agents.endUsers",
677
+ "resource": "agent.agents.customers",
632
678
  "method": "delete",
633
- "summary": "Delete end-user data",
634
- "description": "Delete a host application's end-user data from one service agent after explicit confirmation.\n\nDevelop only. Set confirm to the exact external_user_id; missing or mismatched confirmation returns 400. Returns 202 with a pending task id, not completion. Poll the deletion endpoint. Concurrent requests reuse the unfinished task; retry DELETE after failure to resume it. Tokens are revoked and the user is blocked before a seven-day recovery snapshot is verified. Sessions including child sessions, conversation data, grants and feedback are then removed. A pre-existing block remains; a temporary block is removed on success. Attachment metadata is recorded and File attachments are retained. No charge is introduced by this operation. Example: DELETE /agent/v1/agents/agent_example/end_users/customer_123?confirm=customer_123.",
679
+ "summary": "Delete customer data",
680
+ "description": "Delete a customer's data from one service agent after explicit confirmation.\n\nDevelop only. Set confirm to the exact customer id; a missing or different confirm returns 400 naming the value to send. Returns 202 with a pending task id; poll the deletion endpoint. Concurrent requests reuse the unfinished task; retry DELETE after failure to resume it. Tokens are revoked and the customer is blocked before a seven-day recovery snapshot is verified; sessions including child sessions, conversation data, grants and feedback are then removed. A block that existed before stays; a temporary block is removed on success. File attachments are retained. Example: DELETE /agent/v1/agents/agent_example/customers/cus_8f2a91?confirm=cus_8f2a91.",
635
681
  "http": "DELETE",
636
- "path": "/agent/v1/agents/{agent_id}/end_users/{external_user_id}",
682
+ "path": "/agent/v1/agents/{agent_id}/customers/{customer_id}",
637
683
  "streaming": "no",
638
684
  "pagination": false,
639
685
  "pathParams": [
640
686
  {
641
687
  "name": "agent_id",
642
688
  "sdkName": "agent_id",
643
- "description": "Active service agent identifier from agent creation or listing."
689
+ "description": "Active service agent id from agent creation or listing."
644
690
  },
645
691
  {
646
- "name": "external_user_id",
647
- "sdkName": "external_user_id",
648
- "description": "Host user identifier supplied at issuance or from end-user listing."
692
+ "name": "customer_id",
693
+ "sdkName": "customer_id",
694
+ "description": "Customer id from customer listing, or your own customer_id."
649
695
  }
650
696
  ],
651
697
  "query": [
@@ -653,121 +699,121 @@ export const operations = [
653
699
  "name": "confirm",
654
700
  "type": "string",
655
701
  "required": true,
656
- "description": "Must exactly equal the external_user_id path parameter to confirm destructive deletion."
702
+ "description": "Must equal the customer_id path parameter exactly, confirming the destructive deletion."
657
703
  }
658
704
  ]
659
705
  },
660
706
  {
661
- "resource": "agent.agents.endUsers",
707
+ "resource": "agent.agents.customers",
662
708
  "method": "retrieve",
663
- "summary": "Get End User",
664
- "description": "Inspect one end user and their twenty most recently updated sessions.\n\nUse external_user_id from listing or your host application. Users without session or issuance history return 404, including preemptively blocked users. End-user credentials and inaccessible or personal agents return 404.",
709
+ "summary": "Get customer",
710
+ "description": "Retrieve one customer of a service agent with its twenty most recently updated sessions.\n\nUse the customer id from the list or your own customer_id. An unknown customer returns 404 CUSTOMER_NOT_FOUND, and so does a customer access token. Unlike Shopify, an identified customer's session_count, cost and recent_sessions include the sessions of anonymous customers merged into it; the merged anonymous customer still shows its own sessions and its merged_into.",
665
711
  "http": "GET",
666
- "path": "/agent/v1/agents/{agent_id}/end_users/{external_user_id}",
712
+ "path": "/agent/v1/agents/{agent_id}/customers/{customer_id}",
667
713
  "streaming": "no",
668
714
  "pagination": false,
669
715
  "pathParams": [
670
716
  {
671
717
  "name": "agent_id",
672
718
  "sdkName": "agent_id",
673
- "description": "Active service agent identifier from agent creation or listing."
719
+ "description": "Active service agent id from agent creation or listing."
674
720
  },
675
721
  {
676
- "name": "external_user_id",
677
- "sdkName": "external_user_id",
678
- "description": "Host user identifier supplied at issuance or from end-user listing."
722
+ "name": "customer_id",
723
+ "sdkName": "customer_id",
724
+ "description": "Customer id from customer listing, or your own customer_id."
679
725
  }
680
726
  ],
681
727
  "query": []
682
728
  },
683
729
  {
684
- "resource": "agent.agents.endUsers.block",
730
+ "resource": "agent.agents.customers.block",
685
731
  "method": "create",
686
- "summary": "Block End User",
687
- "description": "Block token issuance and session creation, then revoke existing tokens for an end user.\n\nMay block a user before any history exists; timestamps are then null and counts and cost are zero. Requires an embed policy, otherwise returns 409 with setup guidance. Deduplicates the policy blocklist and retains its 1000-user maximum. If revocation returns 502, the user remains blocked; retry to finish revocation. Repeats keep the user blocked and revoke any remaining grants. End-user credentials and inaccessible or personal agents return 404.",
732
+ "summary": "Block customer",
733
+ "description": "Block a customer and end every sign-in it has on this agent.\n\nBlocks the customer, then ends every live sign-in the way logout does: each access token is revoked and its open event streams close. From then on grant_codes, access_tokens, renew and new sessions for this customer return CUSTOMER_BLOCKED until you unblock it. Idempotent: a repeat keeps the first block time and revokes whatever is still live. If credential revocation fails the request returns 502 and the customer stays blocked; retry to finish. An unknown customer returns 404 CUSTOMER_NOT_FOUND.",
688
734
  "http": "POST",
689
- "path": "/agent/v1/agents/{agent_id}/end_users/{external_user_id}/block",
735
+ "path": "/agent/v1/agents/{agent_id}/customers/{customer_id}/block",
690
736
  "streaming": "no",
691
737
  "pagination": false,
692
738
  "pathParams": [
693
739
  {
694
740
  "name": "agent_id",
695
741
  "sdkName": "agent_id",
696
- "description": "Active service agent identifier from agent creation or listing."
742
+ "description": "Active service agent id from agent creation or listing."
697
743
  },
698
744
  {
699
- "name": "external_user_id",
700
- "sdkName": "external_user_id",
701
- "description": "Host user identifier supplied at issuance or from end-user listing."
745
+ "name": "customer_id",
746
+ "sdkName": "customer_id",
747
+ "description": "Customer id from customer listing, or your own customer_id."
702
748
  }
703
749
  ],
704
750
  "query": []
705
751
  },
706
752
  {
707
- "resource": "agent.agents.endUsers",
753
+ "resource": "agent.agents.customers",
708
754
  "method": "retrieveDeletion",
709
- "summary": "Get end-user deletion",
710
- "description": "Poll the latest deletion task for an end user, including after the user data has been removed.\n\nUse the same agent_id and external_user_id as the confirmed DELETE. Status is pending, snapshotting, deleting, done or failed. Counts are empty until a verified snapshot exists. A failed task remains blocked and resumes when DELETE is retried with matching confirmation. snapshot_key is an operator recovery reference retained for seven days, not a public download URL. End-user credentials, inaccessible or personal agents, and missing tasks return 404. This read does not create a task or charge usage.",
755
+ "summary": "Get customer deletion",
756
+ "description": "Poll the latest deletion task of a customer, including after its data has been removed.\n\nUse the same agent_id and customer id as the confirmed DELETE. Status is pending, snapshotting, deleting, done or failed. Counts are empty until a verified snapshot exists. snapshot_key is an operator recovery reference retained for seven days, not a download URL. A customer access token and a missing task return 404.",
711
757
  "http": "GET",
712
- "path": "/agent/v1/agents/{agent_id}/end_users/{external_user_id}/deletion",
758
+ "path": "/agent/v1/agents/{agent_id}/customers/{customer_id}/deletion",
713
759
  "streaming": "no",
714
760
  "pagination": false,
715
761
  "pathParams": [
716
762
  {
717
763
  "name": "agent_id",
718
764
  "sdkName": "agent_id",
719
- "description": "Active service agent identifier from agent creation or listing."
765
+ "description": "Active service agent id from agent creation or listing."
720
766
  },
721
767
  {
722
- "name": "external_user_id",
723
- "sdkName": "external_user_id",
724
- "description": "Host user identifier supplied at issuance or from end-user listing."
768
+ "name": "customer_id",
769
+ "sdkName": "customer_id",
770
+ "description": "Customer id from customer listing, or your own customer_id."
725
771
  }
726
772
  ],
727
773
  "query": []
728
774
  },
729
775
  {
730
- "resource": "agent.agents.endUsers.revokeTokens",
776
+ "resource": "agent.agents.customers.revokeTokens",
731
777
  "method": "create",
732
- "summary": "Revoke End User Tokens",
733
- "description": "Revoke all issued tokens for an end user and terminate their open embed streams.\n\nRevokes credentials before marking grants revoked. Upstream failure returns 502 without changing grant revocation timestamps. Returns the count of newly revoked grants; a repeat without new grants returns zero. Does not block future issuance. End-user credentials and inaccessible or personal agents return 404.",
778
+ "summary": "Revoke customer tokens",
779
+ "description": "Sign a customer out everywhere without blocking it.\n\nEnds every live sign-in of the customer, revoking each access token and closing its open event streams; the customer can sign in again right away. Returns the number of access tokens this request revoked; a repeat returns 0. Credential revocation failure returns 502; retry to finish. An unknown customer returns 404 CUSTOMER_NOT_FOUND.",
734
780
  "http": "POST",
735
- "path": "/agent/v1/agents/{agent_id}/end_users/{external_user_id}/revoke_tokens",
781
+ "path": "/agent/v1/agents/{agent_id}/customers/{customer_id}/revoke_tokens",
736
782
  "streaming": "no",
737
783
  "pagination": false,
738
784
  "pathParams": [
739
785
  {
740
786
  "name": "agent_id",
741
787
  "sdkName": "agent_id",
742
- "description": "Active service agent identifier from agent creation or listing."
788
+ "description": "Active service agent id from agent creation or listing."
743
789
  },
744
790
  {
745
- "name": "external_user_id",
746
- "sdkName": "external_user_id",
747
- "description": "Host user identifier supplied at issuance or from end-user listing."
791
+ "name": "customer_id",
792
+ "sdkName": "customer_id",
793
+ "description": "Customer id from customer listing, or your own customer_id."
748
794
  }
749
795
  ],
750
796
  "query": []
751
797
  },
752
798
  {
753
- "resource": "agent.agents.endUsers.unblock",
799
+ "resource": "agent.agents.customers.unblock",
754
800
  "method": "create",
755
- "summary": "Unblock End User",
756
- "description": "Allow an end user to receive new tokens and create new sessions again.\n\nRemoves the user from the blocklist; previously revoked tokens stay revoked. Idempotent. Requires an embed policy, otherwise returns 409 with setup guidance. Returns null timestamps and zero counts and cost when no session or issuance history exists. End-user credentials and inaccessible or personal agents return 404.",
801
+ "summary": "Unblock customer",
802
+ "description": "Allow a blocked customer to sign in and start sessions again.\n\nIdempotent. Access tokens revoked while the customer was blocked stay revoked; sign the customer in again with a new grant code. An unknown customer returns 404 CUSTOMER_NOT_FOUND.",
757
803
  "http": "POST",
758
- "path": "/agent/v1/agents/{agent_id}/end_users/{external_user_id}/unblock",
804
+ "path": "/agent/v1/agents/{agent_id}/customers/{customer_id}/unblock",
759
805
  "streaming": "no",
760
806
  "pagination": false,
761
807
  "pathParams": [
762
808
  {
763
809
  "name": "agent_id",
764
810
  "sdkName": "agent_id",
765
- "description": "Active service agent identifier from agent creation or listing."
811
+ "description": "Active service agent id from agent creation or listing."
766
812
  },
767
813
  {
768
- "name": "external_user_id",
769
- "sdkName": "external_user_id",
770
- "description": "Host user identifier supplied at issuance or from end-user listing."
814
+ "name": "customer_id",
815
+ "sdkName": "customer_id",
816
+ "description": "Customer id from customer listing, or your own customer_id."
771
817
  }
772
818
  ],
773
819
  "query": []
@@ -794,7 +840,7 @@ export const operations = [
794
840
  "resource": "agent.agents.versions",
795
841
  "method": "list",
796
842
  "summary": "List agent versions",
797
- "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.",
843
+ "description": "List the saved versions of one agent in ascending version number, oldest first, in pages of at most 100 (default 20). Each item is the full agent definition at that saved version, so you can compare configurations. active is true only for the item new sessions use. active_version on every item is the same agent-level currently effective version; it is not that item's version. Use agents.retrieve with version to read a single saved version; agent_id comes from agents.list or agents.create. Pass next_page as page to continue.",
798
844
  "http": "GET",
799
845
  "path": "/agent/v1/agents/{agent_id}/versions",
800
846
  "streaming": "no",
@@ -825,7 +871,7 @@ export const operations = [
825
871
  "resource": "agent.agents.versions",
826
872
  "method": "apply",
827
873
  "summary": "Apply Agent Version",
828
- "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.",
874
+ "description": "Apply a saved version from agents.versions.list for new sessions and newly issued tokens, without creating a version. Existing sessions and tokens retain their version. The response contains the effective configuration with version equal to active_version and latest_version naming the newest saved version. Missing versions return 404; archived agents return 409. For example, POST /agent/v1/agents/{agent_id}/versions/2/apply with no body.",
829
875
  "http": "POST",
830
876
  "path": "/agent/v1/agents/{agent_id}/versions/{version}/apply",
831
877
  "streaming": "no",
@@ -1564,204 +1610,6 @@ export const operations = [
1564
1610
  ],
1565
1611
  "query": []
1566
1612
  },
1567
- {
1568
- "resource": "agent.embed",
1569
- "method": "retrieveAppearance",
1570
- "summary": "Read chat appearance",
1571
- "description": "Load saved appearance for an iframe or Hosted chat page. Supply an end-user embed token as Bearer authorization, or a console-issued publishable key in Praxis-Publishable-Key before anonymous token issuance. The credential selects the agent; identity_number and agent_id query parameters are rejected with 400. Missing appearance returns an empty object. Kit option names retain camelCase. Responses are private and cacheable for 60 seconds. Component hosts configure Kit in their own code instead.",
1572
- "http": "GET",
1573
- "path": "/agent/v1/embed/appearance",
1574
- "streaming": "no",
1575
- "pagination": false,
1576
- "pathParams": [],
1577
- "query": []
1578
- },
1579
- {
1580
- "resource": "agent.embed.exchange",
1581
- "method": "create",
1582
- "summary": "Exchange Hosted Code",
1583
- "description": "Redeem a single-use hosted link credential for an end-user token.\n\nRead code from the c fragment parameter of hosted_url returned by embed token creation with hosted true, then remove the fragment before exchanging. No Authorization header is required; the code authenticates this request. The code expires after 60 seconds and is consumed atomically on exchange, so concurrent attempts have only one winner. Expired, used and unknown codes return the same 404 body. Keep the token in memory and return to the host website for a fresh link when it expires; exchange cannot refresh it. Requests are IP limited per minute using the anonymous entrypoint budget (default 20). Example body is {\"code\":\"<code from hosted_url>\"}.",
1584
- "http": "POST",
1585
- "path": "/agent/v1/embed/exchange",
1586
- "streaming": "no",
1587
- "pagination": false,
1588
- "pathParams": [],
1589
- "query": [],
1590
- "body": {
1591
- "required": true,
1592
- "fields": [
1593
- {
1594
- "name": "code",
1595
- "type": "string",
1596
- "required": true,
1597
- "description": "Single-use credential from the c fragment parameter of hosted_url returned by embed token creation. Valid for 60 seconds."
1598
- }
1599
- ]
1600
- }
1601
- },
1602
- {
1603
- "resource": "agent.embedTokens",
1604
- "method": "list",
1605
- "summary": "List Embed Tokens",
1606
- "description": "List embed token issuance records in your organization.\n\nIncludes expired and revoked grants; returns neither token nor token_id. Sorts by created_at, then grant id, both descending. agent_id accepts agent_ or agt_; external_user_id matches exactly. limit is 1–100 (default 20). Reuse next_page as page with the same filters and organization; a mismatch returns 400. End-user credentials return 404.",
1607
- "http": "GET",
1608
- "path": "/agent/v1/embed_tokens",
1609
- "streaming": "no",
1610
- "pagination": false,
1611
- "pathParams": [],
1612
- "query": [
1613
- {
1614
- "name": "agent_id",
1615
- "type": "string",
1616
- "required": false,
1617
- "description": "Filter by service agent identifier (agent_ or agt_ prefix)."
1618
- },
1619
- {
1620
- "name": "external_user_id",
1621
- "type": "string",
1622
- "required": false,
1623
- "description": "Exact host user identifier supplied at issuance."
1624
- },
1625
- {
1626
- "name": "limit",
1627
- "type": "integer",
1628
- "required": false,
1629
- "description": "Maximum records per page; defaults to 20."
1630
- },
1631
- {
1632
- "name": "page",
1633
- "type": "string",
1634
- "required": false,
1635
- "description": "next_page from a previous response with the same filters."
1636
- }
1637
- ]
1638
- },
1639
- {
1640
- "resource": "agent.embedTokens",
1641
- "method": "create",
1642
- "summary": "Create Embed Token",
1643
- "description": "Issue a short-lived credential on your backend for an end user of a service agent.\n\nRequires an active service agent in your organization with an embed policy. Pins the requested version or the latest version and snapshots the policy environment, vaults and resources; metadata comes from the request. Blocked users cannot receive tokens. Keep your API key on the backend and pass only the returned token to the frontend. Every call creates a new grant; issuance is not idempotent. Set hosted to true to also receive hosted_url; redirect the user there within 60 seconds. The agent must have an identity_number. The URL fragment contains a single-use exchange credential, not the token. Omit hosted or set false for ordinary token issuance.",
1644
- "http": "POST",
1645
- "path": "/agent/v1/embed_tokens",
1646
- "streaming": "no",
1647
- "pagination": false,
1648
- "pathParams": [],
1649
- "query": [],
1650
- "body": {
1651
- "required": true,
1652
- "fields": [
1653
- {
1654
- "name": "hosted",
1655
- "type": "boolean",
1656
- "required": false,
1657
- "description": "Set true to also return a hosted chat URL with a single-use credential valid for 60 seconds. Defaults to false; the agent must have an identity_number."
1658
- },
1659
- {
1660
- "name": "agent",
1661
- "type": "string",
1662
- "required": true,
1663
- "description": "Service agent ID or identity_number from agent retrieval; it must belong to your organization and be active."
1664
- },
1665
- {
1666
- "name": "version",
1667
- "type": "integer",
1668
- "required": false,
1669
- "description": "Existing agent version to pin. Omit to pin the latest version at issuance."
1670
- },
1671
- {
1672
- "name": "external_user_id",
1673
- "type": "string",
1674
- "required": true,
1675
- "description": "Your application's stable end-user identifier, scoped to this organization and agent."
1676
- },
1677
- {
1678
- "name": "ttl_seconds",
1679
- "type": "integer",
1680
- "required": false,
1681
- "description": "Token lifetime in seconds. Defaults to the embed policy TTL and cannot exceed its maximum or 3600 seconds."
1682
- },
1683
- {
1684
- "name": "budget_cents",
1685
- "type": "integer",
1686
- "required": false,
1687
- "description": "Session budget in cents. Defaults to the embed policy session budget and cannot exceed its maximum."
1688
- },
1689
- {
1690
- "name": "system_message",
1691
- "type": "array",
1692
- "itemType": "object",
1693
- "required": false,
1694
- "description": "Optional host context as text blocks, limited to 8192 UTF-8 bytes in total."
1695
- },
1696
- {
1697
- "name": "agent_override",
1698
- "type": "object",
1699
- "required": false,
1700
- "description": "Optional system prompt override, accepted only when the embed policy allows agent overrides."
1701
- },
1702
- {
1703
- "name": "allowed_origins",
1704
- "type": "array",
1705
- "itemType": "string",
1706
- "required": false,
1707
- "description": "Optional subset of the policy origin entries, compared exactly. Omit to snapshot every policy origin."
1708
- },
1709
- {
1710
- "name": "metadata",
1711
- "type": "object",
1712
- "required": false,
1713
- "description": "Host metadata preserved verbatim; at most 16 keys of 1–64 characters and string values of at most 512 characters. Defaults to an empty object."
1714
- }
1715
- ]
1716
- }
1717
- },
1718
- {
1719
- "resource": "agent.embedTokens.anonymous",
1720
- "method": "create",
1721
- "summary": "Issue anonymous visitor token",
1722
- "description": "Obtain a short-lived embedding token for a visitor without an account using the agent owner's publishable key.\n\nNo Authorization header is required. Send the browser Origin allowed by the agent policy. Save a returned visitor_secret and reuse it for refreshes; only new visitors receive one. Unknown secrets create new visitors, and extra fields including visitor_id return 400. Issuance uses the key creator's organization membership, the key session budget and the smaller of the policy TTL maximum and 3600 seconds. IP requests are limited per minute (default 20); UTC daily session and spending caps are checked across the key's primary sessions created that day. Token issuance itself does not create a session or charge usage; subsequent sessions bill the host organization. Example body: {\"publishable_key\":\"pk_praxis_example\"}.",
1723
- "http": "POST",
1724
- "path": "/agent/v1/embed_tokens/anonymous",
1725
- "streaming": "no",
1726
- "pagination": false,
1727
- "pathParams": [],
1728
- "query": [],
1729
- "body": {
1730
- "required": true,
1731
- "fields": [
1732
- {
1733
- "name": "publishable_key",
1734
- "type": "string",
1735
- "required": true,
1736
- "description": "Public key created by the service agent owner; safe to include in browser code."
1737
- },
1738
- {
1739
- "name": "visitor_secret",
1740
- "type": "string",
1741
- "required": false,
1742
- "description": "Secret returned by a previous anonymous issuance for this key. Omit for a new visitor; an unknown secret creates a new visitor."
1743
- }
1744
- ]
1745
- }
1746
- },
1747
- {
1748
- "resource": "agent.embedTokens.revoke",
1749
- "method": "create",
1750
- "summary": "Revoke Embed Token",
1751
- "description": "Revoke an embed token and close its open event streams.\n\nUse an id from issuance or listing. Revokes the credential before setting revoked_at; upstream failure leaves it unset. Streams receive session.error (EMBED_TOKEN_REVOKED), then close immediately; other credentials are unaffected. Idempotent; repeats return the original revoked record without another revocation or audit. Missing or foreign grants and end-user credentials return 404.",
1752
- "http": "POST",
1753
- "path": "/agent/v1/embed_tokens/{id}/revoke",
1754
- "streaming": "no",
1755
- "pagination": false,
1756
- "pathParams": [
1757
- {
1758
- "name": "id",
1759
- "sdkName": "id",
1760
- "description": "Grant id returned by issuance or listing."
1761
- }
1762
- ],
1763
- "query": []
1764
- },
1765
1613
  {
1766
1614
  "resource": "agent.environments",
1767
1615
  "method": "list",