@epilot/sdk 2.9.4 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/ai-agents-runtime.json +1 -1
- package/definitions/ai-agents.json +63 -936
- package/definitions/focus-pocus-runtime.json +1 -0
- package/definitions/focus-pocus.json +757 -0
- package/definitions/integration-toolkit-runtime.json +1 -1
- package/definitions/integration-toolkit.json +213 -2
- package/definitions/workflow-runtime.json +1 -1
- package/definitions/workflow.json +60 -445
- package/dist/ai-agents-IZWFEUSH.js +7 -0
- package/dist/ai-agents-PWHKNRCX.cjs +7 -0
- package/dist/{ai-agents-runtime-EA23HCCP.js → ai-agents-runtime-25YRUJHI.js} +1 -1
- package/dist/{ai-agents-runtime-WZ3EI3NH.cjs → ai-agents-runtime-TILIO3UM.cjs} +2 -2
- package/dist/{ai-agents.d-D-7bTH-9.d.cts → ai-agents.d-CC5IjXrs.d.cts} +5 -506
- package/dist/{ai-agents.d-D-7bTH-9.d.ts → ai-agents.d-CC5IjXrs.d.ts} +5 -506
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +8 -8
- package/dist/apis/ai-agents.d.cts +2 -2
- package/dist/apis/ai-agents.d.ts +2 -2
- package/dist/apis/ai-agents.js +2 -2
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +8 -8
- package/dist/apis/integration-toolkit.d.cts +2 -2
- package/dist/apis/integration-toolkit.d.ts +2 -2
- package/dist/apis/integration-toolkit.js +2 -2
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/snapshot.cjs +6 -6
- package/dist/apis/snapshot.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +8 -8
- package/dist/apis/workflow.d.cts +2 -2
- package/dist/apis/workflow.d.ts +2 -2
- package/dist/apis/workflow.js +2 -2
- package/dist/chunk-7WGJSGWE.js +14 -0
- package/dist/chunk-FARDEGPH.cjs +14 -0
- package/dist/chunk-JENQHXFI.js +14 -0
- package/dist/{chunk-522LYPPW.js → chunk-KQKBSWGI.js} +1 -1
- package/dist/{chunk-LNVAFYGS.cjs → chunk-OJGUX5TG.cjs} +6 -6
- package/dist/{chunk-PM25LLET.cjs → chunk-QNZPOA54.cjs} +1 -1
- package/dist/{chunk-J4ZE3ANW.js → chunk-XH5F3S6Y.js} +6 -6
- package/dist/chunk-YISO22FS.cjs +14 -0
- package/dist/index.cjs +14 -14
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -4
- package/dist/integration-toolkit-DUMRNE6A.cjs +7 -0
- package/dist/integration-toolkit-IK7KA76K.js +7 -0
- package/dist/{integration-toolkit-runtime-FR6RZS5O.cjs → integration-toolkit-runtime-4LHEPGGC.cjs} +2 -2
- package/dist/{integration-toolkit-runtime-I2O6QP5G.js → integration-toolkit-runtime-5K3AAC63.js} +1 -1
- package/dist/{integration-toolkit.d-DUZ_fiuf.d.cts → integration-toolkit.d-BVe_MBBi.d.cts} +162 -3
- package/dist/{integration-toolkit.d-DUZ_fiuf.d.ts → integration-toolkit.d-BVe_MBBi.d.ts} +162 -3
- package/dist/js-yaml-DLCVPJ7G.js +0 -0
- package/dist/workflow-3WBD74WR.js +7 -0
- package/dist/workflow-WIUZ5TOX.cjs +7 -0
- package/dist/{workflow-runtime-L5HMFISV.js → workflow-runtime-DNTQDYPQ.js} +1 -1
- package/dist/{workflow-runtime-LMGACZP4.cjs → workflow-runtime-VKFESVFX.cjs} +2 -2
- package/dist/{workflow.d-eFv0ecBi.d.ts → workflow.d-CMSKt8oN.d.cts} +81 -745
- package/dist/{workflow.d-eFv0ecBi.d.cts → workflow.d-CMSKt8oN.d.ts} +81 -745
- package/docs/ai-agents.md +23 -641
- package/docs/integration-toolkit.md +133 -0
- package/docs/workflow.md +47 -247
- package/package.json +12 -11
- package/dist/ai-agents-D6C5TXLD.cjs +0 -7
- package/dist/ai-agents-Y6PH53PH.js +0 -7
- package/dist/chunk-3CNCQJOJ.js +0 -14
- package/dist/chunk-BRWY3QHG.js +0 -14
- package/dist/chunk-ILIHCSNO.cjs +0 -14
- package/dist/chunk-YEBEA6XU.cjs +0 -14
- package/dist/integration-toolkit-TL3BQ6FJ.cjs +0 -7
- package/dist/integration-toolkit-X3Y4OFVW.js +0 -7
- package/dist/workflow-7OU2YEEI.cjs +0 -7
- package/dist/workflow-IVKCWS44.js +0 -7
package/docs/ai-agents.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# AI Agents API
|
|
1
|
+
# AI Agents API - OpenAPI 3.0
|
|
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,23 +33,12 @@ const { data } = await aiAgentsClient.createAgent(...)
|
|
|
33
33
|
|
|
34
34
|
**Agent Execution**
|
|
35
35
|
- [`executeAgent`](#executeagent)
|
|
36
|
-
- [`executeAgentStream`](#executeagentstream)
|
|
37
36
|
- [`listExecutions`](#listexecutions)
|
|
38
37
|
- [`getExecution`](#getexecution)
|
|
39
38
|
- [`cancelExecution`](#cancelexecution)
|
|
40
39
|
- [`getExecutionTrace`](#getexecutiontrace)
|
|
41
40
|
- [`approveExecution`](#approveexecution)
|
|
42
41
|
- [`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)
|
|
53
42
|
|
|
54
43
|
**Schemas**
|
|
55
44
|
- [`AgentId`](#agentid)
|
|
@@ -62,7 +51,6 @@ const { data } = await aiAgentsClient.createAgent(...)
|
|
|
62
51
|
- [`RejectExecutionRequest`](#rejectexecutionrequest)
|
|
63
52
|
- [`ExecuteAgentRequest`](#executeagentrequest)
|
|
64
53
|
- [`ExecutionResponse`](#executionresponse)
|
|
65
|
-
- [`ExecutionIterationProjection`](#executioniterationprojection)
|
|
66
54
|
- [`ExecutionTrace`](#executiontrace)
|
|
67
55
|
- [`ExecutionIteration`](#executioniteration)
|
|
68
56
|
- [`PendingAction`](#pendingaction)
|
|
@@ -86,17 +74,6 @@ const { data } = await aiAgentsClient.createAgent(...)
|
|
|
86
74
|
- [`InputParametersSchema`](#inputparametersschema)
|
|
87
75
|
- [`ModelConfig`](#modelconfig)
|
|
88
76
|
- [`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)
|
|
100
77
|
|
|
101
78
|
### `createAgent`
|
|
102
79
|
|
|
@@ -117,9 +94,7 @@ const { data } = await client.createAgent(
|
|
|
117
94
|
model_config: {
|
|
118
95
|
model_id: 'anthropic.claude-3-5-sonnet-20241022-v2:0',
|
|
119
96
|
temperature: 0.7,
|
|
120
|
-
max_tokens: 4096
|
|
121
|
-
thinking: false,
|
|
122
|
-
thinking_budget: 10000
|
|
97
|
+
max_tokens: 4096
|
|
123
98
|
},
|
|
124
99
|
max_iterations: 10,
|
|
125
100
|
execution_pattern: 'direct',
|
|
@@ -169,9 +144,7 @@ const { data } = await client.createAgent(
|
|
|
169
144
|
"model_config": {
|
|
170
145
|
"model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0",
|
|
171
146
|
"temperature": 0.7,
|
|
172
|
-
"max_tokens": 4096
|
|
173
|
-
"thinking": false,
|
|
174
|
-
"thinking_budget": 10000
|
|
147
|
+
"max_tokens": 4096
|
|
175
148
|
},
|
|
176
149
|
"max_iterations": 0,
|
|
177
150
|
"execution_pattern": "direct",
|
|
@@ -243,9 +216,7 @@ const { data } = await client.listAgents({
|
|
|
243
216
|
"model_config": {
|
|
244
217
|
"model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0",
|
|
245
218
|
"temperature": 0.7,
|
|
246
|
-
"max_tokens": 4096
|
|
247
|
-
"thinking": false,
|
|
248
|
-
"thinking_budget": 10000
|
|
219
|
+
"max_tokens": 4096
|
|
249
220
|
},
|
|
250
221
|
"max_iterations": 0,
|
|
251
222
|
"execution_pattern": "direct",
|
|
@@ -316,9 +287,7 @@ const { data } = await client.getAgentById({
|
|
|
316
287
|
"model_config": {
|
|
317
288
|
"model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0",
|
|
318
289
|
"temperature": 0.7,
|
|
319
|
-
"max_tokens": 4096
|
|
320
|
-
"thinking": false,
|
|
321
|
-
"thinking_budget": 10000
|
|
290
|
+
"max_tokens": 4096
|
|
322
291
|
},
|
|
323
292
|
"max_iterations": 0,
|
|
324
293
|
"execution_pattern": "direct",
|
|
@@ -376,9 +345,7 @@ const { data } = await client.updateAgentById(
|
|
|
376
345
|
model_config: {
|
|
377
346
|
model_id: 'anthropic.claude-3-5-sonnet-20241022-v2:0',
|
|
378
347
|
temperature: 0.7,
|
|
379
|
-
max_tokens: 4096
|
|
380
|
-
thinking: false,
|
|
381
|
-
thinking_budget: 10000
|
|
348
|
+
max_tokens: 4096
|
|
382
349
|
},
|
|
383
350
|
max_iterations: 1,
|
|
384
351
|
execution_pattern: 'direct',
|
|
@@ -428,9 +395,7 @@ const { data } = await client.updateAgentById(
|
|
|
428
395
|
"model_config": {
|
|
429
396
|
"model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0",
|
|
430
397
|
"temperature": 0.7,
|
|
431
|
-
"max_tokens": 4096
|
|
432
|
-
"thinking": false,
|
|
433
|
-
"thinking_budget": 10000
|
|
398
|
+
"max_tokens": 4096
|
|
434
399
|
},
|
|
435
400
|
"max_iterations": 0,
|
|
436
401
|
"execution_pattern": "direct",
|
|
@@ -601,15 +566,7 @@ const { data } = await client.executeAgent(
|
|
|
601
566
|
"iteration_count": 0
|
|
602
567
|
},
|
|
603
568
|
"started_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
|
-
]
|
|
569
|
+
"completed_at": "1970-01-01T00:00:00.000Z"
|
|
613
570
|
}
|
|
614
571
|
```
|
|
615
572
|
|
|
@@ -617,43 +574,6 @@ const { data } = await client.executeAgent(
|
|
|
617
574
|
|
|
618
575
|
---
|
|
619
576
|
|
|
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
|
-
|
|
657
577
|
### `listExecutions`
|
|
658
578
|
|
|
659
579
|
List executions
|
|
@@ -755,15 +675,7 @@ const { data } = await client.listExecutions({
|
|
|
755
675
|
"iteration_count": 0
|
|
756
676
|
},
|
|
757
677
|
"started_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
|
-
]
|
|
678
|
+
"completed_at": "1970-01-01T00:00:00.000Z"
|
|
767
679
|
}
|
|
768
680
|
],
|
|
769
681
|
"next_cursor": "string"
|
|
@@ -871,15 +783,7 @@ const { data } = await client.getExecution({
|
|
|
871
783
|
"iteration_count": 0
|
|
872
784
|
},
|
|
873
785
|
"started_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
|
-
]
|
|
786
|
+
"completed_at": "1970-01-01T00:00:00.000Z"
|
|
883
787
|
}
|
|
884
788
|
```
|
|
885
789
|
|
|
@@ -984,15 +888,7 @@ const { data } = await client.cancelExecution({
|
|
|
984
888
|
"iteration_count": 0
|
|
985
889
|
},
|
|
986
890
|
"started_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
|
-
]
|
|
891
|
+
"completed_at": "1970-01-01T00:00:00.000Z"
|
|
996
892
|
}
|
|
997
893
|
```
|
|
998
894
|
|
|
@@ -1052,10 +948,7 @@ const { data } = await client.approveExecution(
|
|
|
1052
948
|
execution_id: 'example',
|
|
1053
949
|
},
|
|
1054
950
|
{
|
|
1055
|
-
reason: 'string'
|
|
1056
|
-
approved_action_ids: ['string'],
|
|
1057
|
-
rejected_action_ids: ['string'],
|
|
1058
|
-
share_scope: 'primary_only'
|
|
951
|
+
reason: 'string'
|
|
1059
952
|
},
|
|
1060
953
|
)
|
|
1061
954
|
```
|
|
@@ -1145,15 +1038,7 @@ const { data } = await client.approveExecution(
|
|
|
1145
1038
|
"iteration_count": 0
|
|
1146
1039
|
},
|
|
1147
1040
|
"started_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
|
-
]
|
|
1041
|
+
"completed_at": "1970-01-01T00:00:00.000Z"
|
|
1157
1042
|
}
|
|
1158
1043
|
```
|
|
1159
1044
|
|
|
@@ -1263,231 +1148,7 @@ const { data } = await client.rejectExecution(
|
|
|
1263
1148
|
"iteration_count": 0
|
|
1264
1149
|
},
|
|
1265
1150
|
"started_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
|
-
}
|
|
1151
|
+
"completed_at": "1970-01-01T00:00:00.000Z"
|
|
1491
1152
|
}
|
|
1492
1153
|
```
|
|
1493
1154
|
|
|
@@ -1522,8 +1183,6 @@ type CreateAgentRequest = {
|
|
|
1522
1183
|
model_id?: string
|
|
1523
1184
|
temperature?: number
|
|
1524
1185
|
max_tokens?: number
|
|
1525
|
-
thinking?: boolean
|
|
1526
|
-
thinking_budget?: number
|
|
1527
1186
|
}
|
|
1528
1187
|
max_iterations?: number
|
|
1529
1188
|
execution_pattern: "direct" | "react"
|
|
@@ -1548,7 +1207,6 @@ type CreateAgentRequest = {
|
|
|
1548
1207
|
maxLength?: { ... }
|
|
1549
1208
|
schemaFilter?: { ... }
|
|
1550
1209
|
attributeTypeFilter?: { ... }
|
|
1551
|
-
hidden?: { ... }
|
|
1552
1210
|
}>
|
|
1553
1211
|
required?: string[]
|
|
1554
1212
|
}
|
|
@@ -1569,8 +1227,6 @@ type UpdateAgentRequest = {
|
|
|
1569
1227
|
model_id?: string
|
|
1570
1228
|
temperature?: number
|
|
1571
1229
|
max_tokens?: number
|
|
1572
|
-
thinking?: boolean
|
|
1573
|
-
thinking_budget?: number
|
|
1574
1230
|
}
|
|
1575
1231
|
max_iterations?: number
|
|
1576
1232
|
execution_pattern?: "direct" | "react"
|
|
@@ -1595,7 +1251,6 @@ type UpdateAgentRequest = {
|
|
|
1595
1251
|
maxLength?: { ... }
|
|
1596
1252
|
schemaFilter?: { ... }
|
|
1597
1253
|
attributeTypeFilter?: { ... }
|
|
1598
|
-
hidden?: { ... }
|
|
1599
1254
|
}>
|
|
1600
1255
|
required?: string[]
|
|
1601
1256
|
}
|
|
@@ -1613,7 +1268,7 @@ type AgentDefinition = {
|
|
|
1613
1268
|
category?: "message" | "entity" | "document" | "classification" | "custom"
|
|
1614
1269
|
icon?: string
|
|
1615
1270
|
source?: "system" | "custom"
|
|
1616
|
-
availability?: "flows" | "copilot" | "
|
|
1271
|
+
availability?: "flows" | "copilot" | "all"[]
|
|
1617
1272
|
allowed_entity_schemas?: string[]
|
|
1618
1273
|
system_prompt?: string
|
|
1619
1274
|
tools?: string[]
|
|
@@ -1621,8 +1276,6 @@ type AgentDefinition = {
|
|
|
1621
1276
|
model_id?: string
|
|
1622
1277
|
temperature?: number
|
|
1623
1278
|
max_tokens?: number
|
|
1624
|
-
thinking?: boolean
|
|
1625
|
-
thinking_budget?: number
|
|
1626
1279
|
}
|
|
1627
1280
|
max_iterations?: number
|
|
1628
1281
|
execution_pattern?: "direct" | "react"
|
|
@@ -1647,7 +1300,6 @@ type AgentDefinition = {
|
|
|
1647
1300
|
maxLength?: { ... }
|
|
1648
1301
|
schemaFilter?: { ... }
|
|
1649
1302
|
attributeTypeFilter?: { ... }
|
|
1650
|
-
hidden?: { ... }
|
|
1651
1303
|
}>
|
|
1652
1304
|
required?: string[]
|
|
1653
1305
|
}
|
|
@@ -1670,7 +1322,7 @@ type ListAgentsResponse = {
|
|
|
1670
1322
|
category?: "message" | "entity" | "document" | "classification" | "custom"
|
|
1671
1323
|
icon?: string
|
|
1672
1324
|
source?: "system" | "custom"
|
|
1673
|
-
availability?: "flows" | "copilot" | "
|
|
1325
|
+
availability?: "flows" | "copilot" | "all"[]
|
|
1674
1326
|
allowed_entity_schemas?: string[]
|
|
1675
1327
|
system_prompt?: string
|
|
1676
1328
|
tools?: string[]
|
|
@@ -1678,8 +1330,6 @@ type ListAgentsResponse = {
|
|
|
1678
1330
|
model_id?: { ... }
|
|
1679
1331
|
temperature?: { ... }
|
|
1680
1332
|
max_tokens?: { ... }
|
|
1681
|
-
thinking?: { ... }
|
|
1682
|
-
thinking_budget?: { ... }
|
|
1683
1333
|
}
|
|
1684
1334
|
max_iterations?: number
|
|
1685
1335
|
execution_pattern?: "direct" | "react"
|
|
@@ -1738,12 +1388,6 @@ type ListExecutionsResponse = {
|
|
|
1738
1388
|
}
|
|
1739
1389
|
started_at?: string // date-time
|
|
1740
1390
|
completed_at?: string // date-time
|
|
1741
|
-
iterations?: Array<{
|
|
1742
|
-
index?: { ... }
|
|
1743
|
-
tool?: { ... }
|
|
1744
|
-
status?: { ... }
|
|
1745
|
-
timestamp?: { ... }
|
|
1746
|
-
}>
|
|
1747
1391
|
}>
|
|
1748
1392
|
next_cursor?: string
|
|
1749
1393
|
}
|
|
@@ -1754,9 +1398,6 @@ type ListExecutionsResponse = {
|
|
|
1754
1398
|
```ts
|
|
1755
1399
|
type ApproveExecutionRequest = {
|
|
1756
1400
|
reason?: string
|
|
1757
|
-
approved_action_ids?: string[]
|
|
1758
|
-
rejected_action_ids?: string[]
|
|
1759
|
-
share_scope?: "primary_only" | "primary_and_relations"
|
|
1760
1401
|
}
|
|
1761
1402
|
```
|
|
1762
1403
|
|
|
@@ -1837,23 +1478,6 @@ type ExecutionResponse = {
|
|
|
1837
1478
|
}
|
|
1838
1479
|
started_at?: string // date-time
|
|
1839
1480
|
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
|
|
1857
1481
|
}
|
|
1858
1482
|
```
|
|
1859
1483
|
|
|
@@ -1975,7 +1599,7 @@ Structured preview data for approval UI. Provides a generic format that any tool
|
|
|
1975
1599
|
```ts
|
|
1976
1600
|
type ToolPreview = {
|
|
1977
1601
|
action?: {
|
|
1978
|
-
type: "move" | "create" | "update" | "delete" | "apply" | "send" | "link" | "unlink"
|
|
1602
|
+
type: "move" | "create" | "update" | "delete" | "apply" | "send" | "link" | "unlink"
|
|
1979
1603
|
verb: string
|
|
1980
1604
|
}
|
|
1981
1605
|
source?: {
|
|
@@ -2034,7 +1658,7 @@ type ToolPreview = {
|
|
|
2034
1658
|
Type of action being previewed
|
|
2035
1659
|
|
|
2036
1660
|
```ts
|
|
2037
|
-
type PreviewActionType = "move" | "create" | "update" | "delete" | "apply" | "send" | "link" | "unlink"
|
|
1661
|
+
type PreviewActionType = "move" | "create" | "update" | "delete" | "apply" | "send" | "link" | "unlink"
|
|
2038
1662
|
```
|
|
2039
1663
|
|
|
2040
1664
|
### `PreviewEntity`
|
|
@@ -2104,7 +1728,7 @@ type ToolDefinition = {
|
|
|
2104
1728
|
tool_id?: string
|
|
2105
1729
|
name?: string
|
|
2106
1730
|
description?: string
|
|
2107
|
-
category?: "entity" | "
|
|
1731
|
+
category?: "entity" | "email" | "taxonomy" | "rag" | "workflow"
|
|
2108
1732
|
parameters?: object
|
|
2109
1733
|
returns?: object
|
|
2110
1734
|
requires_approval?: boolean
|
|
@@ -2133,12 +1757,11 @@ type AgentSource = "system" | "custom"
|
|
|
2133
1757
|
Where the skill/agent is available:
|
|
2134
1758
|
- flows: Available in workflow automations
|
|
2135
1759
|
- copilot: Available as a sub-agent in copilot
|
|
2136
|
-
- portals: Available in end-user self-service portals
|
|
2137
1760
|
- all: Available everywhere
|
|
2138
1761
|
|
|
2139
1762
|
|
|
2140
1763
|
```ts
|
|
2141
|
-
type SkillAvailability = "flows" | "copilot" | "
|
|
1764
|
+
type SkillAvailability = "flows" | "copilot" | "all"
|
|
2142
1765
|
```
|
|
2143
1766
|
|
|
2144
1767
|
### `ExecutionContext`
|
|
@@ -2194,7 +1817,7 @@ Custom types (domain-specific):
|
|
|
2194
1817
|
- entity-attribute
|
|
2195
1818
|
|
|
2196
1819
|
```ts
|
|
2197
|
-
type ParameterType = "text" | "textarea" | "number" | "boolean" | "select" | "entity-schema" | "entity-attribute" | "entity-id" | "taxonomy" | "taxonomy-classification" | "shared-inbox" | "label"
|
|
1820
|
+
type ParameterType = "text" | "textarea" | "number" | "boolean" | "select" | "entity-schema" | "entity-attribute" | "entity-id" | "taxonomy" | "taxonomy-classification" | "shared-inbox" | "label"
|
|
2198
1821
|
```
|
|
2199
1822
|
|
|
2200
1823
|
### `InputParameterDefinition`
|
|
@@ -2203,7 +1826,7 @@ type ParameterType = "text" | "textarea" | "number" | "boolean" | "select" | "en
|
|
|
2203
1826
|
type InputParameterDefinition = {
|
|
2204
1827
|
name: string
|
|
2205
1828
|
label: string
|
|
2206
|
-
type: "text" | "textarea" | "number" | "boolean" | "select" | "entity-schema" | "entity-attribute" | "entity-id" | "taxonomy" | "taxonomy-classification" | "shared-inbox" | "label"
|
|
1829
|
+
type: "text" | "textarea" | "number" | "boolean" | "select" | "entity-schema" | "entity-attribute" | "entity-id" | "taxonomy" | "taxonomy-classification" | "shared-inbox" | "label"
|
|
2207
1830
|
description?: string
|
|
2208
1831
|
default?: unknown
|
|
2209
1832
|
multi?: boolean
|
|
@@ -2217,7 +1840,6 @@ type InputParameterDefinition = {
|
|
|
2217
1840
|
maxLength?: number
|
|
2218
1841
|
schemaFilter?: string[]
|
|
2219
1842
|
attributeTypeFilter?: string[]
|
|
2220
|
-
hidden?: boolean
|
|
2221
1843
|
}
|
|
2222
1844
|
```
|
|
2223
1845
|
|
|
@@ -2229,7 +1851,7 @@ type InputParametersSchema = {
|
|
|
2229
1851
|
parameters: Array<{
|
|
2230
1852
|
name: string
|
|
2231
1853
|
label: string
|
|
2232
|
-
type: "text" | "textarea" | "number" | "boolean" | "select" | "entity-schema" | "entity-attribute" | "entity-id" | "taxonomy" | "taxonomy-classification" | "shared-inbox" | "label"
|
|
1854
|
+
type: "text" | "textarea" | "number" | "boolean" | "select" | "entity-schema" | "entity-attribute" | "entity-id" | "taxonomy" | "taxonomy-classification" | "shared-inbox" | "label"
|
|
2233
1855
|
description?: string
|
|
2234
1856
|
default?: unknown
|
|
2235
1857
|
multi?: boolean
|
|
@@ -2243,7 +1865,6 @@ type InputParametersSchema = {
|
|
|
2243
1865
|
maxLength?: number
|
|
2244
1866
|
schemaFilter?: string[]
|
|
2245
1867
|
attributeTypeFilter?: string[]
|
|
2246
|
-
hidden?: boolean
|
|
2247
1868
|
}>
|
|
2248
1869
|
required?: string[]
|
|
2249
1870
|
}
|
|
@@ -2256,8 +1877,6 @@ type ModelConfig = {
|
|
|
2256
1877
|
model_id?: string
|
|
2257
1878
|
temperature?: number
|
|
2258
1879
|
max_tokens?: number
|
|
2259
|
-
thinking?: boolean
|
|
2260
|
-
thinking_budget?: number
|
|
2261
1880
|
}
|
|
2262
1881
|
```
|
|
2263
1882
|
|
|
@@ -2270,240 +1889,3 @@ type Error = {
|
|
|
2270
1889
|
details?: object
|
|
2271
1890
|
}
|
|
2272
1891
|
```
|
|
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
|
-
```
|