@epilot/sdk 2.9.1 → 2.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/definitions/ai-agents-runtime.json +1 -1
  2. package/definitions/ai-agents.json +971 -98
  3. package/definitions/integration-toolkit-runtime.json +1 -1
  4. package/definitions/integration-toolkit.json +557 -1
  5. package/dist/ai-agents-D6C5TXLD.cjs +7 -0
  6. package/dist/ai-agents-Y6PH53PH.js +7 -0
  7. package/dist/{ai-agents-runtime-25YRUJHI.js → ai-agents-runtime-EA23HCCP.js} +1 -1
  8. package/dist/{ai-agents-runtime-TILIO3UM.cjs → ai-agents-runtime-WZ3EI3NH.cjs} +2 -2
  9. package/dist/{ai-agents.d-CC5IjXrs.d.cts → ai-agents.d-D-7bTH-9.d.cts} +506 -5
  10. package/dist/{ai-agents.d-CC5IjXrs.d.ts → ai-agents.d-D-7bTH-9.d.ts} +506 -5
  11. package/dist/apis/access-token.cjs +6 -6
  12. package/dist/apis/access-token.js +1 -1
  13. package/dist/apis/address-suggestions.cjs +6 -6
  14. package/dist/apis/address-suggestions.js +1 -1
  15. package/dist/apis/address.cjs +6 -6
  16. package/dist/apis/address.js +1 -1
  17. package/dist/apis/ai-agents.cjs +8 -8
  18. package/dist/apis/ai-agents.d.cts +2 -2
  19. package/dist/apis/ai-agents.d.ts +2 -2
  20. package/dist/apis/ai-agents.js +2 -2
  21. package/dist/apis/app.cjs +6 -6
  22. package/dist/apis/app.js +1 -1
  23. package/dist/apis/audit-logs.cjs +6 -6
  24. package/dist/apis/audit-logs.js +1 -1
  25. package/dist/apis/automation.cjs +6 -6
  26. package/dist/apis/automation.js +1 -1
  27. package/dist/apis/billing.cjs +6 -6
  28. package/dist/apis/billing.js +1 -1
  29. package/dist/apis/blueprint-manifest.cjs +6 -6
  30. package/dist/apis/blueprint-manifest.js +1 -1
  31. package/dist/apis/calendar.cjs +6 -6
  32. package/dist/apis/calendar.js +1 -1
  33. package/dist/apis/configuration-hub.cjs +6 -6
  34. package/dist/apis/configuration-hub.js +1 -1
  35. package/dist/apis/consent.cjs +6 -6
  36. package/dist/apis/consent.js +1 -1
  37. package/dist/apis/customer-portal.cjs +6 -6
  38. package/dist/apis/customer-portal.js +1 -1
  39. package/dist/apis/dashboard.cjs +6 -6
  40. package/dist/apis/dashboard.js +1 -1
  41. package/dist/apis/data-governance.cjs +6 -6
  42. package/dist/apis/data-governance.js +1 -1
  43. package/dist/apis/deduplication.cjs +6 -6
  44. package/dist/apis/deduplication.js +1 -1
  45. package/dist/apis/design.cjs +6 -6
  46. package/dist/apis/design.js +1 -1
  47. package/dist/apis/document.cjs +6 -6
  48. package/dist/apis/document.js +1 -1
  49. package/dist/apis/email-settings.cjs +6 -6
  50. package/dist/apis/email-settings.js +1 -1
  51. package/dist/apis/email-template.cjs +6 -6
  52. package/dist/apis/email-template.js +1 -1
  53. package/dist/apis/entity-mapping.cjs +6 -6
  54. package/dist/apis/entity-mapping.js +1 -1
  55. package/dist/apis/entity.cjs +6 -6
  56. package/dist/apis/entity.js +1 -1
  57. package/dist/apis/environments.cjs +6 -6
  58. package/dist/apis/environments.js +1 -1
  59. package/dist/apis/event-catalog.cjs +6 -6
  60. package/dist/apis/event-catalog.js +1 -1
  61. package/dist/apis/file.cjs +6 -6
  62. package/dist/apis/file.js +1 -1
  63. package/dist/apis/iban.cjs +6 -6
  64. package/dist/apis/iban.js +1 -1
  65. package/dist/apis/integration-toolkit.cjs +8 -8
  66. package/dist/apis/integration-toolkit.d.cts +2 -2
  67. package/dist/apis/integration-toolkit.d.ts +2 -2
  68. package/dist/apis/integration-toolkit.js +2 -2
  69. package/dist/apis/journey.cjs +6 -6
  70. package/dist/apis/journey.js +1 -1
  71. package/dist/apis/kanban.cjs +6 -6
  72. package/dist/apis/kanban.js +1 -1
  73. package/dist/apis/message.cjs +6 -6
  74. package/dist/apis/message.js +1 -1
  75. package/dist/apis/metering.cjs +6 -6
  76. package/dist/apis/metering.js +1 -1
  77. package/dist/apis/notes.cjs +6 -6
  78. package/dist/apis/notes.js +1 -1
  79. package/dist/apis/notification.cjs +6 -6
  80. package/dist/apis/notification.js +1 -1
  81. package/dist/apis/organization.cjs +6 -6
  82. package/dist/apis/organization.js +1 -1
  83. package/dist/apis/partner-directory.cjs +6 -6
  84. package/dist/apis/partner-directory.js +1 -1
  85. package/dist/apis/permissions.cjs +6 -6
  86. package/dist/apis/permissions.js +1 -1
  87. package/dist/apis/pricing-tier.cjs +6 -6
  88. package/dist/apis/pricing-tier.js +1 -1
  89. package/dist/apis/pricing.cjs +6 -6
  90. package/dist/apis/pricing.js +1 -1
  91. package/dist/apis/purpose.cjs +6 -6
  92. package/dist/apis/purpose.js +1 -1
  93. package/dist/apis/query.cjs +6 -6
  94. package/dist/apis/query.js +1 -1
  95. package/dist/apis/sandbox.cjs +6 -6
  96. package/dist/apis/sandbox.js +1 -1
  97. package/dist/apis/sharing.cjs +6 -6
  98. package/dist/apis/sharing.js +1 -1
  99. package/dist/apis/snapshot.cjs +6 -6
  100. package/dist/apis/snapshot.js +1 -1
  101. package/dist/apis/submission.cjs +6 -6
  102. package/dist/apis/submission.js +1 -1
  103. package/dist/apis/target.cjs +6 -6
  104. package/dist/apis/target.js +1 -1
  105. package/dist/apis/targeting.cjs +6 -6
  106. package/dist/apis/targeting.js +1 -1
  107. package/dist/apis/template-variables.cjs +6 -6
  108. package/dist/apis/template-variables.js +1 -1
  109. package/dist/apis/user.cjs +6 -6
  110. package/dist/apis/user.js +1 -1
  111. package/dist/apis/validation-rules.cjs +6 -6
  112. package/dist/apis/validation-rules.js +1 -1
  113. package/dist/apis/webhooks.cjs +6 -6
  114. package/dist/apis/webhooks.js +1 -1
  115. package/dist/apis/workflow-definition.cjs +6 -6
  116. package/dist/apis/workflow-definition.js +1 -1
  117. package/dist/apis/workflow.cjs +6 -6
  118. package/dist/apis/workflow.js +1 -1
  119. package/dist/chunk-3CNCQJOJ.js +14 -0
  120. package/dist/chunk-BRWY3QHG.js +14 -0
  121. package/dist/{chunk-6V3NYADA.cjs → chunk-DCHUVJL4.cjs} +4 -4
  122. package/dist/chunk-ILIHCSNO.cjs +14 -0
  123. package/dist/{chunk-QGP5WMHK.js → chunk-MBVZHZAH.js} +4 -4
  124. package/dist/chunk-YEBEA6XU.cjs +14 -0
  125. package/dist/index.cjs +12 -12
  126. package/dist/index.d.cts +2 -2
  127. package/dist/index.d.ts +2 -2
  128. package/dist/index.js +3 -3
  129. package/dist/integration-toolkit-TL3BQ6FJ.cjs +7 -0
  130. package/dist/integration-toolkit-X3Y4OFVW.js +7 -0
  131. package/dist/{integration-toolkit-runtime-FY7QVFL6.cjs → integration-toolkit-runtime-FR6RZS5O.cjs} +2 -2
  132. package/dist/{integration-toolkit-runtime-HCJ5QLCR.js → integration-toolkit-runtime-I2O6QP5G.js} +1 -1
  133. package/dist/{integration-toolkit.d-BSA9RRdq.d.cts → integration-toolkit.d-DUZ_fiuf.d.cts} +330 -1
  134. package/dist/{integration-toolkit.d-BSA9RRdq.d.ts → integration-toolkit.d-DUZ_fiuf.d.ts} +330 -1
  135. package/docs/ai-agents.md +641 -23
  136. package/docs/integration-toolkit.md +443 -83
  137. package/package.json +1 -1
  138. package/dist/ai-agents-IZWFEUSH.js +0 -7
  139. package/dist/ai-agents-PWHKNRCX.cjs +0 -7
  140. package/dist/chunk-7V7ECXTZ.js +0 -14
  141. package/dist/chunk-FARDEGPH.cjs +0 -14
  142. package/dist/chunk-I53TWOTX.cjs +0 -14
  143. package/dist/chunk-JENQHXFI.js +0 -14
  144. package/dist/integration-toolkit-334NGEOE.cjs +0 -7
  145. package/dist/integration-toolkit-5VCY6CUN.js +0 -7
