@deepraxis/sdk 0.1.1-dev.c64b603 → 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.
- package/METHODS.md +1 -59
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +5 -107
- package/dist/generated/sdk.gen.js +4 -252
- package/dist/generated/types.gen.d.ts +940 -2762
- package/dist/operations.generated.d.ts +10 -328
- package/dist/operations.generated.js +10 -390
- package/dist/resources.generated.d.ts +9 -408
- package/dist/resources.generated.js +0 -31
- package/package.json +1 -1
|
@@ -106,7 +106,7 @@ export const operations = [
|
|
|
106
106
|
"name": "multiagent",
|
|
107
107
|
"type": "object",
|
|
108
108
|
"required": false,
|
|
109
|
-
"description": "A
|
|
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",
|
|
@@ -226,7 +226,7 @@ export const operations = [
|
|
|
226
226
|
"resource": "agent.agents",
|
|
227
227
|
"method": "retrieve",
|
|
228
228
|
"summary": "Get agent",
|
|
229
|
-
"description": "Read
|
|
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.",
|
|
230
230
|
"http": "GET",
|
|
231
231
|
"path": "/agent/v1/agents/{agent_id}",
|
|
232
232
|
"streaming": "no",
|
|
@@ -243,7 +243,7 @@ export const operations = [
|
|
|
243
243
|
"name": "version",
|
|
244
244
|
"type": "number",
|
|
245
245
|
"required": false,
|
|
246
|
-
"description": "Agent version to read
|
|
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."
|
|
247
247
|
}
|
|
248
248
|
]
|
|
249
249
|
},
|
|
@@ -251,7 +251,7 @@ export const operations = [
|
|
|
251
251
|
"resource": "agent.agents",
|
|
252
252
|
"method": "update",
|
|
253
253
|
"summary": "Update agent",
|
|
254
|
-
"description": "
|
|
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.",
|
|
255
255
|
"http": "POST",
|
|
256
256
|
"path": "/agent/v1/agents/{agent_id}",
|
|
257
257
|
"streaming": "no",
|
|
@@ -296,7 +296,7 @@ export const operations = [
|
|
|
296
296
|
"name": "multiagent",
|
|
297
297
|
"type": "object",
|
|
298
298
|
"required": false,
|
|
299
|
-
"description": "A
|
|
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."
|
|
300
300
|
},
|
|
301
301
|
{
|
|
302
302
|
"name": "name",
|
|
@@ -328,19 +328,19 @@ export const operations = [
|
|
|
328
328
|
"name": "version",
|
|
329
329
|
"type": "number",
|
|
330
330
|
"required": false,
|
|
331
|
-
"description": "
|
|
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."
|
|
332
332
|
},
|
|
333
333
|
{
|
|
334
334
|
"name": "apply",
|
|
335
335
|
"type": "boolean",
|
|
336
336
|
"required": false,
|
|
337
|
-
"description": "Defaults to true: apply
|
|
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."
|
|
338
338
|
},
|
|
339
339
|
{
|
|
340
340
|
"name": "version_note",
|
|
341
341
|
"type": "string",
|
|
342
342
|
"required": false,
|
|
343
|
-
"description": "Optional change explanation
|
|
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."
|
|
344
344
|
},
|
|
345
345
|
{
|
|
346
346
|
"name": "bindings",
|
|
@@ -818,188 +818,6 @@ export const operations = [
|
|
|
818
818
|
],
|
|
819
819
|
"query": []
|
|
820
820
|
},
|
|
821
|
-
{
|
|
822
|
-
"resource": "agent.agents.endUsers",
|
|
823
|
-
"method": "list",
|
|
824
|
-
"summary": "List End Users",
|
|
825
|
-
"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.",
|
|
826
|
-
"http": "GET",
|
|
827
|
-
"path": "/agent/v1/agents/{agent_id}/end_users",
|
|
828
|
-
"streaming": "no",
|
|
829
|
-
"pagination": false,
|
|
830
|
-
"pathParams": [
|
|
831
|
-
{
|
|
832
|
-
"name": "agent_id",
|
|
833
|
-
"sdkName": "agent_id",
|
|
834
|
-
"description": "Active service agent identifier from agent creation or listing."
|
|
835
|
-
}
|
|
836
|
-
],
|
|
837
|
-
"query": [
|
|
838
|
-
{
|
|
839
|
-
"name": "limit",
|
|
840
|
-
"type": "integer",
|
|
841
|
-
"required": false,
|
|
842
|
-
"description": "Maximum users per page; defaults to 20."
|
|
843
|
-
},
|
|
844
|
-
{
|
|
845
|
-
"name": "page",
|
|
846
|
-
"type": "string",
|
|
847
|
-
"required": false,
|
|
848
|
-
"description": "next_page from the previous response with the same agent, q and limit."
|
|
849
|
-
},
|
|
850
|
-
{
|
|
851
|
-
"name": "q",
|
|
852
|
-
"type": "string",
|
|
853
|
-
"required": false,
|
|
854
|
-
"description": "Case-sensitive literal prefix of external_user_id; omit or use an empty string for all users."
|
|
855
|
-
}
|
|
856
|
-
]
|
|
857
|
-
},
|
|
858
|
-
{
|
|
859
|
-
"resource": "agent.agents.endUsers",
|
|
860
|
-
"method": "delete",
|
|
861
|
-
"summary": "Delete end-user data",
|
|
862
|
-
"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.",
|
|
863
|
-
"http": "DELETE",
|
|
864
|
-
"path": "/agent/v1/agents/{agent_id}/end_users/{external_user_id}",
|
|
865
|
-
"streaming": "no",
|
|
866
|
-
"pagination": false,
|
|
867
|
-
"pathParams": [
|
|
868
|
-
{
|
|
869
|
-
"name": "agent_id",
|
|
870
|
-
"sdkName": "agent_id",
|
|
871
|
-
"description": "Active service agent identifier from agent creation or listing."
|
|
872
|
-
},
|
|
873
|
-
{
|
|
874
|
-
"name": "external_user_id",
|
|
875
|
-
"sdkName": "external_user_id",
|
|
876
|
-
"description": "Host user identifier supplied at issuance or from end-user listing."
|
|
877
|
-
}
|
|
878
|
-
],
|
|
879
|
-
"query": [
|
|
880
|
-
{
|
|
881
|
-
"name": "confirm",
|
|
882
|
-
"type": "string",
|
|
883
|
-
"required": true,
|
|
884
|
-
"description": "Must exactly equal the external_user_id path parameter to confirm destructive deletion."
|
|
885
|
-
}
|
|
886
|
-
]
|
|
887
|
-
},
|
|
888
|
-
{
|
|
889
|
-
"resource": "agent.agents.endUsers",
|
|
890
|
-
"method": "retrieve",
|
|
891
|
-
"summary": "Get End User",
|
|
892
|
-
"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.",
|
|
893
|
-
"http": "GET",
|
|
894
|
-
"path": "/agent/v1/agents/{agent_id}/end_users/{external_user_id}",
|
|
895
|
-
"streaming": "no",
|
|
896
|
-
"pagination": false,
|
|
897
|
-
"pathParams": [
|
|
898
|
-
{
|
|
899
|
-
"name": "agent_id",
|
|
900
|
-
"sdkName": "agent_id",
|
|
901
|
-
"description": "Active service agent identifier from agent creation or listing."
|
|
902
|
-
},
|
|
903
|
-
{
|
|
904
|
-
"name": "external_user_id",
|
|
905
|
-
"sdkName": "external_user_id",
|
|
906
|
-
"description": "Host user identifier supplied at issuance or from end-user listing."
|
|
907
|
-
}
|
|
908
|
-
],
|
|
909
|
-
"query": []
|
|
910
|
-
},
|
|
911
|
-
{
|
|
912
|
-
"resource": "agent.agents.endUsers.block",
|
|
913
|
-
"method": "create",
|
|
914
|
-
"summary": "Block End User",
|
|
915
|
-
"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.",
|
|
916
|
-
"http": "POST",
|
|
917
|
-
"path": "/agent/v1/agents/{agent_id}/end_users/{external_user_id}/block",
|
|
918
|
-
"streaming": "no",
|
|
919
|
-
"pagination": false,
|
|
920
|
-
"pathParams": [
|
|
921
|
-
{
|
|
922
|
-
"name": "agent_id",
|
|
923
|
-
"sdkName": "agent_id",
|
|
924
|
-
"description": "Active service agent identifier from agent creation or listing."
|
|
925
|
-
},
|
|
926
|
-
{
|
|
927
|
-
"name": "external_user_id",
|
|
928
|
-
"sdkName": "external_user_id",
|
|
929
|
-
"description": "Host user identifier supplied at issuance or from end-user listing."
|
|
930
|
-
}
|
|
931
|
-
],
|
|
932
|
-
"query": []
|
|
933
|
-
},
|
|
934
|
-
{
|
|
935
|
-
"resource": "agent.agents.endUsers",
|
|
936
|
-
"method": "retrieveDeletion",
|
|
937
|
-
"summary": "Get end-user deletion",
|
|
938
|
-
"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.",
|
|
939
|
-
"http": "GET",
|
|
940
|
-
"path": "/agent/v1/agents/{agent_id}/end_users/{external_user_id}/deletion",
|
|
941
|
-
"streaming": "no",
|
|
942
|
-
"pagination": false,
|
|
943
|
-
"pathParams": [
|
|
944
|
-
{
|
|
945
|
-
"name": "agent_id",
|
|
946
|
-
"sdkName": "agent_id",
|
|
947
|
-
"description": "Active service agent identifier from agent creation or listing."
|
|
948
|
-
},
|
|
949
|
-
{
|
|
950
|
-
"name": "external_user_id",
|
|
951
|
-
"sdkName": "external_user_id",
|
|
952
|
-
"description": "Host user identifier supplied at issuance or from end-user listing."
|
|
953
|
-
}
|
|
954
|
-
],
|
|
955
|
-
"query": []
|
|
956
|
-
},
|
|
957
|
-
{
|
|
958
|
-
"resource": "agent.agents.endUsers.revokeTokens",
|
|
959
|
-
"method": "create",
|
|
960
|
-
"summary": "Revoke End User Tokens",
|
|
961
|
-
"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.",
|
|
962
|
-
"http": "POST",
|
|
963
|
-
"path": "/agent/v1/agents/{agent_id}/end_users/{external_user_id}/revoke_tokens",
|
|
964
|
-
"streaming": "no",
|
|
965
|
-
"pagination": false,
|
|
966
|
-
"pathParams": [
|
|
967
|
-
{
|
|
968
|
-
"name": "agent_id",
|
|
969
|
-
"sdkName": "agent_id",
|
|
970
|
-
"description": "Active service agent identifier from agent creation or listing."
|
|
971
|
-
},
|
|
972
|
-
{
|
|
973
|
-
"name": "external_user_id",
|
|
974
|
-
"sdkName": "external_user_id",
|
|
975
|
-
"description": "Host user identifier supplied at issuance or from end-user listing."
|
|
976
|
-
}
|
|
977
|
-
],
|
|
978
|
-
"query": []
|
|
979
|
-
},
|
|
980
|
-
{
|
|
981
|
-
"resource": "agent.agents.endUsers.unblock",
|
|
982
|
-
"method": "create",
|
|
983
|
-
"summary": "Unblock End User",
|
|
984
|
-
"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.",
|
|
985
|
-
"http": "POST",
|
|
986
|
-
"path": "/agent/v1/agents/{agent_id}/end_users/{external_user_id}/unblock",
|
|
987
|
-
"streaming": "no",
|
|
988
|
-
"pagination": false,
|
|
989
|
-
"pathParams": [
|
|
990
|
-
{
|
|
991
|
-
"name": "agent_id",
|
|
992
|
-
"sdkName": "agent_id",
|
|
993
|
-
"description": "Active service agent identifier from agent creation or listing."
|
|
994
|
-
},
|
|
995
|
-
{
|
|
996
|
-
"name": "external_user_id",
|
|
997
|
-
"sdkName": "external_user_id",
|
|
998
|
-
"description": "Host user identifier supplied at issuance or from end-user listing."
|
|
999
|
-
}
|
|
1000
|
-
],
|
|
1001
|
-
"query": []
|
|
1002
|
-
},
|
|
1003
821
|
{
|
|
1004
822
|
"resource": "agent.agents.unarchive",
|
|
1005
823
|
"method": "create",
|
|
@@ -1022,7 +840,7 @@ export const operations = [
|
|
|
1022
840
|
"resource": "agent.agents.versions",
|
|
1023
841
|
"method": "list",
|
|
1024
842
|
"summary": "List agent versions",
|
|
1025
|
-
"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
|
|
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.",
|
|
1026
844
|
"http": "GET",
|
|
1027
845
|
"path": "/agent/v1/agents/{agent_id}/versions",
|
|
1028
846
|
"streaming": "no",
|
|
@@ -1053,7 +871,7 @@ export const operations = [
|
|
|
1053
871
|
"resource": "agent.agents.versions",
|
|
1054
872
|
"method": "apply",
|
|
1055
873
|
"summary": "Apply Agent Version",
|
|
1056
|
-
"description": "Apply a version from agents.versions.list
|
|
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.",
|
|
1057
875
|
"http": "POST",
|
|
1058
876
|
"path": "/agent/v1/agents/{agent_id}/versions/{version}/apply",
|
|
1059
877
|
"streaming": "no",
|
|
@@ -1792,204 +1610,6 @@ export const operations = [
|
|
|
1792
1610
|
],
|
|
1793
1611
|
"query": []
|
|
1794
1612
|
},
|
|
1795
|
-
{
|
|
1796
|
-
"resource": "agent.embed",
|
|
1797
|
-
"method": "retrieveAppearance",
|
|
1798
|
-
"summary": "Read chat appearance",
|
|
1799
|
-
"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.",
|
|
1800
|
-
"http": "GET",
|
|
1801
|
-
"path": "/agent/v1/embed/appearance",
|
|
1802
|
-
"streaming": "no",
|
|
1803
|
-
"pagination": false,
|
|
1804
|
-
"pathParams": [],
|
|
1805
|
-
"query": []
|
|
1806
|
-
},
|
|
1807
|
-
{
|
|
1808
|
-
"resource": "agent.embed.exchange",
|
|
1809
|
-
"method": "create",
|
|
1810
|
-
"summary": "Exchange Hosted Code",
|
|
1811
|
-
"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>\"}.",
|
|
1812
|
-
"http": "POST",
|
|
1813
|
-
"path": "/agent/v1/embed/exchange",
|
|
1814
|
-
"streaming": "no",
|
|
1815
|
-
"pagination": false,
|
|
1816
|
-
"pathParams": [],
|
|
1817
|
-
"query": [],
|
|
1818
|
-
"body": {
|
|
1819
|
-
"required": true,
|
|
1820
|
-
"fields": [
|
|
1821
|
-
{
|
|
1822
|
-
"name": "code",
|
|
1823
|
-
"type": "string",
|
|
1824
|
-
"required": true,
|
|
1825
|
-
"description": "Single-use credential from the c fragment parameter of hosted_url returned by embed token creation. Valid for 60 seconds."
|
|
1826
|
-
}
|
|
1827
|
-
]
|
|
1828
|
-
}
|
|
1829
|
-
},
|
|
1830
|
-
{
|
|
1831
|
-
"resource": "agent.embedTokens",
|
|
1832
|
-
"method": "list",
|
|
1833
|
-
"summary": "List Embed Tokens",
|
|
1834
|
-
"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.",
|
|
1835
|
-
"http": "GET",
|
|
1836
|
-
"path": "/agent/v1/embed_tokens",
|
|
1837
|
-
"streaming": "no",
|
|
1838
|
-
"pagination": false,
|
|
1839
|
-
"pathParams": [],
|
|
1840
|
-
"query": [
|
|
1841
|
-
{
|
|
1842
|
-
"name": "agent_id",
|
|
1843
|
-
"type": "string",
|
|
1844
|
-
"required": false,
|
|
1845
|
-
"description": "Filter by service agent identifier (agent_ or agt_ prefix)."
|
|
1846
|
-
},
|
|
1847
|
-
{
|
|
1848
|
-
"name": "external_user_id",
|
|
1849
|
-
"type": "string",
|
|
1850
|
-
"required": false,
|
|
1851
|
-
"description": "Exact host user identifier supplied at issuance."
|
|
1852
|
-
},
|
|
1853
|
-
{
|
|
1854
|
-
"name": "limit",
|
|
1855
|
-
"type": "integer",
|
|
1856
|
-
"required": false,
|
|
1857
|
-
"description": "Maximum records per page; defaults to 20."
|
|
1858
|
-
},
|
|
1859
|
-
{
|
|
1860
|
-
"name": "page",
|
|
1861
|
-
"type": "string",
|
|
1862
|
-
"required": false,
|
|
1863
|
-
"description": "next_page from a previous response with the same filters."
|
|
1864
|
-
}
|
|
1865
|
-
]
|
|
1866
|
-
},
|
|
1867
|
-
{
|
|
1868
|
-
"resource": "agent.embedTokens",
|
|
1869
|
-
"method": "create",
|
|
1870
|
-
"summary": "Create Embed Token",
|
|
1871
|
-
"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.",
|
|
1872
|
-
"http": "POST",
|
|
1873
|
-
"path": "/agent/v1/embed_tokens",
|
|
1874
|
-
"streaming": "no",
|
|
1875
|
-
"pagination": false,
|
|
1876
|
-
"pathParams": [],
|
|
1877
|
-
"query": [],
|
|
1878
|
-
"body": {
|
|
1879
|
-
"required": true,
|
|
1880
|
-
"fields": [
|
|
1881
|
-
{
|
|
1882
|
-
"name": "hosted",
|
|
1883
|
-
"type": "boolean",
|
|
1884
|
-
"required": false,
|
|
1885
|
-
"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."
|
|
1886
|
-
},
|
|
1887
|
-
{
|
|
1888
|
-
"name": "agent",
|
|
1889
|
-
"type": "string",
|
|
1890
|
-
"required": true,
|
|
1891
|
-
"description": "Service agent ID or identity_number from agent retrieval; it must belong to your organization and be active."
|
|
1892
|
-
},
|
|
1893
|
-
{
|
|
1894
|
-
"name": "version",
|
|
1895
|
-
"type": "integer",
|
|
1896
|
-
"required": false,
|
|
1897
|
-
"description": "Existing agent version to pin. Omit to pin the latest version at issuance."
|
|
1898
|
-
},
|
|
1899
|
-
{
|
|
1900
|
-
"name": "external_user_id",
|
|
1901
|
-
"type": "string",
|
|
1902
|
-
"required": true,
|
|
1903
|
-
"description": "Your application's stable end-user identifier, scoped to this organization and agent."
|
|
1904
|
-
},
|
|
1905
|
-
{
|
|
1906
|
-
"name": "ttl_seconds",
|
|
1907
|
-
"type": "integer",
|
|
1908
|
-
"required": false,
|
|
1909
|
-
"description": "Token lifetime in seconds. Defaults to the embed policy TTL and cannot exceed its maximum or 3600 seconds."
|
|
1910
|
-
},
|
|
1911
|
-
{
|
|
1912
|
-
"name": "budget_cents",
|
|
1913
|
-
"type": "integer",
|
|
1914
|
-
"required": false,
|
|
1915
|
-
"description": "Session budget in cents. Defaults to the embed policy session budget and cannot exceed its maximum."
|
|
1916
|
-
},
|
|
1917
|
-
{
|
|
1918
|
-
"name": "system_message",
|
|
1919
|
-
"type": "array",
|
|
1920
|
-
"itemType": "object",
|
|
1921
|
-
"required": false,
|
|
1922
|
-
"description": "Optional host context as text blocks, limited to 8192 UTF-8 bytes in total."
|
|
1923
|
-
},
|
|
1924
|
-
{
|
|
1925
|
-
"name": "agent_override",
|
|
1926
|
-
"type": "object",
|
|
1927
|
-
"required": false,
|
|
1928
|
-
"description": "Optional system prompt override, accepted only when the embed policy allows agent overrides."
|
|
1929
|
-
},
|
|
1930
|
-
{
|
|
1931
|
-
"name": "allowed_origins",
|
|
1932
|
-
"type": "array",
|
|
1933
|
-
"itemType": "string",
|
|
1934
|
-
"required": false,
|
|
1935
|
-
"description": "Optional subset of the policy origin entries, compared exactly. Omit to snapshot every policy origin."
|
|
1936
|
-
},
|
|
1937
|
-
{
|
|
1938
|
-
"name": "metadata",
|
|
1939
|
-
"type": "object",
|
|
1940
|
-
"required": false,
|
|
1941
|
-
"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."
|
|
1942
|
-
}
|
|
1943
|
-
]
|
|
1944
|
-
}
|
|
1945
|
-
},
|
|
1946
|
-
{
|
|
1947
|
-
"resource": "agent.embedTokens.anonymous",
|
|
1948
|
-
"method": "create",
|
|
1949
|
-
"summary": "Issue anonymous visitor token",
|
|
1950
|
-
"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\"}.",
|
|
1951
|
-
"http": "POST",
|
|
1952
|
-
"path": "/agent/v1/embed_tokens/anonymous",
|
|
1953
|
-
"streaming": "no",
|
|
1954
|
-
"pagination": false,
|
|
1955
|
-
"pathParams": [],
|
|
1956
|
-
"query": [],
|
|
1957
|
-
"body": {
|
|
1958
|
-
"required": true,
|
|
1959
|
-
"fields": [
|
|
1960
|
-
{
|
|
1961
|
-
"name": "publishable_key",
|
|
1962
|
-
"type": "string",
|
|
1963
|
-
"required": true,
|
|
1964
|
-
"description": "Public key created by the service agent owner; safe to include in browser code."
|
|
1965
|
-
},
|
|
1966
|
-
{
|
|
1967
|
-
"name": "visitor_secret",
|
|
1968
|
-
"type": "string",
|
|
1969
|
-
"required": false,
|
|
1970
|
-
"description": "Secret returned by a previous anonymous issuance for this key. Omit for a new visitor; an unknown secret creates a new visitor."
|
|
1971
|
-
}
|
|
1972
|
-
]
|
|
1973
|
-
}
|
|
1974
|
-
},
|
|
1975
|
-
{
|
|
1976
|
-
"resource": "agent.embedTokens.revoke",
|
|
1977
|
-
"method": "create",
|
|
1978
|
-
"summary": "Revoke Embed Token",
|
|
1979
|
-
"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.",
|
|
1980
|
-
"http": "POST",
|
|
1981
|
-
"path": "/agent/v1/embed_tokens/{id}/revoke",
|
|
1982
|
-
"streaming": "no",
|
|
1983
|
-
"pagination": false,
|
|
1984
|
-
"pathParams": [
|
|
1985
|
-
{
|
|
1986
|
-
"name": "id",
|
|
1987
|
-
"sdkName": "id",
|
|
1988
|
-
"description": "Grant id returned by issuance or listing."
|
|
1989
|
-
}
|
|
1990
|
-
],
|
|
1991
|
-
"query": []
|
|
1992
|
-
},
|
|
1993
1613
|
{
|
|
1994
1614
|
"resource": "agent.environments",
|
|
1995
1615
|
"method": "list",
|