package/docs/ai-agents.md CHANGED
@@ -1,4 +1,4 @@
1
- # AI Agents API - OpenAPI 3.0
1
+ # AI Agents API
2
2
 
3
3
  - **Base URL:** `https://ai-agents.sls.epilot.io`
4
4
  - **Full API Docs:** [https://docs.epilot.io/api/ai-agents](https://docs.epilot.io/api/ai-agents)
@@ -33,12 +33,23 @@ const { data } = await aiAgentsClient.createAgent(...)
33
33
 
34
34
  **Agent Execution**
35
35
  - [`executeAgent`](#executeagent)
36
+ - [`executeAgentStream`](#executeagentstream)
36
37
  - [`listExecutions`](#listexecutions)
37
38
  - [`getExecution`](#getexecution)
38
39
  - [`cancelExecution`](#cancelexecution)
39
40
  - [`getExecutionTrace`](#getexecutiontrace)
40
41
  - [`approveExecution`](#approveexecution)
41
42
  - [`rejectExecution`](#rejectexecution)
43
+ - [`streamExecution`](#streamexecution)
44
+
45
+ **Chat**
46
+ - [`chat`](#chat)
47
+
48
+ **Conversations**
49
+ - [`listConversations`](#listconversations)
50
+ - [`getConversation`](#getconversation)
51
+ - [`deleteConversation`](#deleteconversation)
52
+ - [`submitConversationFeedback`](#submitconversationfeedback)
42
53
 
43
54
  **Schemas**
44
55
  - [`AgentId`](#agentid)
@@ -51,6 +62,7 @@ const { data } = await aiAgentsClient.createAgent(...)
51
62
  - [`RejectExecutionRequest`](#rejectexecutionrequest)
52
63
  - [`ExecuteAgentRequest`](#executeagentrequest)
53
64
  - [`ExecutionResponse`](#executionresponse)
65
+ - [`ExecutionIterationProjection`](#executioniterationprojection)
54
66
  - [`ExecutionTrace`](#executiontrace)
55
67
  - [`ExecutionIteration`](#executioniteration)
56
68
  - [`PendingAction`](#pendingaction)
@@ -74,6 +86,17 @@ const { data } = await aiAgentsClient.createAgent(...)
74
86
  - [`InputParametersSchema`](#inputparametersschema)
75
87
  - [`ModelConfig`](#modelconfig)
76
88
  - [`Error`](#error)
89
+ - [`ChatRequest`](#chatrequest)
90
+ - [`ChatMessage`](#chatmessage)
91
+ - [`StreamingOptions`](#streamingoptions)
92
+ - [`StreamEvent`](#streamevent)
93
+ - [`ExecutionResult`](#executionresult)
94
+ - [`ConversationItem`](#conversationitem)
95
+ - [`MessageItem`](#messageitem)
96
+ - [`MessageFeedback`](#messagefeedback)
97
+ - [`SubmitFeedbackRequest`](#submitfeedbackrequest)
98
+ - [`ListConversationsResponse`](#listconversationsresponse)
99
+ - [`ConversationWithMessages`](#conversationwithmessages)
77
100
 
78
101
  ### `createAgent`
79
102
 
@@ -94,7 +117,9 @@ const { data } = await client.createAgent(
94
117
  model_config: {
95
118
  model_id: 'anthropic.claude-3-5-sonnet-20241022-v2:0',
96
119
  temperature: 0.7,
97
- max_tokens: 4096
120
+ max_tokens: 4096,
121
+ thinking: false,
122
+ thinking_budget: 10000
98
123
  },
99
124
  max_iterations: 10,
100
125
  execution_pattern: 'direct',
@@ -144,7 +169,9 @@ const { data } = await client.createAgent(
144
169
  "model_config": {
145
170
  "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0",
146
171
  "temperature": 0.7,
147
- "max_tokens": 4096
172
+ "max_tokens": 4096,
173
+ "thinking": false,
174
+ "thinking_budget": 10000
148
175
  },
149
176
  "max_iterations": 0,
150
177
  "execution_pattern": "direct",
@@ -216,7 +243,9 @@ const { data } = await client.listAgents({
216
243
  "model_config": {
217
244
  "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0",
218
245
  "temperature": 0.7,
219
- "max_tokens": 4096
246
+ "max_tokens": 4096,
247
+ "thinking": false,
248
+ "thinking_budget": 10000
220
249
  },
221
250
  "max_iterations": 0,
222
251
  "execution_pattern": "direct",
@@ -287,7 +316,9 @@ const { data } = await client.getAgentById({
287
316
  "model_config": {
288
317
  "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0",
289
318
  "temperature": 0.7,
290
- "max_tokens": 4096
319
+ "max_tokens": 4096,
320
+ "thinking": false,
321
+ "thinking_budget": 10000
291
322
  },
292
323
  "max_iterations": 0,
293
324
  "execution_pattern": "direct",
@@ -345,7 +376,9 @@ const { data } = await client.updateAgentById(
345
376
  model_config: {
346
377
  model_id: 'anthropic.claude-3-5-sonnet-20241022-v2:0',
347
378
  temperature: 0.7,
348
- max_tokens: 4096
379
+ max_tokens: 4096,
380
+ thinking: false,
381
+ thinking_budget: 10000
349
382
  },
350
383
  max_iterations: 1,
351
384
  execution_pattern: 'direct',
@@ -395,7 +428,9 @@ const { data } = await client.updateAgentById(
395
428
  "model_config": {
396
429
  "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0",
397
430
  "temperature": 0.7,
398
- "max_tokens": 4096
431
+ "max_tokens": 4096,
432
+ "thinking": false,
433
+ "thinking_budget": 10000
399
434
  },
400
435
  "max_iterations": 0,
401
436
  "execution_pattern": "direct",
@@ -566,7 +601,15 @@ const { data } = await client.executeAgent(
566
601
  "iteration_count": 0
567
602
  },
568
603
  "started_at": "1970-01-01T00:00:00.000Z",
569
- "completed_at": "1970-01-01T00:00:00.000Z"
604
+ "completed_at": "1970-01-01T00:00:00.000Z",
605
+ "iterations": [
606
+ {
607
+ "index": 0,
608
+ "tool": "string",
609
+ "status": "running",
610
+ "timestamp": "1970-01-01T00:00:00.000Z"
611
+ }
612
+ ]
570
613
  }
571
614
  ```
572
615
 
@@ -574,6 +617,43 @@ const { data } = await client.executeAgent(
574
617
 
575
618
  ---
576
619
 
620
+ ### `executeAgentStream`
621
+
622
+ Execute an agent with streaming response
623
+
624
+ `POST /v1/agents/{agent_id}/execute/stream`
625
+
626
+ ```ts
627
+ const { data } = await client.executeAgentStream(
628
+ {
629
+ agent_id: 'example',
630
+ },
631
+ {
632
+ input: {
633
+ entity_id: 'string',
634
+ entity_schema: 'string',
635
+ workflow_id: 'string',
636
+ workflow_execution_id: 'string',
637
+ task_id: 'string',
638
+ custom_data: {},
639
+ flow_context: [
640
+ {
641
+ entity_id: 'string',
642
+ entity_schema: 'string'
643
+ }
644
+ ]
645
+ },
646
+ parameters: {},
647
+ execution_mode_override: 'automatic',
648
+ execution_context: 'flows',
649
+ callback_url: 'https://example.com/path',
650
+ timeout_ms: 30000
651
+ },
652
+ )
653
+ ```
654
+
655
+ ---
656
+
577
657
  ### `listExecutions`
578
658
 
579
659
  List executions
@@ -675,7 +755,15 @@ const { data } = await client.listExecutions({
675
755
  "iteration_count": 0
676
756
  },
677
757
  "started_at": "1970-01-01T00:00:00.000Z",
678
- "completed_at": "1970-01-01T00:00:00.000Z"
758
+ "completed_at": "1970-01-01T00:00:00.000Z",
759
+ "iterations": [
760
+ {
761
+ "index": 0,
762
+ "tool": "string",
763
+ "status": "running",
764
+ "timestamp": "1970-01-01T00:00:00.000Z"
765
+ }
766
+ ]
679
767
  }
680
768
  ],
681
769
  "next_cursor": "string"
@@ -783,7 +871,15 @@ const { data } = await client.getExecution({
783
871
  "iteration_count": 0
784
872
  },
785
873
  "started_at": "1970-01-01T00:00:00.000Z",
786
- "completed_at": "1970-01-01T00:00:00.000Z"
874
+ "completed_at": "1970-01-01T00:00:00.000Z",
875
+ "iterations": [
876
+ {
877
+ "index": 0,
878
+ "tool": "string",
879
+ "status": "running",
880
+ "timestamp": "1970-01-01T00:00:00.000Z"
881
+ }
882
+ ]
787
883
  }
788
884
  ```
789
885
 
@@ -888,7 +984,15 @@ const { data } = await client.cancelExecution({
888
984
  "iteration_count": 0
889
985
  },
890
986
  "started_at": "1970-01-01T00:00:00.000Z",
891
- "completed_at": "1970-01-01T00:00:00.000Z"
987
+ "completed_at": "1970-01-01T00:00:00.000Z",
988
+ "iterations": [
989
+ {
990
+ "index": 0,
991
+ "tool": "string",
992
+ "status": "running",
993
+ "timestamp": "1970-01-01T00:00:00.000Z"
994
+ }
995
+ ]
892
996
  }
893
997
  ```
894
998
 
@@ -948,7 +1052,10 @@ const { data } = await client.approveExecution(
948
1052
  execution_id: 'example',
949
1053
  },
950
1054
  {
951
- reason: 'string'
1055
+ reason: 'string',
1056
+ approved_action_ids: ['string'],
1057
+ rejected_action_ids: ['string'],
1058
+ share_scope: 'primary_only'
952
1059
  },
953
1060
  )
954
1061
  ```
@@ -1038,7 +1145,15 @@ const { data } = await client.approveExecution(
1038
1145
  "iteration_count": 0
1039
1146
  },
1040
1147
  "started_at": "1970-01-01T00:00:00.000Z",
1041
- "completed_at": "1970-01-01T00:00:00.000Z"
1148
+ "completed_at": "1970-01-01T00:00:00.000Z",
1149
+ "iterations": [
1150
+ {
1151
+ "index": 0,
1152
+ "tool": "string",
1153
+ "status": "running",
1154
+ "timestamp": "1970-01-01T00:00:00.000Z"
1155
+ }
1156
+ ]
1042
1157
  }
1043
1158
  ```
1044
1159
 
@@ -1148,7 +1263,231 @@ const { data } = await client.rejectExecution(
1148
1263
  "iteration_count": 0
1149
1264
  },
1150
1265
  "started_at": "1970-01-01T00:00:00.000Z",
1151
- "completed_at": "1970-01-01T00:00:00.000Z"
1266
+ "completed_at": "1970-01-01T00:00:00.000Z",
1267
+ "iterations": [
1268
+ {
1269
+ "index": 0,
1270
+ "tool": "string",
1271
+ "status": "running",
1272
+ "timestamp": "1970-01-01T00:00:00.000Z"
1273
+ }
1274
+ ]
1275
+ }
1276
+ ```
1277
+
1278
+ </details>
1279
+
1280
+ ---
1281
+
1282
+ ### `streamExecution`
1283
+
1284
+ Reconnect to execution stream
1285
+
1286
+ `GET /v1/executions/{execution_id}/stream`
1287
+
1288
+ ```ts
1289
+ const { data } = await client.streamExecution({
1290
+ execution_id: 'example',
1291
+ from_sequence: 1,
1292
+ })
1293
+ ```
1294
+
1295
+ ---
1296
+
1297
+ ### `chat`
1298
+
1299
+ Streaming chat with AI agent
1300
+
1301
+ `POST /v1/chat`
1302
+
1303
+ ```ts
1304
+ const { data } = await client.chat(
1305
+ null,
1306
+ {
1307
+ agentId: 'string',
1308
+ message: 'string',
1309
+ conversationId: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
1310
+ clientHistory: [
1311
+ {
1312
+ role: 'user',
1313
+ content: 'string',
1314
+ tool_calls: [
1315
+ {
1316
+ id: 'string',
1317
+ name: 'string',
1318
+ input: {},
1319
+ output: 'string'
1320
+ }
1321
+ ]
1322
+ }
1323
+ ],
1324
+ context: {
1325
+ entityId: 'string',
1326
+ customData: {}
1327
+ },
1328
+ streaming: {
1329
+ mode: 'updates',
1330
+ streamTokens: false,
1331
+ includeMetadata: false
1332
+ }
1333
+ },
1334
+ )
1335
+ ```
1336
+
1337
+ ---
1338
+
1339
+ ### `listConversations`
1340
+
1341
+ List conversations
1342
+
1343
+ `GET /v1/conversations`
1344
+
1345
+ ```ts
1346
+ const { data } = await client.listConversations({
1347
+ agent_id: 'example',
1348
+ limit: 1,
1349
+ cursor: 'example',
1350
+ })
1351
+ ```
1352
+
1353
+ <details>
1354
+ <summary>Response</summary>
1355
+
1356
+ ```json
1357
+ {
1358
+ "conversations": [
1359
+ {
1360
+ "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1361
+ "user_id": "string",
1362
+ "agent_id": "string",
1363
+ "title": "string",
1364
+ "message_count": 0,
1365
+ "last_message": "string",
1366
+ "last_message_at": "1970-01-01T00:00:00.000Z",
1367
+ "context": {
1368
+ "entityId": "string",
1369
+ "customData": {}
1370
+ },
1371
+ "created_at": "1970-01-01T00:00:00.000Z",
1372
+ "updated_at": "1970-01-01T00:00:00.000Z"
1373
+ }
1374
+ ],
1375
+ "next_cursor": "string"
1376
+ }
1377
+ ```
1378
+
1379
+ </details>
1380
+
1381
+ ---
1382
+
1383
+ ### `getConversation`
1384
+
1385
+ Get conversation with messages
1386
+
1387
+ `GET /v1/conversations/{conversation_id}`
1388
+
1389
+ ```ts
1390
+ const { data } = await client.getConversation({
1391
+ conversation_id: 'example',
1392
+ message_limit: 1,
1393
+ })
1394
+ ```
1395
+
1396
+ <details>
1397
+ <summary>Response</summary>
1398
+
1399
+ ```json
1400
+ {
1401
+ "conversation": {
1402
+ "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1403
+ "user_id": "string",
1404
+ "agent_id": "string",
1405
+ "title": "string",
1406
+ "message_count": 0,
1407
+ "last_message": "string",
1408
+ "last_message_at": "1970-01-01T00:00:00.000Z",
1409
+ "context": {
1410
+ "entityId": "string",
1411
+ "customData": {}
1412
+ },
1413
+ "created_at": "1970-01-01T00:00:00.000Z",
1414
+ "updated_at": "1970-01-01T00:00:00.000Z"
1415
+ },
1416
+ "messages": [
1417
+ {
1418
+ "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1419
+ "role": "user",
1420
+ "content": "string",
1421
+ "timestamp": "1970-01-01T00:00:00.000Z",
1422
+ "tool_calls": [
1423
+ {
1424
+ "id": "string",
1425
+ "name": "string",
1426
+ "input": {},
1427
+ "output": "string"
1428
+ }
1429
+ ],
1430
+ "token_count": 0,
1431
+ "trace_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1432
+ "feedback": {
1433
+ "rating": "up",
1434
+ "comment": "string",
1435
+ "user_id": "string",
1436
+ "submitted_at": "1970-01-01T00:00:00.000Z"
1437
+ }
1438
+ }
1439
+ ]
1440
+ }
1441
+ ```
1442
+
1443
+ </details>
1444
+
1445
+ ---
1446
+
1447
+ ### `deleteConversation`
1448
+
1449
+ Delete conversation
1450
+
1451
+ `DELETE /v1/conversations/{conversation_id}`
1452
+
1453
+ ```ts
1454
+ const { data } = await client.deleteConversation({
1455
+ conversation_id: 'example',
1456
+ })
1457
+ ```
1458
+
1459
+ ---
1460
+
1461
+ ### `submitConversationFeedback`
1462
+
1463
+ Submit feedback for an assistant turn
1464
+
1465
+ `POST /v1/conversations/{conversation_id}/feedback`
1466
+
1467
+ ```ts
1468
+ const { data } = await client.submitConversationFeedback(
1469
+ {
1470
+ conversation_id: 'example',
1471
+ },
1472
+ {
1473
+ trace_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
1474
+ rating: 'up',
1475
+ comment: 'string'
1476
+ },
1477
+ )
1478
+ ```
1479
+
1480
+ <details>
1481
+ <summary>Response</summary>
1482
+
1483
+ ```json
1484
+ {
1485
+ "feedback": {
1486
+ "rating": "up",
1487
+ "comment": "string",
1488
+ "user_id": "string",
1489
+ "submitted_at": "1970-01-01T00:00:00.000Z"
1490
+ }
1152
1491
  }
1153
1492
  ```
1154
1493
 
@@ -1183,6 +1522,8 @@ type CreateAgentRequest = {
1183
1522
  model_id?: string
1184
1523
  temperature?: number
1185
1524
  max_tokens?: number
1525
+ thinking?: boolean
1526
+ thinking_budget?: number
1186
1527
  }
1187
1528
  max_iterations?: number
1188
1529
  execution_pattern: "direct" | "react"
@@ -1207,6 +1548,7 @@ type CreateAgentRequest = {
1207
1548
  maxLength?: { ... }
1208
1549
  schemaFilter?: { ... }
1209
1550
  attributeTypeFilter?: { ... }
1551
+ hidden?: { ... }
1210
1552
  }>
1211
1553
  required?: string[]
1212
1554
  }
@@ -1227,6 +1569,8 @@ type UpdateAgentRequest = {
1227
1569
  model_id?: string
1228
1570
  temperature?: number
1229
1571
  max_tokens?: number
1572
+ thinking?: boolean
1573
+ thinking_budget?: number
1230
1574
  }
1231
1575
  max_iterations?: number
1232
1576
  execution_pattern?: "direct" | "react"
@@ -1251,6 +1595,7 @@ type UpdateAgentRequest = {
1251
1595
  maxLength?: { ... }
1252
1596
  schemaFilter?: { ... }
1253
1597
  attributeTypeFilter?: { ... }
1598
+ hidden?: { ... }
1254
1599
  }>
1255
1600
  required?: string[]
1256
1601
  }
@@ -1268,7 +1613,7 @@ type AgentDefinition = {
1268
1613
  category?: "message" | "entity" | "document" | "classification" | "custom"
1269
1614
  icon?: string
1270
1615
  source?: "system" | "custom"
1271
- availability?: "flows" | "copilot" | "all"[]
1616
+ availability?: "flows" | "copilot" | "portals" | "all"[]
1272
1617
  allowed_entity_schemas?: string[]
1273
1618
  system_prompt?: string
1274
1619
  tools?: string[]
@@ -1276,6 +1621,8 @@ type AgentDefinition = {
1276
1621
  model_id?: string
1277
1622
  temperature?: number
1278
1623
  max_tokens?: number
1624
+ thinking?: boolean
1625
+ thinking_budget?: number
1279
1626
  }
1280
1627
  max_iterations?: number
1281
1628
  execution_pattern?: "direct" | "react"
@@ -1300,6 +1647,7 @@ type AgentDefinition = {
1300
1647
  maxLength?: { ... }
1301
1648
  schemaFilter?: { ... }
1302
1649
  attributeTypeFilter?: { ... }
1650
+ hidden?: { ... }
1303
1651
  }>
1304
1652
  required?: string[]
1305
1653
  }
@@ -1322,7 +1670,7 @@ type ListAgentsResponse = {
1322
1670
  category?: "message" | "entity" | "document" | "classification" | "custom"
1323
1671
  icon?: string
1324
1672
  source?: "system" | "custom"
1325
- availability?: "flows" | "copilot" | "all"[]
1673
+ availability?: "flows" | "copilot" | "portals" | "all"[]
1326
1674
  allowed_entity_schemas?: string[]
1327
1675
  system_prompt?: string
1328
1676
  tools?: string[]
@@ -1330,6 +1678,8 @@ type ListAgentsResponse = {
1330
1678
  model_id?: { ... }
1331
1679
  temperature?: { ... }
1332
1680
  max_tokens?: { ... }
1681
+ thinking?: { ... }
1682
+ thinking_budget?: { ... }
1333
1683
  }
1334
1684
  max_iterations?: number
1335
1685
  execution_pattern?: "direct" | "react"
@@ -1388,6 +1738,12 @@ type ListExecutionsResponse = {
1388
1738
  }
1389
1739
  started_at?: string // date-time
1390
1740
  completed_at?: string // date-time
1741
+ iterations?: Array<{
1742
+ index?: { ... }
1743
+ tool?: { ... }
1744
+ status?: { ... }
1745
+ timestamp?: { ... }
1746
+ }>
1391
1747
  }>
1392
1748
  next_cursor?: string
1393
1749
  }
@@ -1398,6 +1754,9 @@ type ListExecutionsResponse = {
1398
1754
  ```ts
1399
1755
  type ApproveExecutionRequest = {
1400
1756
  reason?: string
1757
+ approved_action_ids?: string[]
1758
+ rejected_action_ids?: string[]
1759
+ share_scope?: "primary_only" | "primary_and_relations"
1401
1760
  }
1402
1761
  ```
1403
1762
 
@@ -1478,6 +1837,23 @@ type ExecutionResponse = {
1478
1837
  }
1479
1838
  started_at?: string // date-time
1480
1839
  completed_at?: string // date-time
1840
+ iterations?: Array<{
1841
+ index?: number
1842
+ tool?: string
1843
+ status?: "running" | "completed"
1844
+ timestamp?: string // date-time
1845
+ }>
1846
+ }
1847
+ ```
1848
+
1849
+ ### `ExecutionIterationProjection`
1850
+
1851
+ ```ts
1852
+ type ExecutionIterationProjection = {
1853
+ index?: number
1854
+ tool?: string
1855
+ status?: "running" | "completed"
1856
+ timestamp?: string // date-time
1481
1857
  }
1482
1858
  ```
1483
1859
 
@@ -1599,7 +1975,7 @@ Structured preview data for approval UI. Provides a generic format that any tool
1599
1975
  ```ts
1600
1976
  type ToolPreview = {
1601
1977
  action?: {
1602
- type: "move" | "create" | "update" | "delete" | "apply" | "send" | "link" | "unlink"
1978
+ type: "move" | "create" | "update" | "delete" | "apply" | "send" | "link" | "unlink" | "batch_approval"
1603
1979
  verb: string
1604
1980
  }
1605
1981
  source?: {
@@ -1658,7 +2034,7 @@ type ToolPreview = {
1658
2034
  Type of action being previewed
1659
2035
 
1660
2036
  ```ts
1661
- type PreviewActionType = "move" | "create" | "update" | "delete" | "apply" | "send" | "link" | "unlink"
2037
+ type PreviewActionType = "move" | "create" | "update" | "delete" | "apply" | "send" | "link" | "unlink" | "batch_approval"
1662
2038
  ```
1663
2039
 
1664
2040
  ### `PreviewEntity`
@@ -1728,7 +2104,7 @@ type ToolDefinition = {
1728
2104
  tool_id?: string
1729
2105
  name?: string
1730
2106
  description?: string
1731
- category?: "entity" | "email" | "taxonomy" | "rag" | "workflow"
2107
+ category?: "entity" | "message" | "taxonomy" | "rag" | "workflow"
1732
2108
  parameters?: object
1733
2109
  returns?: object
1734
2110
  requires_approval?: boolean
@@ -1757,11 +2133,12 @@ type AgentSource = "system" | "custom"
1757
2133
  Where the skill/agent is available:
1758
2134
  - flows: Available in workflow automations
1759
2135
  - copilot: Available as a sub-agent in copilot
2136
+ - portals: Available in end-user self-service portals
1760
2137
  - all: Available everywhere
1761
2138
 
1762
2139
 
1763
2140
  ```ts
1764
- type SkillAvailability = "flows" | "copilot" | "all"
2141
+ type SkillAvailability = "flows" | "copilot" | "portals" | "all"
1765
2142
  ```
1766
2143
 
1767
2144
  ### `ExecutionContext`
@@ -1817,7 +2194,7 @@ Custom types (domain-specific):
1817
2194
  - entity-attribute
1818
2195
 
1819
2196
  ```ts
1820
- type ParameterType = "text" | "textarea" | "number" | "boolean" | "select" | "entity-schema" | "entity-attribute" | "entity-id" | "taxonomy" | "taxonomy-classification" | "shared-inbox" | "label"
2197
+ type ParameterType = "text" | "textarea" | "number" | "boolean" | "select" | "entity-schema" | "entity-attribute" | "entity-id" | "taxonomy" | "taxonomy-classification" | "shared-inbox" | "label" | "matching-criteria"
1821
2198
  ```
1822
2199
 
1823
2200
  ### `InputParameterDefinition`
@@ -1826,7 +2203,7 @@ type ParameterType = "text" | "textarea" | "number" | "boolean" | "select" | "en
1826
2203
  type InputParameterDefinition = {
1827
2204
  name: string
1828
2205
  label: string
1829
- type: "text" | "textarea" | "number" | "boolean" | "select" | "entity-schema" | "entity-attribute" | "entity-id" | "taxonomy" | "taxonomy-classification" | "shared-inbox" | "label"
2206
+ type: "text" | "textarea" | "number" | "boolean" | "select" | "entity-schema" | "entity-attribute" | "entity-id" | "taxonomy" | "taxonomy-classification" | "shared-inbox" | "label" | "matching-criteria"
1830
2207
  description?: string
1831
2208
  default?: unknown
1832
2209
  multi?: boolean
@@ -1840,6 +2217,7 @@ type InputParameterDefinition = {
1840
2217
  maxLength?: number
1841
2218
  schemaFilter?: string[]
1842
2219
  attributeTypeFilter?: string[]
2220
+ hidden?: boolean
1843
2221
  }
1844
2222
  ```
1845
2223
 
@@ -1851,7 +2229,7 @@ type InputParametersSchema = {
1851
2229
  parameters: Array<{
1852
2230
  name: string
1853
2231
  label: string
1854
- type: "text" | "textarea" | "number" | "boolean" | "select" | "entity-schema" | "entity-attribute" | "entity-id" | "taxonomy" | "taxonomy-classification" | "shared-inbox" | "label"
2232
+ type: "text" | "textarea" | "number" | "boolean" | "select" | "entity-schema" | "entity-attribute" | "entity-id" | "taxonomy" | "taxonomy-classification" | "shared-inbox" | "label" | "matching-criteria"
1855
2233
  description?: string
1856
2234
  default?: unknown
1857
2235
  multi?: boolean
@@ -1865,6 +2243,7 @@ type InputParametersSchema = {
1865
2243
  maxLength?: number
1866
2244
  schemaFilter?: string[]
1867
2245
  attributeTypeFilter?: string[]
2246
+ hidden?: boolean
1868
2247
  }>
1869
2248
  required?: string[]
1870
2249
  }
@@ -1877,6 +2256,8 @@ type ModelConfig = {
1877
2256
  model_id?: string
1878
2257
  temperature?: number
1879
2258
  max_tokens?: number
2259
+ thinking?: boolean
2260
+ thinking_budget?: number
1880
2261
  }
1881
2262
  ```
1882
2263
 
@@ -1889,3 +2270,240 @@ type Error = {
1889
2270
  details?: object
1890
2271
  }
1891
2272
  ```
2273
+
2274
+ ### `ChatRequest`
2275
+
2276
+ ```ts
2277
+ type ChatRequest = {
2278
+ agentId: string
2279
+ message: string
2280
+ conversationId?: string // uuid
2281
+ clientHistory?: Array<{
2282
+ role: "user" | "assistant" | "tool" | "system"
2283
+ content: string
2284
+ tool_calls?: Array<{
2285
+ id?: { ... }
2286
+ name?: { ... }
2287
+ input?: { ... }
2288
+ output?: { ... }
2289
+ }>
2290
+ }>
2291
+ context?: {
2292
+ entityId?: string
2293
+ customData?: Record<string, unknown>
2294
+ }
2295
+ streaming?: {
2296
+ mode?: "updates" | "messages"
2297
+ streamTokens?: boolean
2298
+ includeMetadata?: boolean
2299
+ }
2300
+ }
2301
+ ```
2302
+
2303
+ ### `ChatMessage`
2304
+
2305
+ ```ts
2306
+ type ChatMessage = {
2307
+ role: "user" | "assistant" | "tool" | "system"
2308
+ content: string
2309
+ tool_calls?: Array<{
2310
+ id?: string
2311
+ name?: string
2312
+ input?: object
2313
+ output?: string
2314
+ }>
2315
+ }
2316
+ ```
2317
+
2318
+ ### `StreamingOptions`
2319
+
2320
+ ```ts
2321
+ type StreamingOptions = {
2322
+ mode?: "updates" | "messages"
2323
+ streamTokens?: boolean
2324
+ includeMetadata?: boolean
2325
+ }
2326
+ ```
2327
+
2328
+ ### `StreamEvent`
2329
+
2330
+ Server-Sent Event for streaming responses
2331
+
2332
+ ```ts
2333
+ type StreamEvent = {
2334
+ type?: "token" | "agent_step" | "tool_call" | "tool_result" | "complete" | "error" | "metadata" | "needs_approval"
2335
+ content?: string
2336
+ index?: number
2337
+ tool?: string
2338
+ input?: object
2339
+ output?: string
2340
+ callId?: string
2341
+ result?: {
2342
+ response?: string
2343
+ structured_output?: object
2344
+ status?: "completed" | "failed" | "max_iterations" | "rejected"
2345
+ metrics?: {
2346
+ total_tokens?: { ... }
2347
+ input_tokens?: { ... }
2348
+ output_tokens?: { ... }
2349
+ total_cost_usd?: { ... }
2350
+ duration_ms?: { ... }
2351
+ iteration_count?: { ... }
2352
+ }
2353
+ }
2354
+ error?: {
2355
+ code?: string
2356
+ message?: string
2357
+ }
2358
+ conversationId?: string // uuid
2359
+ }
2360
+ ```
2361
+
2362
+ ### `ExecutionResult`
2363
+
2364
+ ```ts
2365
+ type ExecutionResult = {
2366
+ response?: string
2367
+ structured_output?: object
2368
+ status?: "completed" | "failed" | "max_iterations" | "rejected"
2369
+ metrics?: {
2370
+ total_tokens?: number
2371
+ input_tokens?: number
2372
+ output_tokens?: number
2373
+ total_cost_usd?: number
2374
+ duration_ms?: number
2375
+ iteration_count?: number
2376
+ }
2377
+ }
2378
+ ```
2379
+
2380
+ ### `ConversationItem`
2381
+
2382
+ ```ts
2383
+ type ConversationItem = {
2384
+ conversation_id?: string // uuid
2385
+ user_id?: string
2386
+ agent_id?: string
2387
+ title?: string
2388
+ message_count?: number
2389
+ last_message?: string
2390
+ last_message_at?: string // date-time
2391
+ context?: {
2392
+ entityId?: string
2393
+ customData?: object
2394
+ }
2395
+ created_at?: string // date-time
2396
+ updated_at?: string // date-time
2397
+ }
2398
+ ```
2399
+
2400
+ ### `MessageItem`
2401
+
2402
+ ```ts
2403
+ type MessageItem = {
2404
+ conversation_id?: string // uuid
2405
+ role?: "user" | "assistant" | "tool" | "system"
2406
+ content?: string
2407
+ timestamp?: string // date-time
2408
+ tool_calls?: Array<{
2409
+ id?: string
2410
+ name?: string
2411
+ input?: object
2412
+ output?: string
2413
+ }>
2414
+ token_count?: number
2415
+ trace_id?: string // uuid
2416
+ feedback?: {
2417
+ rating: "up" | "down"
2418
+ comment?: string
2419
+ user_id: string
2420
+ submitted_at: string // date-time
2421
+ }
2422
+ }
2423
+ ```
2424
+
2425
+ ### `MessageFeedback`
2426
+
2427
+ ```ts
2428
+ type MessageFeedback = {
2429
+ rating: "up" | "down"
2430
+ comment?: string
2431
+ user_id: string
2432
+ submitted_at: string // date-time
2433
+ }
2434
+ ```
2435
+
2436
+ ### `SubmitFeedbackRequest`
2437
+
2438
+ ```ts
2439
+ type SubmitFeedbackRequest = {
2440
+ trace_id: string // uuid
2441
+ rating: "up" | "down"
2442
+ comment?: string
2443
+ }
2444
+ ```
2445
+
2446
+ ### `ListConversationsResponse`
2447
+
2448
+ ```ts
2449
+ type ListConversationsResponse = {
2450
+ conversations?: Array<{
2451
+ conversation_id?: string // uuid
2452
+ user_id?: string
2453
+ agent_id?: string
2454
+ title?: string
2455
+ message_count?: number
2456
+ last_message?: string
2457
+ last_message_at?: string // date-time
2458
+ context?: {
2459
+ entityId?: { ... }
2460
+ customData?: { ... }
2461
+ }
2462
+ created_at?: string // date-time
2463
+ updated_at?: string // date-time
2464
+ }>
2465
+ next_cursor?: string
2466
+ }
2467
+ ```
2468
+
2469
+ ### `ConversationWithMessages`
2470
+
2471
+ ```ts
2472
+ type ConversationWithMessages = {
2473
+ conversation?: {
2474
+ conversation_id?: string // uuid
2475
+ user_id?: string
2476
+ agent_id?: string
2477
+ title?: string
2478
+ message_count?: number
2479
+ last_message?: string
2480
+ last_message_at?: string // date-time
2481
+ context?: {
2482
+ entityId?: { ... }
2483
+ customData?: { ... }
2484
+ }
2485
+ created_at?: string // date-time
2486
+ updated_at?: string // date-time
2487
+ }
2488
+ messages?: Array<{
2489
+ conversation_id?: string // uuid
2490
+ role?: "user" | "assistant" | "tool" | "system"
2491
+ content?: string
2492
+ timestamp?: string // date-time
2493
+ tool_calls?: Array<{
2494
+ id?: { ... }
2495
+ name?: { ... }
2496
+ input?: { ... }
2497
+ output?: { ... }
2498
+ }>
2499
+ token_count?: number
2500
+ trace_id?: string // uuid
2501
+ feedback?: {
2502
+ rating: { ... }
2503
+ comment?: { ... }
2504
+ user_id: { ... }
2505
+ submitted_at: { ... }
2506
+ }
2507
+ }>
2508
+ }
2509
+ ```