@epilot/sdk 2.19.3 → 2.19.5
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/access-token-runtime.json +1 -0
- package/definitions/access-token.json +835 -0
- package/definitions/address-runtime.json +1 -0
- package/definitions/address-suggestions-runtime.json +1 -0
- package/definitions/address-suggestions.json +582 -0
- package/definitions/address.json +578 -0
- package/definitions/ai-agents-runtime.json +1 -0
- package/definitions/ai-agents.json +2863 -0
- package/definitions/app-runtime.json +1 -0
- package/definitions/app.json +5743 -0
- package/definitions/audit-logs-runtime.json +1 -0
- package/definitions/audit-logs.json +305 -0
- package/definitions/automation-runtime.json +1 -0
- package/definitions/automation.json +5557 -0
- package/definitions/billing-runtime.json +1 -0
- package/definitions/billing.json +2386 -0
- package/definitions/blueprint-manifest-runtime.json +1 -0
- package/definitions/blueprint-manifest.json +7718 -0
- package/definitions/calendar-runtime.json +1 -0
- package/definitions/calendar.json +2904 -0
- package/definitions/configuration-hub-runtime.json +1 -0
- package/definitions/configuration-hub.json +2250 -0
- package/definitions/consent-runtime.json +1 -0
- package/definitions/consent.json +344 -0
- package/definitions/customer-portal-runtime.json +1 -0
- package/definitions/customer-portal.json +19945 -0
- package/definitions/dashboard-runtime.json +1 -0
- package/definitions/dashboard.json +1355 -0
- package/definitions/data-governance-runtime.json +1 -0
- package/definitions/data-governance.json +1126 -0
- package/definitions/deduplication-runtime.json +1 -0
- package/definitions/deduplication.json +782 -0
- package/definitions/design-runtime.json +1 -0
- package/definitions/design.json +1827 -0
- package/definitions/document-runtime.json +1 -0
- package/definitions/document.json +758 -0
- package/definitions/email-settings-runtime.json +1 -0
- package/definitions/email-settings.json +3736 -0
- package/definitions/email-template-runtime.json +1 -0
- package/definitions/email-template.json +1441 -0
- package/definitions/entity-mapping-runtime.json +1 -0
- package/definitions/entity-mapping.json +1642 -0
- package/definitions/entity-runtime.json +1 -0
- package/definitions/entity.json +11517 -0
- package/definitions/environments-runtime.json +1 -0
- package/definitions/environments.json +539 -0
- package/definitions/event-catalog-runtime.json +1 -0
- package/definitions/event-catalog.json +1524 -0
- package/definitions/file-runtime.json +1 -0
- package/definitions/file.json +3905 -0
- package/definitions/iban-runtime.json +1 -0
- package/definitions/iban.json +132 -0
- package/definitions/integration-toolkit-runtime.json +1 -0
- package/definitions/integration-toolkit.json +12769 -0
- package/definitions/journey-runtime.json +1 -0
- package/definitions/journey.json +2640 -0
- package/definitions/kanban-runtime.json +1 -0
- package/definitions/kanban.json +1506 -0
- package/definitions/message-runtime.json +1 -0
- package/definitions/message.json +3667 -0
- package/definitions/metering-runtime.json +1 -0
- package/definitions/metering.json +3132 -0
- package/definitions/notes-runtime.json +1 -0
- package/definitions/notes.json +1698 -0
- package/definitions/notification-runtime.json +1 -0
- package/definitions/notification.json +1439 -0
- package/definitions/organization-runtime.json +1 -0
- package/definitions/organization.json +1192 -0
- package/definitions/partner-directory-runtime.json +1 -0
- package/definitions/partner-directory.json +2284 -0
- package/definitions/permissions-runtime.json +1 -0
- package/definitions/permissions.json +1598 -0
- package/definitions/pricing-runtime.json +1 -0
- package/definitions/pricing-tier-runtime.json +1 -0
- package/definitions/pricing-tier.json +105 -0
- package/definitions/pricing.json +11569 -0
- package/definitions/purpose-runtime.json +1 -0
- package/definitions/purpose.json +524 -0
- package/definitions/query-runtime.json +1 -0
- package/definitions/query.json +3178 -0
- package/definitions/sandbox-runtime.json +1 -0
- package/definitions/sandbox.json +453 -0
- package/definitions/sharing-runtime.json +1 -0
- package/definitions/sharing.json +956 -0
- package/definitions/snapshot-runtime.json +1 -0
- package/definitions/snapshot.json +1103 -0
- package/definitions/submission-runtime.json +1 -0
- package/definitions/submission.json +313 -0
- package/definitions/targeting-runtime.json +1 -0
- package/definitions/targeting.json +2222 -0
- package/definitions/template-variables-runtime.json +1 -0
- package/definitions/template-variables.json +1416 -0
- package/definitions/user-runtime.json +1 -0
- package/definitions/user.json +3051 -0
- package/definitions/validation-rules-runtime.json +1 -0
- package/definitions/validation-rules.json +2365 -0
- package/definitions/webhooks-runtime.json +1 -0
- package/definitions/webhooks.json +1875 -0
- package/definitions/workflow-definition-runtime.json +1 -0
- package/definitions/workflow-definition.json +3592 -0
- package/definitions/workflow-runtime.json +1 -0
- package/definitions/workflow.json +4669 -0
- 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 +6 -6
- package/dist/apis/ai-agents.js +1 -1
- 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.d.cts +2 -2
- package/dist/apis/customer-portal.d.ts +2 -2
- 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 +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- 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.d.cts +2 -2
- package/dist/apis/targeting.d.ts +2 -2
- 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 +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/{chunk-UC3IKFHD.js → chunk-HWPPR3IM.js} +2 -2
- package/dist/{chunk-QWWGJOYR.cjs → chunk-VB6VABGZ.cjs} +2 -2
- package/dist/customer-portal-CDFQM72A.js +7 -0
- package/dist/customer-portal-MS6WNXAO.cjs +7 -0
- package/dist/{customer-portal.d-DTnk0yQf.d.cts → customer-portal.d-DJHJY-vb.d.cts} +51 -8
- package/dist/{customer-portal.d-DTnk0yQf.d.ts → customer-portal.d-DJHJY-vb.d.ts} +51 -8
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/targeting-5U4XGOXY.cjs +7 -0
- package/dist/targeting-R3G32HI4.js +7 -0
- package/dist/{targeting.d-16SvPyj4.d.cts → targeting.d-KcawmWBB.d.cts} +8 -0
- package/dist/{targeting.d-16SvPyj4.d.ts → targeting.d-KcawmWBB.d.ts} +8 -0
- package/docs/customer-portal.md +13 -4
- package/docs/targeting.md +9 -1
- package/package.json +1 -1
- package/dist/customer-portal-FCUPDA7V.cjs +0 -7
- package/dist/customer-portal-GRWXQYKT.js +0 -7
- package/dist/targeting-BTVCLYFW.cjs +0 -7
- package/dist/targeting-NWYDE3E7.js +0 -7
|
@@ -0,0 +1,2863 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"version": "3.0.0",
|
|
5
|
+
"title": "AI Agents API",
|
|
6
|
+
"description": "API for configuring and invoking AI agents in epilot platform",
|
|
7
|
+
"termsOfService": "https://epilot.cloud/agb",
|
|
8
|
+
"contact": {
|
|
9
|
+
"name": "Support",
|
|
10
|
+
"email": "info@epilot.cloud",
|
|
11
|
+
"url": "https://help.epilot.cloud"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"security": [
|
|
15
|
+
{
|
|
16
|
+
"EpilotAuth": []
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"servers": [
|
|
20
|
+
{
|
|
21
|
+
"url": "https://ai-agents.sls.epilot.io"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"tags": [
|
|
25
|
+
{
|
|
26
|
+
"name": "Agents Configuration",
|
|
27
|
+
"description": "Everything about AI Agent configuration"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "Agent Execution",
|
|
31
|
+
"description": "Execute AI agents and manage executions"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "Chat",
|
|
35
|
+
"description": "Streaming chat with AI agents"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "Conversations",
|
|
39
|
+
"description": "Manage conversation history"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"paths": {
|
|
43
|
+
"/v1/agents": {
|
|
44
|
+
"post": {
|
|
45
|
+
"tags": [
|
|
46
|
+
"Agents Configuration"
|
|
47
|
+
],
|
|
48
|
+
"summary": "createAgent",
|
|
49
|
+
"description": "Creates a new custom agent. System skills cannot be created via this endpoint.",
|
|
50
|
+
"operationId": "createAgent",
|
|
51
|
+
"security": [
|
|
52
|
+
{
|
|
53
|
+
"EpilotAuth": []
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"requestBody": {
|
|
57
|
+
"required": true,
|
|
58
|
+
"content": {
|
|
59
|
+
"application/json": {
|
|
60
|
+
"schema": {
|
|
61
|
+
"$ref": "#/components/schemas/CreateAgentRequest"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"responses": {
|
|
67
|
+
"201": {
|
|
68
|
+
"description": "Agent Created Successfully",
|
|
69
|
+
"content": {
|
|
70
|
+
"application/json": {
|
|
71
|
+
"schema": {
|
|
72
|
+
"$ref": "#/components/schemas/AgentDefinition"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"400": {
|
|
78
|
+
"description": "Error while creating the agent",
|
|
79
|
+
"content": {
|
|
80
|
+
"application/json": {
|
|
81
|
+
"schema": {
|
|
82
|
+
"$ref": "#/components/schemas/Error"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"get": {
|
|
90
|
+
"tags": [
|
|
91
|
+
"Agents Configuration"
|
|
92
|
+
],
|
|
93
|
+
"summary": "listAgents",
|
|
94
|
+
"description": "Lists agents from both system skills and custom agents.\nUse query parameters to filter by source, availability, or entity schema.\n",
|
|
95
|
+
"operationId": "listAgents",
|
|
96
|
+
"parameters": [
|
|
97
|
+
{
|
|
98
|
+
"name": "source",
|
|
99
|
+
"in": "query",
|
|
100
|
+
"schema": {
|
|
101
|
+
"$ref": "#/components/schemas/AgentSource"
|
|
102
|
+
},
|
|
103
|
+
"description": "Filter by agent source (system = pre-built skills, custom = user-created)"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "availability",
|
|
107
|
+
"in": "query",
|
|
108
|
+
"schema": {
|
|
109
|
+
"$ref": "#/components/schemas/SkillAvailability"
|
|
110
|
+
},
|
|
111
|
+
"description": "Filter by availability context (flows, copilot)"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "entity_schema",
|
|
115
|
+
"in": "query",
|
|
116
|
+
"schema": {
|
|
117
|
+
"type": "string"
|
|
118
|
+
},
|
|
119
|
+
"description": "Filter by allowed entity schema (e.g., \"message\" for email-related skills)"
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"responses": {
|
|
123
|
+
"200": {
|
|
124
|
+
"description": "List of agents",
|
|
125
|
+
"content": {
|
|
126
|
+
"application/json": {
|
|
127
|
+
"schema": {
|
|
128
|
+
"$ref": "#/components/schemas/ListAgentsResponse"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"400": {
|
|
134
|
+
"description": "Error fetching the agent configs",
|
|
135
|
+
"content": {
|
|
136
|
+
"application/json": {
|
|
137
|
+
"schema": {
|
|
138
|
+
"$ref": "#/components/schemas/Error"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"/v1/agents/{agent_id}": {
|
|
147
|
+
"get": {
|
|
148
|
+
"tags": [
|
|
149
|
+
"Agents Configuration"
|
|
150
|
+
],
|
|
151
|
+
"summary": "getAgentById",
|
|
152
|
+
"description": "Retrieves an agent by ID. Supports both:\n- System skill IDs (prefixed): \"skill:email-categorizer\"\n- Custom agent IDs (UUID): \"0336a235-9417-4dd8-894c-fe81285bba75\"\n",
|
|
153
|
+
"operationId": "getAgentById",
|
|
154
|
+
"security": [
|
|
155
|
+
{
|
|
156
|
+
"EpilotAuth": []
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"parameters": [
|
|
160
|
+
{
|
|
161
|
+
"name": "agent_id",
|
|
162
|
+
"in": "path",
|
|
163
|
+
"required": true,
|
|
164
|
+
"schema": {
|
|
165
|
+
"$ref": "#/components/schemas/AgentId"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"responses": {
|
|
170
|
+
"200": {
|
|
171
|
+
"description": "Agent fetched Successfully",
|
|
172
|
+
"content": {
|
|
173
|
+
"application/json": {
|
|
174
|
+
"schema": {
|
|
175
|
+
"$ref": "#/components/schemas/AgentDefinition"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"400": {
|
|
181
|
+
"description": "Error while creating the agent",
|
|
182
|
+
"content": {
|
|
183
|
+
"application/json": {
|
|
184
|
+
"schema": {
|
|
185
|
+
"$ref": "#/components/schemas/Error"
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"put": {
|
|
193
|
+
"tags": [
|
|
194
|
+
"Agents Configuration"
|
|
195
|
+
],
|
|
196
|
+
"summary": "updateAgentById",
|
|
197
|
+
"description": "Updates a custom agent. System skills cannot be updated via this endpoint.",
|
|
198
|
+
"operationId": "updateAgentById",
|
|
199
|
+
"security": [
|
|
200
|
+
{
|
|
201
|
+
"EpilotAuth": []
|
|
202
|
+
}
|
|
203
|
+
],
|
|
204
|
+
"parameters": [
|
|
205
|
+
{
|
|
206
|
+
"name": "agent_id",
|
|
207
|
+
"in": "path",
|
|
208
|
+
"required": true,
|
|
209
|
+
"schema": {
|
|
210
|
+
"$ref": "#/components/schemas/AgentId"
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
],
|
|
214
|
+
"requestBody": {
|
|
215
|
+
"required": true,
|
|
216
|
+
"content": {
|
|
217
|
+
"application/json": {
|
|
218
|
+
"schema": {
|
|
219
|
+
"$ref": "#/components/schemas/UpdateAgentRequest"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"responses": {
|
|
225
|
+
"200": {
|
|
226
|
+
"description": "Agent updated Successfully",
|
|
227
|
+
"content": {
|
|
228
|
+
"application/json": {
|
|
229
|
+
"schema": {
|
|
230
|
+
"$ref": "#/components/schemas/AgentDefinition"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"400": {
|
|
236
|
+
"description": "Error while updating the agent",
|
|
237
|
+
"content": {
|
|
238
|
+
"application/json": {
|
|
239
|
+
"schema": {
|
|
240
|
+
"$ref": "#/components/schemas/Error"
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"delete": {
|
|
248
|
+
"tags": [
|
|
249
|
+
"Agents Configuration"
|
|
250
|
+
],
|
|
251
|
+
"summary": "deleteAgentById",
|
|
252
|
+
"description": "Deletes a custom agent. System skills cannot be deleted via this endpoint.",
|
|
253
|
+
"security": [
|
|
254
|
+
{
|
|
255
|
+
"EpilotAuth": []
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
"operationId": "deleteAgentById",
|
|
259
|
+
"parameters": [
|
|
260
|
+
{
|
|
261
|
+
"name": "agent_id",
|
|
262
|
+
"in": "path",
|
|
263
|
+
"required": true,
|
|
264
|
+
"schema": {
|
|
265
|
+
"$ref": "#/components/schemas/AgentId"
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
],
|
|
269
|
+
"responses": {
|
|
270
|
+
"204": {
|
|
271
|
+
"description": "Agent deleted Successfully"
|
|
272
|
+
},
|
|
273
|
+
"400": {
|
|
274
|
+
"description": "Error while deleting the agent",
|
|
275
|
+
"content": {
|
|
276
|
+
"application/json": {
|
|
277
|
+
"schema": {
|
|
278
|
+
"$ref": "#/components/schemas/Error"
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
"/v1/agents/{agent_id}/execute": {
|
|
287
|
+
"post": {
|
|
288
|
+
"tags": [
|
|
289
|
+
"Agent Execution"
|
|
290
|
+
],
|
|
291
|
+
"summary": "executeAgent",
|
|
292
|
+
"description": "Executes an agent (system skill or custom agent).\nSupports both:\n- System skill IDs (prefixed): \"skill:email-categorizer\"\n- Custom agent IDs (UUID): \"0336a235-9417-4dd8-894c-fe81285bba75\"\n",
|
|
293
|
+
"operationId": "executeAgent",
|
|
294
|
+
"security": [
|
|
295
|
+
{
|
|
296
|
+
"EpilotAuth": []
|
|
297
|
+
}
|
|
298
|
+
],
|
|
299
|
+
"parameters": [
|
|
300
|
+
{
|
|
301
|
+
"name": "agent_id",
|
|
302
|
+
"in": "path",
|
|
303
|
+
"required": true,
|
|
304
|
+
"schema": {
|
|
305
|
+
"$ref": "#/components/schemas/AgentId"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
],
|
|
309
|
+
"requestBody": {
|
|
310
|
+
"required": false,
|
|
311
|
+
"content": {
|
|
312
|
+
"application/json": {
|
|
313
|
+
"schema": {
|
|
314
|
+
"$ref": "#/components/schemas/ExecuteAgentRequest"
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
"responses": {
|
|
320
|
+
"200": {
|
|
321
|
+
"description": "Agent execution initiated or completed",
|
|
322
|
+
"content": {
|
|
323
|
+
"application/json": {
|
|
324
|
+
"schema": {
|
|
325
|
+
"$ref": "#/components/schemas/ExecutionResponse"
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
"400": {
|
|
331
|
+
"description": "Error while executing the agent",
|
|
332
|
+
"content": {
|
|
333
|
+
"application/json": {
|
|
334
|
+
"schema": {
|
|
335
|
+
"$ref": "#/components/schemas/Error"
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
"404": {
|
|
341
|
+
"description": "Agent not found",
|
|
342
|
+
"content": {
|
|
343
|
+
"application/json": {
|
|
344
|
+
"schema": {
|
|
345
|
+
"$ref": "#/components/schemas/Error"
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
"/v1/agents/{agent_id}/execute/stream": {
|
|
354
|
+
"post": {
|
|
355
|
+
"tags": [
|
|
356
|
+
"Agent Execution"
|
|
357
|
+
],
|
|
358
|
+
"summary": "executeAgentStream",
|
|
359
|
+
"description": "Executes an agent with real-time streaming of tokens and tool events.\nReturns Server-Sent Events (SSE) stream with token-by-token output,\ntool call progress, and completion status.\n\nUnlike the async `/execute` endpoint which returns immediately with\nan execution_id for polling, this endpoint streams all events in real-time.\n\nSupports both:\n- System skill IDs (prefixed): \"skill:email-categorizer\"\n- Custom agent IDs (UUID): \"0336a235-9417-4dd8-894c-fe81285bba75\"\n",
|
|
360
|
+
"operationId": "executeAgentStream",
|
|
361
|
+
"security": [
|
|
362
|
+
{
|
|
363
|
+
"EpilotAuth": []
|
|
364
|
+
}
|
|
365
|
+
],
|
|
366
|
+
"parameters": [
|
|
367
|
+
{
|
|
368
|
+
"name": "agent_id",
|
|
369
|
+
"in": "path",
|
|
370
|
+
"required": true,
|
|
371
|
+
"schema": {
|
|
372
|
+
"$ref": "#/components/schemas/AgentId"
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
],
|
|
376
|
+
"requestBody": {
|
|
377
|
+
"required": false,
|
|
378
|
+
"content": {
|
|
379
|
+
"application/json": {
|
|
380
|
+
"schema": {
|
|
381
|
+
"$ref": "#/components/schemas/ExecuteAgentRequest"
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
"responses": {
|
|
387
|
+
"200": {
|
|
388
|
+
"description": "SSE stream of execution events",
|
|
389
|
+
"content": {
|
|
390
|
+
"text/event-stream": {
|
|
391
|
+
"schema": {
|
|
392
|
+
"$ref": "#/components/schemas/StreamEvent"
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
"400": {
|
|
398
|
+
"description": "Error while executing the agent",
|
|
399
|
+
"content": {
|
|
400
|
+
"application/json": {
|
|
401
|
+
"schema": {
|
|
402
|
+
"$ref": "#/components/schemas/Error"
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
"404": {
|
|
408
|
+
"description": "Agent not found",
|
|
409
|
+
"content": {
|
|
410
|
+
"application/json": {
|
|
411
|
+
"schema": {
|
|
412
|
+
"$ref": "#/components/schemas/Error"
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
"/v1/executions": {
|
|
421
|
+
"get": {
|
|
422
|
+
"tags": [
|
|
423
|
+
"Agent Execution"
|
|
424
|
+
],
|
|
425
|
+
"summary": "listExecutions",
|
|
426
|
+
"description": "List executions",
|
|
427
|
+
"operationId": "listExecutions",
|
|
428
|
+
"security": [
|
|
429
|
+
{
|
|
430
|
+
"EpilotAuth": []
|
|
431
|
+
}
|
|
432
|
+
],
|
|
433
|
+
"parameters": [
|
|
434
|
+
{
|
|
435
|
+
"name": "agent_id",
|
|
436
|
+
"in": "query",
|
|
437
|
+
"schema": {
|
|
438
|
+
"type": "string"
|
|
439
|
+
},
|
|
440
|
+
"description": "Filter by agent ID"
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"name": "status",
|
|
444
|
+
"in": "query",
|
|
445
|
+
"schema": {
|
|
446
|
+
"$ref": "#/components/schemas/ExecutionStatus"
|
|
447
|
+
},
|
|
448
|
+
"description": "Filter by status"
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
"name": "limit",
|
|
452
|
+
"in": "query",
|
|
453
|
+
"schema": {
|
|
454
|
+
"type": "integer",
|
|
455
|
+
"default": 50
|
|
456
|
+
},
|
|
457
|
+
"description": "Maximum number of executions to return"
|
|
458
|
+
}
|
|
459
|
+
],
|
|
460
|
+
"responses": {
|
|
461
|
+
"200": {
|
|
462
|
+
"description": "List of executions",
|
|
463
|
+
"content": {
|
|
464
|
+
"application/json": {
|
|
465
|
+
"schema": {
|
|
466
|
+
"$ref": "#/components/schemas/ListExecutionsResponse"
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
"400": {
|
|
472
|
+
"description": "Error fetching executions",
|
|
473
|
+
"content": {
|
|
474
|
+
"application/json": {
|
|
475
|
+
"schema": {
|
|
476
|
+
"$ref": "#/components/schemas/Error"
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
"/v1/executions/{execution_id}": {
|
|
485
|
+
"get": {
|
|
486
|
+
"tags": [
|
|
487
|
+
"Agent Execution"
|
|
488
|
+
],
|
|
489
|
+
"summary": "getExecution",
|
|
490
|
+
"description": "Get execution by ID",
|
|
491
|
+
"operationId": "getExecution",
|
|
492
|
+
"security": [
|
|
493
|
+
{
|
|
494
|
+
"EpilotAuth": []
|
|
495
|
+
}
|
|
496
|
+
],
|
|
497
|
+
"parameters": [
|
|
498
|
+
{
|
|
499
|
+
"name": "execution_id",
|
|
500
|
+
"in": "path",
|
|
501
|
+
"required": true,
|
|
502
|
+
"schema": {
|
|
503
|
+
"type": "string",
|
|
504
|
+
"format": "uuid"
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
],
|
|
508
|
+
"responses": {
|
|
509
|
+
"200": {
|
|
510
|
+
"description": "Execution details",
|
|
511
|
+
"content": {
|
|
512
|
+
"application/json": {
|
|
513
|
+
"schema": {
|
|
514
|
+
"$ref": "#/components/schemas/ExecutionResponse"
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
"404": {
|
|
520
|
+
"description": "Execution not found",
|
|
521
|
+
"content": {
|
|
522
|
+
"application/json": {
|
|
523
|
+
"schema": {
|
|
524
|
+
"$ref": "#/components/schemas/Error"
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
},
|
|
531
|
+
"delete": {
|
|
532
|
+
"tags": [
|
|
533
|
+
"Agent Execution"
|
|
534
|
+
],
|
|
535
|
+
"summary": "cancelExecution",
|
|
536
|
+
"description": "Cancel execution",
|
|
537
|
+
"operationId": "cancelExecution",
|
|
538
|
+
"security": [
|
|
539
|
+
{
|
|
540
|
+
"EpilotAuth": []
|
|
541
|
+
}
|
|
542
|
+
],
|
|
543
|
+
"parameters": [
|
|
544
|
+
{
|
|
545
|
+
"name": "execution_id",
|
|
546
|
+
"in": "path",
|
|
547
|
+
"required": true,
|
|
548
|
+
"schema": {
|
|
549
|
+
"type": "string",
|
|
550
|
+
"format": "uuid"
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
],
|
|
554
|
+
"responses": {
|
|
555
|
+
"200": {
|
|
556
|
+
"description": "Execution cancelled",
|
|
557
|
+
"content": {
|
|
558
|
+
"application/json": {
|
|
559
|
+
"schema": {
|
|
560
|
+
"$ref": "#/components/schemas/ExecutionResponse"
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
"400": {
|
|
566
|
+
"description": "Cannot cancel execution (already completed or failed)",
|
|
567
|
+
"content": {
|
|
568
|
+
"application/json": {
|
|
569
|
+
"schema": {
|
|
570
|
+
"$ref": "#/components/schemas/Error"
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
},
|
|
575
|
+
"404": {
|
|
576
|
+
"description": "Execution not found",
|
|
577
|
+
"content": {
|
|
578
|
+
"application/json": {
|
|
579
|
+
"schema": {
|
|
580
|
+
"$ref": "#/components/schemas/Error"
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
},
|
|
588
|
+
"/v1/executions/{execution_id}/trace": {
|
|
589
|
+
"get": {
|
|
590
|
+
"tags": [
|
|
591
|
+
"Agent Execution"
|
|
592
|
+
],
|
|
593
|
+
"summary": "getExecutionTrace",
|
|
594
|
+
"description": "Returns the step-by-step reasoning and tool calls for ReAct mode executions. Returns empty iterations array for direct mode executions.",
|
|
595
|
+
"operationId": "getExecutionTrace",
|
|
596
|
+
"security": [
|
|
597
|
+
{
|
|
598
|
+
"EpilotAuth": []
|
|
599
|
+
}
|
|
600
|
+
],
|
|
601
|
+
"parameters": [
|
|
602
|
+
{
|
|
603
|
+
"name": "execution_id",
|
|
604
|
+
"in": "path",
|
|
605
|
+
"required": true,
|
|
606
|
+
"schema": {
|
|
607
|
+
"type": "string",
|
|
608
|
+
"format": "uuid"
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
],
|
|
612
|
+
"responses": {
|
|
613
|
+
"200": {
|
|
614
|
+
"description": "Execution trace",
|
|
615
|
+
"content": {
|
|
616
|
+
"application/json": {
|
|
617
|
+
"schema": {
|
|
618
|
+
"$ref": "#/components/schemas/ExecutionTrace"
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
},
|
|
623
|
+
"404": {
|
|
624
|
+
"description": "Execution not found",
|
|
625
|
+
"content": {
|
|
626
|
+
"application/json": {
|
|
627
|
+
"schema": {
|
|
628
|
+
"$ref": "#/components/schemas/Error"
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
},
|
|
636
|
+
"/v1/executions/{execution_id}/feedback": {
|
|
637
|
+
"get": {
|
|
638
|
+
"tags": [
|
|
639
|
+
"Agent Execution"
|
|
640
|
+
],
|
|
641
|
+
"summary": "Get execution feedback",
|
|
642
|
+
"description": "Returns the authenticated user's feedback for an execution.",
|
|
643
|
+
"operationId": "getExecutionFeedback",
|
|
644
|
+
"security": [
|
|
645
|
+
{
|
|
646
|
+
"EpilotAuth": []
|
|
647
|
+
}
|
|
648
|
+
],
|
|
649
|
+
"parameters": [
|
|
650
|
+
{
|
|
651
|
+
"name": "execution_id",
|
|
652
|
+
"in": "path",
|
|
653
|
+
"required": true,
|
|
654
|
+
"schema": {
|
|
655
|
+
"type": "string",
|
|
656
|
+
"format": "uuid"
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
],
|
|
660
|
+
"responses": {
|
|
661
|
+
"200": {
|
|
662
|
+
"description": "Feedback state",
|
|
663
|
+
"content": {
|
|
664
|
+
"application/json": {
|
|
665
|
+
"schema": {
|
|
666
|
+
"$ref": "#/components/schemas/ExecutionFeedbackResponse"
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
},
|
|
671
|
+
"404": {
|
|
672
|
+
"description": "Execution not found",
|
|
673
|
+
"content": {
|
|
674
|
+
"application/json": {
|
|
675
|
+
"schema": {
|
|
676
|
+
"$ref": "#/components/schemas/Error"
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
},
|
|
683
|
+
"put": {
|
|
684
|
+
"tags": [
|
|
685
|
+
"Agent Execution"
|
|
686
|
+
],
|
|
687
|
+
"summary": "Submit execution feedback",
|
|
688
|
+
"description": "Upserts thumbs up/down feedback and mirrors it to the execution's Langfuse trace.",
|
|
689
|
+
"operationId": "putExecutionFeedback",
|
|
690
|
+
"security": [
|
|
691
|
+
{
|
|
692
|
+
"EpilotAuth": []
|
|
693
|
+
}
|
|
694
|
+
],
|
|
695
|
+
"parameters": [
|
|
696
|
+
{
|
|
697
|
+
"name": "execution_id",
|
|
698
|
+
"in": "path",
|
|
699
|
+
"required": true,
|
|
700
|
+
"schema": {
|
|
701
|
+
"type": "string",
|
|
702
|
+
"format": "uuid"
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
],
|
|
706
|
+
"requestBody": {
|
|
707
|
+
"required": true,
|
|
708
|
+
"content": {
|
|
709
|
+
"application/json": {
|
|
710
|
+
"schema": {
|
|
711
|
+
"$ref": "#/components/schemas/PutExecutionFeedbackRequest"
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
},
|
|
716
|
+
"responses": {
|
|
717
|
+
"200": {
|
|
718
|
+
"description": "Feedback recorded",
|
|
719
|
+
"content": {
|
|
720
|
+
"application/json": {
|
|
721
|
+
"schema": {
|
|
722
|
+
"$ref": "#/components/schemas/ExecutionFeedbackResponse"
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
},
|
|
727
|
+
"400": {
|
|
728
|
+
"description": "Invalid feedback",
|
|
729
|
+
"content": {
|
|
730
|
+
"application/json": {
|
|
731
|
+
"schema": {
|
|
732
|
+
"$ref": "#/components/schemas/Error"
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
},
|
|
737
|
+
"404": {
|
|
738
|
+
"description": "Execution not found",
|
|
739
|
+
"content": {
|
|
740
|
+
"application/json": {
|
|
741
|
+
"schema": {
|
|
742
|
+
"$ref": "#/components/schemas/Error"
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
},
|
|
747
|
+
"409": {
|
|
748
|
+
"description": "Execution cannot be rated",
|
|
749
|
+
"content": {
|
|
750
|
+
"application/json": {
|
|
751
|
+
"schema": {
|
|
752
|
+
"$ref": "#/components/schemas/Error"
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
},
|
|
760
|
+
"/v1/executions/{execution_id}/approve": {
|
|
761
|
+
"post": {
|
|
762
|
+
"tags": [
|
|
763
|
+
"Agent Execution"
|
|
764
|
+
],
|
|
765
|
+
"summary": "approveExecution",
|
|
766
|
+
"description": "Approves a pending tool action when execution is in waiting_approval status",
|
|
767
|
+
"operationId": "approveExecution",
|
|
768
|
+
"security": [
|
|
769
|
+
{
|
|
770
|
+
"EpilotAuth": []
|
|
771
|
+
}
|
|
772
|
+
],
|
|
773
|
+
"parameters": [
|
|
774
|
+
{
|
|
775
|
+
"name": "execution_id",
|
|
776
|
+
"in": "path",
|
|
777
|
+
"required": true,
|
|
778
|
+
"schema": {
|
|
779
|
+
"type": "string",
|
|
780
|
+
"format": "uuid"
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
],
|
|
784
|
+
"requestBody": {
|
|
785
|
+
"content": {
|
|
786
|
+
"application/json": {
|
|
787
|
+
"schema": {
|
|
788
|
+
"$ref": "#/components/schemas/ApproveExecutionRequest"
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
},
|
|
793
|
+
"responses": {
|
|
794
|
+
"200": {
|
|
795
|
+
"description": "Action approved",
|
|
796
|
+
"content": {
|
|
797
|
+
"application/json": {
|
|
798
|
+
"schema": {
|
|
799
|
+
"$ref": "#/components/schemas/ExecutionResponse"
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
},
|
|
804
|
+
"400": {
|
|
805
|
+
"description": "No pending action to approve",
|
|
806
|
+
"content": {
|
|
807
|
+
"application/json": {
|
|
808
|
+
"schema": {
|
|
809
|
+
"$ref": "#/components/schemas/Error"
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
},
|
|
814
|
+
"404": {
|
|
815
|
+
"description": "Execution not found",
|
|
816
|
+
"content": {
|
|
817
|
+
"application/json": {
|
|
818
|
+
"schema": {
|
|
819
|
+
"$ref": "#/components/schemas/Error"
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
},
|
|
827
|
+
"/v1/executions/{execution_id}/reject": {
|
|
828
|
+
"post": {
|
|
829
|
+
"tags": [
|
|
830
|
+
"Agent Execution"
|
|
831
|
+
],
|
|
832
|
+
"summary": "rejectExecution",
|
|
833
|
+
"description": "Rejects a pending tool action when execution is in waiting_approval status",
|
|
834
|
+
"operationId": "rejectExecution",
|
|
835
|
+
"security": [
|
|
836
|
+
{
|
|
837
|
+
"EpilotAuth": []
|
|
838
|
+
}
|
|
839
|
+
],
|
|
840
|
+
"parameters": [
|
|
841
|
+
{
|
|
842
|
+
"name": "execution_id",
|
|
843
|
+
"in": "path",
|
|
844
|
+
"required": true,
|
|
845
|
+
"schema": {
|
|
846
|
+
"type": "string",
|
|
847
|
+
"format": "uuid"
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
],
|
|
851
|
+
"requestBody": {
|
|
852
|
+
"required": true,
|
|
853
|
+
"content": {
|
|
854
|
+
"application/json": {
|
|
855
|
+
"schema": {
|
|
856
|
+
"$ref": "#/components/schemas/RejectExecutionRequest"
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
},
|
|
861
|
+
"responses": {
|
|
862
|
+
"200": {
|
|
863
|
+
"description": "Action rejected",
|
|
864
|
+
"content": {
|
|
865
|
+
"application/json": {
|
|
866
|
+
"schema": {
|
|
867
|
+
"$ref": "#/components/schemas/ExecutionResponse"
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
},
|
|
872
|
+
"400": {
|
|
873
|
+
"description": "No pending action to reject",
|
|
874
|
+
"content": {
|
|
875
|
+
"application/json": {
|
|
876
|
+
"schema": {
|
|
877
|
+
"$ref": "#/components/schemas/Error"
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
},
|
|
882
|
+
"404": {
|
|
883
|
+
"description": "Execution not found",
|
|
884
|
+
"content": {
|
|
885
|
+
"application/json": {
|
|
886
|
+
"schema": {
|
|
887
|
+
"$ref": "#/components/schemas/Error"
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
},
|
|
895
|
+
"/v1/executions/{execution_id}/stream": {
|
|
896
|
+
"get": {
|
|
897
|
+
"tags": [
|
|
898
|
+
"Agent Execution"
|
|
899
|
+
],
|
|
900
|
+
"summary": "streamExecution",
|
|
901
|
+
"description": "Reconnects to an execution's event stream after approval. Replays missed events from event log and continues streaming if execution is still running.",
|
|
902
|
+
"operationId": "streamExecution",
|
|
903
|
+
"security": [
|
|
904
|
+
{
|
|
905
|
+
"EpilotAuth": []
|
|
906
|
+
}
|
|
907
|
+
],
|
|
908
|
+
"parameters": [
|
|
909
|
+
{
|
|
910
|
+
"name": "execution_id",
|
|
911
|
+
"in": "path",
|
|
912
|
+
"required": true,
|
|
913
|
+
"schema": {
|
|
914
|
+
"type": "string",
|
|
915
|
+
"format": "uuid"
|
|
916
|
+
}
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
"name": "from_sequence",
|
|
920
|
+
"in": "query",
|
|
921
|
+
"schema": {
|
|
922
|
+
"type": "integer"
|
|
923
|
+
},
|
|
924
|
+
"description": "Resume from this event sequence number (for reconnection)"
|
|
925
|
+
}
|
|
926
|
+
],
|
|
927
|
+
"responses": {
|
|
928
|
+
"200": {
|
|
929
|
+
"description": "SSE stream of execution events",
|
|
930
|
+
"content": {
|
|
931
|
+
"text/event-stream": {
|
|
932
|
+
"schema": {
|
|
933
|
+
"$ref": "#/components/schemas/StreamEvent"
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
},
|
|
938
|
+
"404": {
|
|
939
|
+
"description": "Execution not found",
|
|
940
|
+
"content": {
|
|
941
|
+
"application/json": {
|
|
942
|
+
"schema": {
|
|
943
|
+
"$ref": "#/components/schemas/Error"
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
},
|
|
951
|
+
"/v1/chat": {
|
|
952
|
+
"post": {
|
|
953
|
+
"tags": [
|
|
954
|
+
"Chat"
|
|
955
|
+
],
|
|
956
|
+
"summary": "chat",
|
|
957
|
+
"description": "Initiates a streaming chat session with an AI agent. Supports server-side conversation memory via conversationId or client-provided history via clientHistory.",
|
|
958
|
+
"operationId": "chat",
|
|
959
|
+
"security": [
|
|
960
|
+
{
|
|
961
|
+
"EpilotAuth": []
|
|
962
|
+
}
|
|
963
|
+
],
|
|
964
|
+
"requestBody": {
|
|
965
|
+
"required": true,
|
|
966
|
+
"content": {
|
|
967
|
+
"application/json": {
|
|
968
|
+
"schema": {
|
|
969
|
+
"$ref": "#/components/schemas/ChatRequest"
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
},
|
|
974
|
+
"responses": {
|
|
975
|
+
"200": {
|
|
976
|
+
"description": "SSE stream of chat events",
|
|
977
|
+
"content": {
|
|
978
|
+
"text/event-stream": {
|
|
979
|
+
"schema": {
|
|
980
|
+
"$ref": "#/components/schemas/StreamEvent"
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
},
|
|
985
|
+
"400": {
|
|
986
|
+
"description": "Invalid request",
|
|
987
|
+
"content": {
|
|
988
|
+
"application/json": {
|
|
989
|
+
"schema": {
|
|
990
|
+
"$ref": "#/components/schemas/Error"
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
},
|
|
995
|
+
"404": {
|
|
996
|
+
"description": "Agent not found",
|
|
997
|
+
"content": {
|
|
998
|
+
"application/json": {
|
|
999
|
+
"schema": {
|
|
1000
|
+
"$ref": "#/components/schemas/Error"
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
},
|
|
1008
|
+
"/v1/conversations": {
|
|
1009
|
+
"get": {
|
|
1010
|
+
"tags": [
|
|
1011
|
+
"Conversations"
|
|
1012
|
+
],
|
|
1013
|
+
"summary": "listConversations",
|
|
1014
|
+
"description": "Lists conversations for the authenticated user, sorted by most recent.",
|
|
1015
|
+
"operationId": "listConversations",
|
|
1016
|
+
"security": [
|
|
1017
|
+
{
|
|
1018
|
+
"EpilotAuth": []
|
|
1019
|
+
}
|
|
1020
|
+
],
|
|
1021
|
+
"parameters": [
|
|
1022
|
+
{
|
|
1023
|
+
"name": "agent_id",
|
|
1024
|
+
"in": "query",
|
|
1025
|
+
"schema": {
|
|
1026
|
+
"type": "string"
|
|
1027
|
+
},
|
|
1028
|
+
"description": "Filter by agent ID"
|
|
1029
|
+
},
|
|
1030
|
+
{
|
|
1031
|
+
"name": "limit",
|
|
1032
|
+
"in": "query",
|
|
1033
|
+
"schema": {
|
|
1034
|
+
"type": "integer",
|
|
1035
|
+
"default": 20
|
|
1036
|
+
},
|
|
1037
|
+
"description": "Maximum number of conversations to return"
|
|
1038
|
+
},
|
|
1039
|
+
{
|
|
1040
|
+
"name": "cursor",
|
|
1041
|
+
"in": "query",
|
|
1042
|
+
"schema": {
|
|
1043
|
+
"type": "string"
|
|
1044
|
+
},
|
|
1045
|
+
"description": "Pagination cursor"
|
|
1046
|
+
}
|
|
1047
|
+
],
|
|
1048
|
+
"responses": {
|
|
1049
|
+
"200": {
|
|
1050
|
+
"description": "List of conversations",
|
|
1051
|
+
"content": {
|
|
1052
|
+
"application/json": {
|
|
1053
|
+
"schema": {
|
|
1054
|
+
"$ref": "#/components/schemas/ListConversationsResponse"
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
},
|
|
1059
|
+
"400": {
|
|
1060
|
+
"description": "Error fetching conversations",
|
|
1061
|
+
"content": {
|
|
1062
|
+
"application/json": {
|
|
1063
|
+
"schema": {
|
|
1064
|
+
"$ref": "#/components/schemas/Error"
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
},
|
|
1072
|
+
"/v1/conversations/{conversation_id}": {
|
|
1073
|
+
"get": {
|
|
1074
|
+
"tags": [
|
|
1075
|
+
"Conversations"
|
|
1076
|
+
],
|
|
1077
|
+
"summary": "getConversation",
|
|
1078
|
+
"description": "Retrieves a conversation and its message history.",
|
|
1079
|
+
"operationId": "getConversation",
|
|
1080
|
+
"security": [
|
|
1081
|
+
{
|
|
1082
|
+
"EpilotAuth": []
|
|
1083
|
+
}
|
|
1084
|
+
],
|
|
1085
|
+
"parameters": [
|
|
1086
|
+
{
|
|
1087
|
+
"name": "conversation_id",
|
|
1088
|
+
"in": "path",
|
|
1089
|
+
"required": true,
|
|
1090
|
+
"schema": {
|
|
1091
|
+
"type": "string",
|
|
1092
|
+
"format": "uuid"
|
|
1093
|
+
}
|
|
1094
|
+
},
|
|
1095
|
+
{
|
|
1096
|
+
"name": "message_limit",
|
|
1097
|
+
"in": "query",
|
|
1098
|
+
"schema": {
|
|
1099
|
+
"type": "integer",
|
|
1100
|
+
"default": 100
|
|
1101
|
+
},
|
|
1102
|
+
"description": "Maximum number of messages to return"
|
|
1103
|
+
}
|
|
1104
|
+
],
|
|
1105
|
+
"responses": {
|
|
1106
|
+
"200": {
|
|
1107
|
+
"description": "Conversation with messages",
|
|
1108
|
+
"content": {
|
|
1109
|
+
"application/json": {
|
|
1110
|
+
"schema": {
|
|
1111
|
+
"$ref": "#/components/schemas/ConversationWithMessages"
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
},
|
|
1116
|
+
"404": {
|
|
1117
|
+
"description": "Conversation not found",
|
|
1118
|
+
"content": {
|
|
1119
|
+
"application/json": {
|
|
1120
|
+
"schema": {
|
|
1121
|
+
"$ref": "#/components/schemas/Error"
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
},
|
|
1128
|
+
"delete": {
|
|
1129
|
+
"tags": [
|
|
1130
|
+
"Conversations"
|
|
1131
|
+
],
|
|
1132
|
+
"summary": "deleteConversation",
|
|
1133
|
+
"description": "Deletes a conversation and all its messages.",
|
|
1134
|
+
"operationId": "deleteConversation",
|
|
1135
|
+
"security": [
|
|
1136
|
+
{
|
|
1137
|
+
"EpilotAuth": []
|
|
1138
|
+
}
|
|
1139
|
+
],
|
|
1140
|
+
"parameters": [
|
|
1141
|
+
{
|
|
1142
|
+
"name": "conversation_id",
|
|
1143
|
+
"in": "path",
|
|
1144
|
+
"required": true,
|
|
1145
|
+
"schema": {
|
|
1146
|
+
"type": "string",
|
|
1147
|
+
"format": "uuid"
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
],
|
|
1151
|
+
"responses": {
|
|
1152
|
+
"204": {
|
|
1153
|
+
"description": "Conversation deleted"
|
|
1154
|
+
},
|
|
1155
|
+
"404": {
|
|
1156
|
+
"description": "Conversation not found",
|
|
1157
|
+
"content": {
|
|
1158
|
+
"application/json": {
|
|
1159
|
+
"schema": {
|
|
1160
|
+
"$ref": "#/components/schemas/Error"
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
},
|
|
1168
|
+
"/v1/conversations/{conversation_id}/feedback": {
|
|
1169
|
+
"post": {
|
|
1170
|
+
"tags": [
|
|
1171
|
+
"Conversations"
|
|
1172
|
+
],
|
|
1173
|
+
"summary": "submitConversationFeedback",
|
|
1174
|
+
"description": "Records a thumbs up/down (with optional comment) for the assistant turn identified by its Langfuse trace id. The rating is persisted on the message and mirrored to Langfuse as a trace score.\n",
|
|
1175
|
+
"operationId": "submitConversationFeedback",
|
|
1176
|
+
"security": [
|
|
1177
|
+
{
|
|
1178
|
+
"EpilotAuth": []
|
|
1179
|
+
}
|
|
1180
|
+
],
|
|
1181
|
+
"parameters": [
|
|
1182
|
+
{
|
|
1183
|
+
"name": "conversation_id",
|
|
1184
|
+
"in": "path",
|
|
1185
|
+
"required": true,
|
|
1186
|
+
"schema": {
|
|
1187
|
+
"type": "string",
|
|
1188
|
+
"format": "uuid"
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
],
|
|
1192
|
+
"requestBody": {
|
|
1193
|
+
"required": true,
|
|
1194
|
+
"content": {
|
|
1195
|
+
"application/json": {
|
|
1196
|
+
"schema": {
|
|
1197
|
+
"$ref": "#/components/schemas/SubmitFeedbackRequest"
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
},
|
|
1202
|
+
"responses": {
|
|
1203
|
+
"200": {
|
|
1204
|
+
"description": "Feedback recorded",
|
|
1205
|
+
"content": {
|
|
1206
|
+
"application/json": {
|
|
1207
|
+
"schema": {
|
|
1208
|
+
"type": "object",
|
|
1209
|
+
"properties": {
|
|
1210
|
+
"feedback": {
|
|
1211
|
+
"$ref": "#/components/schemas/MessageFeedback"
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
},
|
|
1218
|
+
"400": {
|
|
1219
|
+
"description": "Invalid request",
|
|
1220
|
+
"content": {
|
|
1221
|
+
"application/json": {
|
|
1222
|
+
"schema": {
|
|
1223
|
+
"$ref": "#/components/schemas/Error"
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
},
|
|
1228
|
+
"404": {
|
|
1229
|
+
"description": "Conversation or message not found",
|
|
1230
|
+
"content": {
|
|
1231
|
+
"application/json": {
|
|
1232
|
+
"schema": {
|
|
1233
|
+
"$ref": "#/components/schemas/Error"
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
},
|
|
1242
|
+
"components": {
|
|
1243
|
+
"securitySchemes": {
|
|
1244
|
+
"EpilotAuth": {
|
|
1245
|
+
"type": "http",
|
|
1246
|
+
"scheme": "bearer",
|
|
1247
|
+
"description": "Authorization header with epilot OAuth2 bearer token. Supports RFC8725 for JWT validation.",
|
|
1248
|
+
"bearerFormat": "JWT"
|
|
1249
|
+
}
|
|
1250
|
+
},
|
|
1251
|
+
"schemas": {
|
|
1252
|
+
"AgentId": {
|
|
1253
|
+
"type": "string",
|
|
1254
|
+
"description": "Agent identifier. Can be either:\n- System skill ID (prefixed): \"skill:email-categorizer\", \"skill:email-labeler\"\n- Custom agent UUID: \"0336a235-9417-4dd8-894c-fe81285bba75\"\n",
|
|
1255
|
+
"example": "skill:email-categorizer"
|
|
1256
|
+
},
|
|
1257
|
+
"CreateAgentRequest": {
|
|
1258
|
+
"type": "object",
|
|
1259
|
+
"required": [
|
|
1260
|
+
"name",
|
|
1261
|
+
"system_prompt",
|
|
1262
|
+
"execution_pattern"
|
|
1263
|
+
],
|
|
1264
|
+
"properties": {
|
|
1265
|
+
"name": {
|
|
1266
|
+
"type": "string",
|
|
1267
|
+
"minLength": 1,
|
|
1268
|
+
"maxLength": 100,
|
|
1269
|
+
"example": "Email Reply Generator"
|
|
1270
|
+
},
|
|
1271
|
+
"description": {
|
|
1272
|
+
"type": "string",
|
|
1273
|
+
"maxLength": 1000
|
|
1274
|
+
},
|
|
1275
|
+
"category": {
|
|
1276
|
+
"$ref": "#/components/schemas/SkillCategory"
|
|
1277
|
+
},
|
|
1278
|
+
"icon": {
|
|
1279
|
+
"type": "string",
|
|
1280
|
+
"example": "mail-reply"
|
|
1281
|
+
},
|
|
1282
|
+
"system_prompt": {
|
|
1283
|
+
"type": "string",
|
|
1284
|
+
"minLength": 1,
|
|
1285
|
+
"description": "Core LLM instructions"
|
|
1286
|
+
},
|
|
1287
|
+
"tools": {
|
|
1288
|
+
"type": "array",
|
|
1289
|
+
"items": {
|
|
1290
|
+
"type": "string"
|
|
1291
|
+
},
|
|
1292
|
+
"description": "Tool IDs this agent can use",
|
|
1293
|
+
"example": [
|
|
1294
|
+
"entity.search",
|
|
1295
|
+
"message.draft"
|
|
1296
|
+
]
|
|
1297
|
+
},
|
|
1298
|
+
"model_config": {
|
|
1299
|
+
"$ref": "#/components/schemas/ModelConfig"
|
|
1300
|
+
},
|
|
1301
|
+
"max_iterations": {
|
|
1302
|
+
"type": "integer",
|
|
1303
|
+
"minimum": 1,
|
|
1304
|
+
"maximum": 20,
|
|
1305
|
+
"default": 10,
|
|
1306
|
+
"description": "Max ReAct loop iterations"
|
|
1307
|
+
},
|
|
1308
|
+
"execution_pattern": {
|
|
1309
|
+
"$ref": "#/components/schemas/ExecutionPattern"
|
|
1310
|
+
},
|
|
1311
|
+
"execution_mode": {
|
|
1312
|
+
"$ref": "#/components/schemas/ExecutionMode"
|
|
1313
|
+
},
|
|
1314
|
+
"output_schema": {
|
|
1315
|
+
"type": "object",
|
|
1316
|
+
"description": "JSON Schema for expected output"
|
|
1317
|
+
},
|
|
1318
|
+
"input_parameters_schema": {
|
|
1319
|
+
"$ref": "#/components/schemas/InputParametersSchema"
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
},
|
|
1323
|
+
"UpdateAgentRequest": {
|
|
1324
|
+
"type": "object",
|
|
1325
|
+
"properties": {
|
|
1326
|
+
"name": {
|
|
1327
|
+
"type": "string",
|
|
1328
|
+
"minLength": 1,
|
|
1329
|
+
"maxLength": 100
|
|
1330
|
+
},
|
|
1331
|
+
"description": {
|
|
1332
|
+
"type": "string",
|
|
1333
|
+
"maxLength": 1000
|
|
1334
|
+
},
|
|
1335
|
+
"category": {
|
|
1336
|
+
"$ref": "#/components/schemas/SkillCategory"
|
|
1337
|
+
},
|
|
1338
|
+
"icon": {
|
|
1339
|
+
"type": "string"
|
|
1340
|
+
},
|
|
1341
|
+
"system_prompt": {
|
|
1342
|
+
"type": "string",
|
|
1343
|
+
"minLength": 1
|
|
1344
|
+
},
|
|
1345
|
+
"tools": {
|
|
1346
|
+
"type": "array",
|
|
1347
|
+
"items": {
|
|
1348
|
+
"type": "string"
|
|
1349
|
+
}
|
|
1350
|
+
},
|
|
1351
|
+
"model_config": {
|
|
1352
|
+
"$ref": "#/components/schemas/ModelConfig"
|
|
1353
|
+
},
|
|
1354
|
+
"max_iterations": {
|
|
1355
|
+
"type": "integer",
|
|
1356
|
+
"minimum": 1,
|
|
1357
|
+
"maximum": 20
|
|
1358
|
+
},
|
|
1359
|
+
"execution_pattern": {
|
|
1360
|
+
"$ref": "#/components/schemas/ExecutionPattern"
|
|
1361
|
+
},
|
|
1362
|
+
"execution_mode": {
|
|
1363
|
+
"$ref": "#/components/schemas/ExecutionMode"
|
|
1364
|
+
},
|
|
1365
|
+
"output_schema": {
|
|
1366
|
+
"type": "object"
|
|
1367
|
+
},
|
|
1368
|
+
"input_parameters_schema": {
|
|
1369
|
+
"$ref": "#/components/schemas/InputParametersSchema"
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
},
|
|
1373
|
+
"AgentDefinition": {
|
|
1374
|
+
"type": "object",
|
|
1375
|
+
"properties": {
|
|
1376
|
+
"agent_id": {
|
|
1377
|
+
"$ref": "#/components/schemas/AgentId"
|
|
1378
|
+
},
|
|
1379
|
+
"org_id": {
|
|
1380
|
+
"type": "string"
|
|
1381
|
+
},
|
|
1382
|
+
"name": {
|
|
1383
|
+
"type": "string"
|
|
1384
|
+
},
|
|
1385
|
+
"description": {
|
|
1386
|
+
"type": "string"
|
|
1387
|
+
},
|
|
1388
|
+
"category": {
|
|
1389
|
+
"$ref": "#/components/schemas/SkillCategory"
|
|
1390
|
+
},
|
|
1391
|
+
"icon": {
|
|
1392
|
+
"type": "string"
|
|
1393
|
+
},
|
|
1394
|
+
"source": {
|
|
1395
|
+
"$ref": "#/components/schemas/AgentSource"
|
|
1396
|
+
},
|
|
1397
|
+
"availability": {
|
|
1398
|
+
"type": "array",
|
|
1399
|
+
"items": {
|
|
1400
|
+
"$ref": "#/components/schemas/SkillAvailability"
|
|
1401
|
+
},
|
|
1402
|
+
"description": "Where this agent/skill is available (flows, copilot, or both)",
|
|
1403
|
+
"example": [
|
|
1404
|
+
"flows",
|
|
1405
|
+
"copilot"
|
|
1406
|
+
]
|
|
1407
|
+
},
|
|
1408
|
+
"allowed_entity_schemas": {
|
|
1409
|
+
"type": "array",
|
|
1410
|
+
"items": {
|
|
1411
|
+
"type": "string"
|
|
1412
|
+
},
|
|
1413
|
+
"description": "Entity schemas this skill is allowed to work with (e.g., [\"message\"] for email skills)",
|
|
1414
|
+
"example": [
|
|
1415
|
+
"message"
|
|
1416
|
+
]
|
|
1417
|
+
},
|
|
1418
|
+
"system_prompt": {
|
|
1419
|
+
"type": "string"
|
|
1420
|
+
},
|
|
1421
|
+
"tools": {
|
|
1422
|
+
"type": "array",
|
|
1423
|
+
"items": {
|
|
1424
|
+
"type": "string"
|
|
1425
|
+
}
|
|
1426
|
+
},
|
|
1427
|
+
"model_config": {
|
|
1428
|
+
"$ref": "#/components/schemas/ModelConfig"
|
|
1429
|
+
},
|
|
1430
|
+
"max_iterations": {
|
|
1431
|
+
"type": "integer"
|
|
1432
|
+
},
|
|
1433
|
+
"execution_pattern": {
|
|
1434
|
+
"$ref": "#/components/schemas/ExecutionPattern"
|
|
1435
|
+
},
|
|
1436
|
+
"execution_mode": {
|
|
1437
|
+
"$ref": "#/components/schemas/ExecutionMode"
|
|
1438
|
+
},
|
|
1439
|
+
"output_schema": {
|
|
1440
|
+
"type": "object"
|
|
1441
|
+
},
|
|
1442
|
+
"input_parameters_schema": {
|
|
1443
|
+
"$ref": "#/components/schemas/InputParametersSchema"
|
|
1444
|
+
},
|
|
1445
|
+
"version": {
|
|
1446
|
+
"type": "integer"
|
|
1447
|
+
},
|
|
1448
|
+
"created_at": {
|
|
1449
|
+
"type": "string",
|
|
1450
|
+
"format": "date-time"
|
|
1451
|
+
},
|
|
1452
|
+
"updated_at": {
|
|
1453
|
+
"type": "string",
|
|
1454
|
+
"format": "date-time"
|
|
1455
|
+
},
|
|
1456
|
+
"created_by": {
|
|
1457
|
+
"type": "string"
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
},
|
|
1461
|
+
"ListAgentsResponse": {
|
|
1462
|
+
"type": "object",
|
|
1463
|
+
"properties": {
|
|
1464
|
+
"agents": {
|
|
1465
|
+
"type": "array",
|
|
1466
|
+
"items": {
|
|
1467
|
+
"$ref": "#/components/schemas/AgentDefinition"
|
|
1468
|
+
}
|
|
1469
|
+
},
|
|
1470
|
+
"next_cursor": {
|
|
1471
|
+
"type": "string",
|
|
1472
|
+
"nullable": true
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
},
|
|
1476
|
+
"ListExecutionsResponse": {
|
|
1477
|
+
"type": "object",
|
|
1478
|
+
"properties": {
|
|
1479
|
+
"executions": {
|
|
1480
|
+
"type": "array",
|
|
1481
|
+
"items": {
|
|
1482
|
+
"$ref": "#/components/schemas/ExecutionResponse"
|
|
1483
|
+
}
|
|
1484
|
+
},
|
|
1485
|
+
"next_cursor": {
|
|
1486
|
+
"type": "string",
|
|
1487
|
+
"nullable": true
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
},
|
|
1491
|
+
"ApproveExecutionRequest": {
|
|
1492
|
+
"type": "object",
|
|
1493
|
+
"properties": {
|
|
1494
|
+
"reason": {
|
|
1495
|
+
"type": "string",
|
|
1496
|
+
"description": "Optional reason for approval"
|
|
1497
|
+
},
|
|
1498
|
+
"approved_action_ids": {
|
|
1499
|
+
"type": "array",
|
|
1500
|
+
"items": {
|
|
1501
|
+
"type": "string"
|
|
1502
|
+
},
|
|
1503
|
+
"description": "For batch approval - list of action IDs to approve. If not provided, all actions are approved."
|
|
1504
|
+
},
|
|
1505
|
+
"rejected_action_ids": {
|
|
1506
|
+
"type": "array",
|
|
1507
|
+
"items": {
|
|
1508
|
+
"type": "string"
|
|
1509
|
+
},
|
|
1510
|
+
"description": "For batch approval - list of action IDs to reject. Actions not in approved_action_ids are implicitly rejected."
|
|
1511
|
+
}
|
|
1512
|
+
}
|
|
1513
|
+
},
|
|
1514
|
+
"RejectExecutionRequest": {
|
|
1515
|
+
"type": "object",
|
|
1516
|
+
"required": [
|
|
1517
|
+
"reason"
|
|
1518
|
+
],
|
|
1519
|
+
"properties": {
|
|
1520
|
+
"reason": {
|
|
1521
|
+
"type": "string",
|
|
1522
|
+
"description": "Reason for rejection"
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
},
|
|
1526
|
+
"ExecuteAgentRequest": {
|
|
1527
|
+
"type": "object",
|
|
1528
|
+
"properties": {
|
|
1529
|
+
"input": {
|
|
1530
|
+
"type": "object",
|
|
1531
|
+
"properties": {
|
|
1532
|
+
"entity_id": {
|
|
1533
|
+
"type": "string",
|
|
1534
|
+
"description": "Primary entity ID for context"
|
|
1535
|
+
},
|
|
1536
|
+
"entity_schema": {
|
|
1537
|
+
"type": "string",
|
|
1538
|
+
"description": "Schema of the primary entity (e.g., \"message\", \"contact\")"
|
|
1539
|
+
},
|
|
1540
|
+
"workflow_id": {
|
|
1541
|
+
"type": "string"
|
|
1542
|
+
},
|
|
1543
|
+
"workflow_execution_id": {
|
|
1544
|
+
"type": "string"
|
|
1545
|
+
},
|
|
1546
|
+
"task_id": {
|
|
1547
|
+
"type": "string"
|
|
1548
|
+
},
|
|
1549
|
+
"custom_data": {
|
|
1550
|
+
"type": "object",
|
|
1551
|
+
"additionalProperties": true
|
|
1552
|
+
},
|
|
1553
|
+
"flow_context": {
|
|
1554
|
+
"type": "array",
|
|
1555
|
+
"description": "Array of entities from the flow trigger context (e.g., the message entity when triggered by email receive)",
|
|
1556
|
+
"items": {
|
|
1557
|
+
"type": "object",
|
|
1558
|
+
"properties": {
|
|
1559
|
+
"entity_id": {
|
|
1560
|
+
"type": "string"
|
|
1561
|
+
},
|
|
1562
|
+
"entity_schema": {
|
|
1563
|
+
"type": "string"
|
|
1564
|
+
}
|
|
1565
|
+
},
|
|
1566
|
+
"required": [
|
|
1567
|
+
"entity_id",
|
|
1568
|
+
"entity_schema"
|
|
1569
|
+
]
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
},
|
|
1574
|
+
"parameters": {
|
|
1575
|
+
"type": "object",
|
|
1576
|
+
"additionalProperties": true,
|
|
1577
|
+
"description": "Runtime parameters (validated against input_parameters_schema)"
|
|
1578
|
+
},
|
|
1579
|
+
"execution_mode_override": {
|
|
1580
|
+
"$ref": "#/components/schemas/ExecutionMode"
|
|
1581
|
+
},
|
|
1582
|
+
"execution_context": {
|
|
1583
|
+
"$ref": "#/components/schemas/ExecutionContext"
|
|
1584
|
+
},
|
|
1585
|
+
"callback_url": {
|
|
1586
|
+
"type": "string",
|
|
1587
|
+
"format": "uri",
|
|
1588
|
+
"description": "Webhook URL for async completion notification"
|
|
1589
|
+
},
|
|
1590
|
+
"timeout_ms": {
|
|
1591
|
+
"type": "integer",
|
|
1592
|
+
"default": 30000,
|
|
1593
|
+
"maximum": 300000,
|
|
1594
|
+
"description": "Execution timeout in milliseconds"
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
},
|
|
1598
|
+
"ExecutionResponse": {
|
|
1599
|
+
"type": "object",
|
|
1600
|
+
"properties": {
|
|
1601
|
+
"execution_id": {
|
|
1602
|
+
"type": "string",
|
|
1603
|
+
"format": "uuid"
|
|
1604
|
+
},
|
|
1605
|
+
"agent_id": {
|
|
1606
|
+
"$ref": "#/components/schemas/AgentId"
|
|
1607
|
+
},
|
|
1608
|
+
"agent_source": {
|
|
1609
|
+
"$ref": "#/components/schemas/AgentSource"
|
|
1610
|
+
},
|
|
1611
|
+
"agent_name": {
|
|
1612
|
+
"type": "string",
|
|
1613
|
+
"description": "Human-readable agent name (denormalized for display)"
|
|
1614
|
+
},
|
|
1615
|
+
"execution_context": {
|
|
1616
|
+
"$ref": "#/components/schemas/ExecutionContext"
|
|
1617
|
+
},
|
|
1618
|
+
"org_id": {
|
|
1619
|
+
"type": "string"
|
|
1620
|
+
},
|
|
1621
|
+
"status": {
|
|
1622
|
+
"$ref": "#/components/schemas/ExecutionStatus"
|
|
1623
|
+
},
|
|
1624
|
+
"input": {
|
|
1625
|
+
"type": "object"
|
|
1626
|
+
},
|
|
1627
|
+
"parameters": {
|
|
1628
|
+
"type": "object"
|
|
1629
|
+
},
|
|
1630
|
+
"result": {
|
|
1631
|
+
"type": "object",
|
|
1632
|
+
"nullable": true,
|
|
1633
|
+
"description": "Execution result (when status=completed)",
|
|
1634
|
+
"properties": {
|
|
1635
|
+
"response": {
|
|
1636
|
+
"type": "string",
|
|
1637
|
+
"description": "Text response from the agent"
|
|
1638
|
+
},
|
|
1639
|
+
"structured_output": {
|
|
1640
|
+
"type": "object",
|
|
1641
|
+
"nullable": true,
|
|
1642
|
+
"description": "Parsed structured output (only for direct mode with output_schema)"
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
},
|
|
1646
|
+
"error": {
|
|
1647
|
+
"$ref": "#/components/schemas/ExecutionError"
|
|
1648
|
+
},
|
|
1649
|
+
"pending_action": {
|
|
1650
|
+
"$ref": "#/components/schemas/PendingAction"
|
|
1651
|
+
},
|
|
1652
|
+
"metrics": {
|
|
1653
|
+
"$ref": "#/components/schemas/ExecutionMetrics"
|
|
1654
|
+
},
|
|
1655
|
+
"started_at": {
|
|
1656
|
+
"type": "string",
|
|
1657
|
+
"format": "date-time"
|
|
1658
|
+
},
|
|
1659
|
+
"completed_at": {
|
|
1660
|
+
"type": "string",
|
|
1661
|
+
"format": "date-time",
|
|
1662
|
+
"nullable": true
|
|
1663
|
+
},
|
|
1664
|
+
"iterations": {
|
|
1665
|
+
"type": "array",
|
|
1666
|
+
"description": "Slim, labels-only step-progress projection of the ReAct iterations (empty for direct mode). Exposes only index, tool, status, and timestamp — raw thought, action input, and observation are intentionally excluded.",
|
|
1667
|
+
"items": {
|
|
1668
|
+
"$ref": "#/components/schemas/ExecutionIterationProjection"
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
},
|
|
1673
|
+
"ExecutionIterationProjection": {
|
|
1674
|
+
"type": "object",
|
|
1675
|
+
"properties": {
|
|
1676
|
+
"index": {
|
|
1677
|
+
"type": "integer"
|
|
1678
|
+
},
|
|
1679
|
+
"tool": {
|
|
1680
|
+
"type": "string",
|
|
1681
|
+
"nullable": true,
|
|
1682
|
+
"description": "Tool id the iteration invoked, or null for a non-tool step"
|
|
1683
|
+
},
|
|
1684
|
+
"status": {
|
|
1685
|
+
"type": "string",
|
|
1686
|
+
"enum": [
|
|
1687
|
+
"running",
|
|
1688
|
+
"completed"
|
|
1689
|
+
]
|
|
1690
|
+
},
|
|
1691
|
+
"timestamp": {
|
|
1692
|
+
"type": "string",
|
|
1693
|
+
"format": "date-time"
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
},
|
|
1697
|
+
"ExecutionFeedback": {
|
|
1698
|
+
"type": "object",
|
|
1699
|
+
"required": [
|
|
1700
|
+
"rating",
|
|
1701
|
+
"user_id",
|
|
1702
|
+
"submitted_at"
|
|
1703
|
+
],
|
|
1704
|
+
"properties": {
|
|
1705
|
+
"rating": {
|
|
1706
|
+
"type": "string",
|
|
1707
|
+
"enum": [
|
|
1708
|
+
"up",
|
|
1709
|
+
"down"
|
|
1710
|
+
]
|
|
1711
|
+
},
|
|
1712
|
+
"comment": {
|
|
1713
|
+
"type": "string"
|
|
1714
|
+
},
|
|
1715
|
+
"user_id": {
|
|
1716
|
+
"type": "string"
|
|
1717
|
+
},
|
|
1718
|
+
"submitted_at": {
|
|
1719
|
+
"type": "string",
|
|
1720
|
+
"format": "date-time"
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1723
|
+
},
|
|
1724
|
+
"ExecutionFeedbackResponse": {
|
|
1725
|
+
"type": "object",
|
|
1726
|
+
"required": [
|
|
1727
|
+
"feedback"
|
|
1728
|
+
],
|
|
1729
|
+
"properties": {
|
|
1730
|
+
"feedback": {
|
|
1731
|
+
"allOf": [
|
|
1732
|
+
{
|
|
1733
|
+
"$ref": "#/components/schemas/ExecutionFeedback"
|
|
1734
|
+
}
|
|
1735
|
+
],
|
|
1736
|
+
"nullable": true
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
},
|
|
1740
|
+
"PutExecutionFeedbackRequest": {
|
|
1741
|
+
"type": "object",
|
|
1742
|
+
"required": [
|
|
1743
|
+
"rating"
|
|
1744
|
+
],
|
|
1745
|
+
"properties": {
|
|
1746
|
+
"rating": {
|
|
1747
|
+
"type": "string",
|
|
1748
|
+
"enum": [
|
|
1749
|
+
"up",
|
|
1750
|
+
"down"
|
|
1751
|
+
]
|
|
1752
|
+
},
|
|
1753
|
+
"comment": {
|
|
1754
|
+
"type": "string"
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1757
|
+
},
|
|
1758
|
+
"ExecutionTrace": {
|
|
1759
|
+
"type": "object",
|
|
1760
|
+
"properties": {
|
|
1761
|
+
"execution_id": {
|
|
1762
|
+
"type": "string",
|
|
1763
|
+
"format": "uuid"
|
|
1764
|
+
},
|
|
1765
|
+
"iterations": {
|
|
1766
|
+
"type": "array",
|
|
1767
|
+
"items": {
|
|
1768
|
+
"$ref": "#/components/schemas/ExecutionIteration"
|
|
1769
|
+
}
|
|
1770
|
+
},
|
|
1771
|
+
"total_iterations": {
|
|
1772
|
+
"type": "integer"
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
},
|
|
1776
|
+
"ExecutionIteration": {
|
|
1777
|
+
"type": "object",
|
|
1778
|
+
"properties": {
|
|
1779
|
+
"iteration_index": {
|
|
1780
|
+
"type": "integer"
|
|
1781
|
+
},
|
|
1782
|
+
"thought": {
|
|
1783
|
+
"type": "string",
|
|
1784
|
+
"description": "LLM reasoning/thinking"
|
|
1785
|
+
},
|
|
1786
|
+
"action": {
|
|
1787
|
+
"type": "object",
|
|
1788
|
+
"nullable": true,
|
|
1789
|
+
"properties": {
|
|
1790
|
+
"tool": {
|
|
1791
|
+
"type": "string"
|
|
1792
|
+
},
|
|
1793
|
+
"input": {
|
|
1794
|
+
"type": "object"
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
},
|
|
1798
|
+
"observation": {
|
|
1799
|
+
"type": "object",
|
|
1800
|
+
"nullable": true,
|
|
1801
|
+
"description": "Tool result"
|
|
1802
|
+
},
|
|
1803
|
+
"timestamp": {
|
|
1804
|
+
"type": "string",
|
|
1805
|
+
"format": "date-time"
|
|
1806
|
+
},
|
|
1807
|
+
"tokens_used": {
|
|
1808
|
+
"type": "integer"
|
|
1809
|
+
},
|
|
1810
|
+
"latency_ms": {
|
|
1811
|
+
"type": "integer"
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
},
|
|
1815
|
+
"PendingAction": {
|
|
1816
|
+
"type": "object",
|
|
1817
|
+
"nullable": true,
|
|
1818
|
+
"description": "Action waiting for approval (when status=waiting_approval)",
|
|
1819
|
+
"properties": {
|
|
1820
|
+
"tool": {
|
|
1821
|
+
"type": "string",
|
|
1822
|
+
"description": "Tool ID that requires approval"
|
|
1823
|
+
},
|
|
1824
|
+
"input": {
|
|
1825
|
+
"type": "object",
|
|
1826
|
+
"description": "Tool input parameters"
|
|
1827
|
+
},
|
|
1828
|
+
"description": {
|
|
1829
|
+
"type": "string",
|
|
1830
|
+
"description": "Human-readable description of the action"
|
|
1831
|
+
},
|
|
1832
|
+
"preview": {
|
|
1833
|
+
"$ref": "#/components/schemas/ToolPreview"
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
},
|
|
1837
|
+
"ExecutionError": {
|
|
1838
|
+
"type": "object",
|
|
1839
|
+
"nullable": true,
|
|
1840
|
+
"properties": {
|
|
1841
|
+
"code": {
|
|
1842
|
+
"type": "string",
|
|
1843
|
+
"enum": [
|
|
1844
|
+
"TIMEOUT",
|
|
1845
|
+
"MAX_ITERATIONS_EXCEEDED",
|
|
1846
|
+
"TOOL_EXECUTION_FAILED",
|
|
1847
|
+
"LLM_ERROR",
|
|
1848
|
+
"INVALID_OUTPUT",
|
|
1849
|
+
"REJECTED",
|
|
1850
|
+
"INTERNAL_ERROR"
|
|
1851
|
+
]
|
|
1852
|
+
},
|
|
1853
|
+
"message": {
|
|
1854
|
+
"type": "string"
|
|
1855
|
+
},
|
|
1856
|
+
"details": {
|
|
1857
|
+
"type": "object"
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
},
|
|
1861
|
+
"ExecutionMetrics": {
|
|
1862
|
+
"type": "object",
|
|
1863
|
+
"properties": {
|
|
1864
|
+
"total_tokens": {
|
|
1865
|
+
"type": "integer"
|
|
1866
|
+
},
|
|
1867
|
+
"input_tokens": {
|
|
1868
|
+
"type": "integer"
|
|
1869
|
+
},
|
|
1870
|
+
"output_tokens": {
|
|
1871
|
+
"type": "integer"
|
|
1872
|
+
},
|
|
1873
|
+
"total_cost_usd": {
|
|
1874
|
+
"type": "number",
|
|
1875
|
+
"format": "float"
|
|
1876
|
+
},
|
|
1877
|
+
"duration_ms": {
|
|
1878
|
+
"type": "integer"
|
|
1879
|
+
},
|
|
1880
|
+
"iteration_count": {
|
|
1881
|
+
"type": "integer"
|
|
1882
|
+
}
|
|
1883
|
+
}
|
|
1884
|
+
},
|
|
1885
|
+
"AgentExecutionEventStatus": {
|
|
1886
|
+
"type": "string",
|
|
1887
|
+
"description": "Lifecycle status carried on an agent execution event.\n\nDeliberately narrower than `ExecutionStatus`, which is the stored status of\nthe execution row: `pending` and `running` both surface as `started`, and\n`cancelled` surfaces as `failed`. Consumers must not assume the two\nvocabularies are interchangeable.\n",
|
|
1888
|
+
"enum": [
|
|
1889
|
+
"started",
|
|
1890
|
+
"completed",
|
|
1891
|
+
"failed",
|
|
1892
|
+
"approval_required"
|
|
1893
|
+
]
|
|
1894
|
+
},
|
|
1895
|
+
"AgentExecutionEvent": {
|
|
1896
|
+
"type": "object",
|
|
1897
|
+
"description": "Detail payload of the `agent-execution-status-update` event, published on\nthe AI Agents event bus with source `ai-agents`.\n\n`execution_context` and `input` are present on every status, so a consumer\ncan tell whether an execution is theirs, and what it belonged to, from the\nterminal event alone — without a secondary lookup.\n",
|
|
1898
|
+
"required": [
|
|
1899
|
+
"executionId",
|
|
1900
|
+
"agentId",
|
|
1901
|
+
"orgId",
|
|
1902
|
+
"execution_status"
|
|
1903
|
+
],
|
|
1904
|
+
"properties": {
|
|
1905
|
+
"executionId": {
|
|
1906
|
+
"type": "string",
|
|
1907
|
+
"description": "The agent execution this event reports on"
|
|
1908
|
+
},
|
|
1909
|
+
"agentId": {
|
|
1910
|
+
"$ref": "#/components/schemas/AgentId"
|
|
1911
|
+
},
|
|
1912
|
+
"orgId": {
|
|
1913
|
+
"type": "string"
|
|
1914
|
+
},
|
|
1915
|
+
"userId": {
|
|
1916
|
+
"type": "string"
|
|
1917
|
+
},
|
|
1918
|
+
"execution_status": {
|
|
1919
|
+
"$ref": "#/components/schemas/AgentExecutionEventStatus"
|
|
1920
|
+
},
|
|
1921
|
+
"execution_context": {
|
|
1922
|
+
"$ref": "#/components/schemas/ExecutionContext"
|
|
1923
|
+
},
|
|
1924
|
+
"input": {
|
|
1925
|
+
"type": "object",
|
|
1926
|
+
"additionalProperties": true,
|
|
1927
|
+
"description": "The execution input, as supplied by the caller of the execute endpoint"
|
|
1928
|
+
},
|
|
1929
|
+
"output": {
|
|
1930
|
+
"type": "object",
|
|
1931
|
+
"additionalProperties": true,
|
|
1932
|
+
"description": "Present on `completed` — the execution result"
|
|
1933
|
+
},
|
|
1934
|
+
"error": {
|
|
1935
|
+
"type": "object",
|
|
1936
|
+
"description": "Present on `failed`",
|
|
1937
|
+
"properties": {
|
|
1938
|
+
"message": {
|
|
1939
|
+
"type": "string"
|
|
1940
|
+
},
|
|
1941
|
+
"code": {
|
|
1942
|
+
"type": "string"
|
|
1943
|
+
},
|
|
1944
|
+
"stack": {
|
|
1945
|
+
"type": "string"
|
|
1946
|
+
}
|
|
1947
|
+
}
|
|
1948
|
+
},
|
|
1949
|
+
"duration": {
|
|
1950
|
+
"type": "integer",
|
|
1951
|
+
"description": "Wall-clock duration in milliseconds, present on `completed`"
|
|
1952
|
+
},
|
|
1953
|
+
"iterations": {
|
|
1954
|
+
"type": "integer"
|
|
1955
|
+
},
|
|
1956
|
+
"iteration": {
|
|
1957
|
+
"type": "integer"
|
|
1958
|
+
},
|
|
1959
|
+
"message": {
|
|
1960
|
+
"type": "string",
|
|
1961
|
+
"description": "Present on `approval_required` — what is awaiting approval"
|
|
1962
|
+
},
|
|
1963
|
+
"toolCalls": {
|
|
1964
|
+
"type": "array",
|
|
1965
|
+
"items": {
|
|
1966
|
+
"type": "object",
|
|
1967
|
+
"properties": {
|
|
1968
|
+
"name": {
|
|
1969
|
+
"type": "string"
|
|
1970
|
+
},
|
|
1971
|
+
"args": {
|
|
1972
|
+
"type": "object",
|
|
1973
|
+
"additionalProperties": true
|
|
1974
|
+
}
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1977
|
+
},
|
|
1978
|
+
"timestamp": {
|
|
1979
|
+
"type": "string",
|
|
1980
|
+
"format": "date-time"
|
|
1981
|
+
}
|
|
1982
|
+
}
|
|
1983
|
+
},
|
|
1984
|
+
"ToolPreview": {
|
|
1985
|
+
"type": "object",
|
|
1986
|
+
"description": "Structured preview data for approval UI. Provides a generic format that any tool can populate.",
|
|
1987
|
+
"properties": {
|
|
1988
|
+
"action": {
|
|
1989
|
+
"type": "object",
|
|
1990
|
+
"required": [
|
|
1991
|
+
"type",
|
|
1992
|
+
"verb"
|
|
1993
|
+
],
|
|
1994
|
+
"properties": {
|
|
1995
|
+
"type": {
|
|
1996
|
+
"$ref": "#/components/schemas/PreviewActionType"
|
|
1997
|
+
},
|
|
1998
|
+
"verb": {
|
|
1999
|
+
"type": "string",
|
|
2000
|
+
"description": "Human-readable action verb",
|
|
2001
|
+
"example": "Move Thread"
|
|
2002
|
+
}
|
|
2003
|
+
}
|
|
2004
|
+
},
|
|
2005
|
+
"source": {
|
|
2006
|
+
"$ref": "#/components/schemas/PreviewEntity"
|
|
2007
|
+
},
|
|
2008
|
+
"target": {
|
|
2009
|
+
"$ref": "#/components/schemas/PreviewEntity"
|
|
2010
|
+
},
|
|
2011
|
+
"changes": {
|
|
2012
|
+
"type": "array",
|
|
2013
|
+
"items": {
|
|
2014
|
+
"$ref": "#/components/schemas/PreviewChange"
|
|
2015
|
+
},
|
|
2016
|
+
"description": "List of changes/modifications being made"
|
|
2017
|
+
},
|
|
2018
|
+
"metadata": {
|
|
2019
|
+
"type": "object",
|
|
2020
|
+
"additionalProperties": {
|
|
2021
|
+
"$ref": "#/components/schemas/PreviewValue"
|
|
2022
|
+
},
|
|
2023
|
+
"description": "Additional context information"
|
|
2024
|
+
},
|
|
2025
|
+
"summary": {
|
|
2026
|
+
"type": "string",
|
|
2027
|
+
"description": "AI reasoning for why this action is recommended",
|
|
2028
|
+
"example": "This email discusses solar panel installation and should be handled by the Service team."
|
|
2029
|
+
}
|
|
2030
|
+
}
|
|
2031
|
+
},
|
|
2032
|
+
"PreviewActionType": {
|
|
2033
|
+
"type": "string",
|
|
2034
|
+
"enum": [
|
|
2035
|
+
"move",
|
|
2036
|
+
"create",
|
|
2037
|
+
"update",
|
|
2038
|
+
"delete",
|
|
2039
|
+
"apply",
|
|
2040
|
+
"send",
|
|
2041
|
+
"link",
|
|
2042
|
+
"unlink",
|
|
2043
|
+
"batch_approval"
|
|
2044
|
+
],
|
|
2045
|
+
"description": "Type of action being previewed"
|
|
2046
|
+
},
|
|
2047
|
+
"PreviewEntity": {
|
|
2048
|
+
"type": "object",
|
|
2049
|
+
"description": "Entity reference for preview display",
|
|
2050
|
+
"properties": {
|
|
2051
|
+
"type": {
|
|
2052
|
+
"type": "string",
|
|
2053
|
+
"description": "Entity type (e.g., \"inbox\", \"email\", \"contact\", \"label\")",
|
|
2054
|
+
"example": "inbox"
|
|
2055
|
+
},
|
|
2056
|
+
"id": {
|
|
2057
|
+
"type": "string",
|
|
2058
|
+
"description": "Entity ID"
|
|
2059
|
+
},
|
|
2060
|
+
"name": {
|
|
2061
|
+
"type": "string",
|
|
2062
|
+
"description": "Human-readable name for display",
|
|
2063
|
+
"example": "Support Inbox"
|
|
2064
|
+
},
|
|
2065
|
+
"schema": {
|
|
2066
|
+
"type": "string",
|
|
2067
|
+
"description": "Entity schema (for epilot entities)"
|
|
2068
|
+
},
|
|
2069
|
+
"icon": {
|
|
2070
|
+
"type": "string",
|
|
2071
|
+
"description": "Icon hint for UI"
|
|
2072
|
+
},
|
|
2073
|
+
"url": {
|
|
2074
|
+
"type": "string",
|
|
2075
|
+
"description": "Optional URL to view the entity"
|
|
2076
|
+
}
|
|
2077
|
+
}
|
|
2078
|
+
},
|
|
2079
|
+
"PreviewChange": {
|
|
2080
|
+
"type": "object",
|
|
2081
|
+
"description": "A single field change in the preview",
|
|
2082
|
+
"properties": {
|
|
2083
|
+
"field": {
|
|
2084
|
+
"type": "string",
|
|
2085
|
+
"description": "Field identifier"
|
|
2086
|
+
},
|
|
2087
|
+
"label": {
|
|
2088
|
+
"type": "string",
|
|
2089
|
+
"description": "Human-readable field label"
|
|
2090
|
+
},
|
|
2091
|
+
"from": {
|
|
2092
|
+
"$ref": "#/components/schemas/PreviewValue"
|
|
2093
|
+
},
|
|
2094
|
+
"to": {
|
|
2095
|
+
"$ref": "#/components/schemas/PreviewValue"
|
|
2096
|
+
}
|
|
2097
|
+
}
|
|
2098
|
+
},
|
|
2099
|
+
"PreviewValue": {
|
|
2100
|
+
"type": "object",
|
|
2101
|
+
"description": "Typed value for preview display",
|
|
2102
|
+
"required": [
|
|
2103
|
+
"type"
|
|
2104
|
+
],
|
|
2105
|
+
"properties": {
|
|
2106
|
+
"type": {
|
|
2107
|
+
"type": "string",
|
|
2108
|
+
"enum": [
|
|
2109
|
+
"text",
|
|
2110
|
+
"number",
|
|
2111
|
+
"boolean",
|
|
2112
|
+
"list",
|
|
2113
|
+
"entity",
|
|
2114
|
+
"badge"
|
|
2115
|
+
],
|
|
2116
|
+
"description": "Value type for proper rendering"
|
|
2117
|
+
},
|
|
2118
|
+
"value": {
|
|
2119
|
+
"description": "The actual value (type depends on \"type\" field)"
|
|
2120
|
+
},
|
|
2121
|
+
"values": {
|
|
2122
|
+
"type": "array",
|
|
2123
|
+
"items": {
|
|
2124
|
+
"type": "string"
|
|
2125
|
+
},
|
|
2126
|
+
"description": "Array of values (for list type)"
|
|
2127
|
+
},
|
|
2128
|
+
"id": {
|
|
2129
|
+
"type": "string",
|
|
2130
|
+
"description": "Entity ID (for entity type)"
|
|
2131
|
+
},
|
|
2132
|
+
"name": {
|
|
2133
|
+
"type": "string",
|
|
2134
|
+
"description": "Display name (for entity type)"
|
|
2135
|
+
},
|
|
2136
|
+
"schema": {
|
|
2137
|
+
"type": "string",
|
|
2138
|
+
"description": "Entity schema (for entity type)"
|
|
2139
|
+
},
|
|
2140
|
+
"color": {
|
|
2141
|
+
"type": "string",
|
|
2142
|
+
"enum": [
|
|
2143
|
+
"success",
|
|
2144
|
+
"warning",
|
|
2145
|
+
"error",
|
|
2146
|
+
"info"
|
|
2147
|
+
],
|
|
2148
|
+
"description": "Badge color (for badge type)"
|
|
2149
|
+
}
|
|
2150
|
+
}
|
|
2151
|
+
},
|
|
2152
|
+
"ToolDefinition": {
|
|
2153
|
+
"type": "object",
|
|
2154
|
+
"properties": {
|
|
2155
|
+
"tool_id": {
|
|
2156
|
+
"type": "string",
|
|
2157
|
+
"example": "entity.search"
|
|
2158
|
+
},
|
|
2159
|
+
"name": {
|
|
2160
|
+
"type": "string",
|
|
2161
|
+
"example": "Search Entities"
|
|
2162
|
+
},
|
|
2163
|
+
"description": {
|
|
2164
|
+
"type": "string",
|
|
2165
|
+
"description": "Description for LLM to understand tool purpose"
|
|
2166
|
+
},
|
|
2167
|
+
"category": {
|
|
2168
|
+
"type": "string",
|
|
2169
|
+
"enum": [
|
|
2170
|
+
"entity",
|
|
2171
|
+
"message",
|
|
2172
|
+
"taxonomy",
|
|
2173
|
+
"rag",
|
|
2174
|
+
"workflow"
|
|
2175
|
+
]
|
|
2176
|
+
},
|
|
2177
|
+
"parameters": {
|
|
2178
|
+
"type": "object",
|
|
2179
|
+
"description": "JSON Schema for tool input"
|
|
2180
|
+
},
|
|
2181
|
+
"returns": {
|
|
2182
|
+
"type": "object",
|
|
2183
|
+
"description": "JSON Schema for tool output"
|
|
2184
|
+
},
|
|
2185
|
+
"requires_approval": {
|
|
2186
|
+
"type": "boolean",
|
|
2187
|
+
"default": false,
|
|
2188
|
+
"description": "Whether this tool always requires human approval"
|
|
2189
|
+
},
|
|
2190
|
+
"enabled": {
|
|
2191
|
+
"type": "boolean",
|
|
2192
|
+
"default": true
|
|
2193
|
+
}
|
|
2194
|
+
}
|
|
2195
|
+
},
|
|
2196
|
+
"SkillCategory": {
|
|
2197
|
+
"type": "string",
|
|
2198
|
+
"enum": [
|
|
2199
|
+
"message",
|
|
2200
|
+
"entity",
|
|
2201
|
+
"document",
|
|
2202
|
+
"classification",
|
|
2203
|
+
"custom"
|
|
2204
|
+
]
|
|
2205
|
+
},
|
|
2206
|
+
"AgentSource": {
|
|
2207
|
+
"type": "string",
|
|
2208
|
+
"enum": [
|
|
2209
|
+
"system",
|
|
2210
|
+
"custom"
|
|
2211
|
+
],
|
|
2212
|
+
"description": "- system: Pre-built by epilot (system skills)\n- custom: Created by organization\n"
|
|
2213
|
+
},
|
|
2214
|
+
"SkillAvailability": {
|
|
2215
|
+
"type": "string",
|
|
2216
|
+
"enum": [
|
|
2217
|
+
"flows",
|
|
2218
|
+
"copilot",
|
|
2219
|
+
"portals",
|
|
2220
|
+
"all"
|
|
2221
|
+
],
|
|
2222
|
+
"description": "Where the skill/agent is available:\n- flows: Available in workflow automations\n- copilot: Available as a sub-agent in copilot\n- portals: Available in end-user self-service portals\n- all: Available everywhere\n"
|
|
2223
|
+
},
|
|
2224
|
+
"ExecutionContext": {
|
|
2225
|
+
"type": "string",
|
|
2226
|
+
"enum": [
|
|
2227
|
+
"flows",
|
|
2228
|
+
"copilot",
|
|
2229
|
+
"api"
|
|
2230
|
+
],
|
|
2231
|
+
"description": "Where the execution was triggered from:\n- flows: Triggered from workflow automation\n- copilot: Triggered from copilot assistant\n- api: Direct API call\n"
|
|
2232
|
+
},
|
|
2233
|
+
"ExecutionPattern": {
|
|
2234
|
+
"type": "string",
|
|
2235
|
+
"enum": [
|
|
2236
|
+
"direct",
|
|
2237
|
+
"react"
|
|
2238
|
+
],
|
|
2239
|
+
"description": "- direct: Single LLM call, no tools\n- react: Multi-step reasoning with tool use\n"
|
|
2240
|
+
},
|
|
2241
|
+
"ExecutionMode": {
|
|
2242
|
+
"type": "string",
|
|
2243
|
+
"enum": [
|
|
2244
|
+
"automatic",
|
|
2245
|
+
"approval",
|
|
2246
|
+
"draft"
|
|
2247
|
+
],
|
|
2248
|
+
"description": "- automatic: Execute without human intervention\n- approval: Pause for human approval before tool execution\n- draft: Execute but mark output as draft for review\n"
|
|
2249
|
+
},
|
|
2250
|
+
"ExecutionStatus": {
|
|
2251
|
+
"type": "string",
|
|
2252
|
+
"enum": [
|
|
2253
|
+
"pending",
|
|
2254
|
+
"running",
|
|
2255
|
+
"waiting_approval",
|
|
2256
|
+
"completed",
|
|
2257
|
+
"failed",
|
|
2258
|
+
"cancelled"
|
|
2259
|
+
]
|
|
2260
|
+
},
|
|
2261
|
+
"ParameterType": {
|
|
2262
|
+
"type": "string",
|
|
2263
|
+
"enum": [
|
|
2264
|
+
"text",
|
|
2265
|
+
"textarea",
|
|
2266
|
+
"number",
|
|
2267
|
+
"boolean",
|
|
2268
|
+
"select",
|
|
2269
|
+
"entity-schema",
|
|
2270
|
+
"entity-attribute",
|
|
2271
|
+
"entity-id",
|
|
2272
|
+
"taxonomy",
|
|
2273
|
+
"taxonomy-classification",
|
|
2274
|
+
"shared-inbox",
|
|
2275
|
+
"label",
|
|
2276
|
+
"matching-criteria"
|
|
2277
|
+
],
|
|
2278
|
+
"description": "Base types:\n- text: Text input field\n- textarea: Multi-line text input field\n- number: Numeric input field\n- boolean: Toggle switch\n- select: Dropdown selection (requires enum array)\n\nCustom types (domain-specific):\n- entity-schema: Entity schema selector (fetches from Entity API)\n- entity-attribute: Entity attribute selector (requires dependsOn)\n- entity-id: Entity picker (search and select entities)\n- taxonomy: Taxonomy selector (fetches from Taxonomy API)\n- taxonomy-classification: Classification selector (requires dependsOn)\n- shared-inbox: Shared inbox selector (fetches from Email Settings API)\n- matching-criteria: Criteria editor for mapping compared fields between two contexts or entities\n"
|
|
2279
|
+
},
|
|
2280
|
+
"InputParameterDefinition": {
|
|
2281
|
+
"type": "object",
|
|
2282
|
+
"required": [
|
|
2283
|
+
"name",
|
|
2284
|
+
"label",
|
|
2285
|
+
"type"
|
|
2286
|
+
],
|
|
2287
|
+
"properties": {
|
|
2288
|
+
"name": {
|
|
2289
|
+
"type": "string",
|
|
2290
|
+
"description": "Unique identifier for the parameter (used in API)",
|
|
2291
|
+
"example": "target_schema"
|
|
2292
|
+
},
|
|
2293
|
+
"label": {
|
|
2294
|
+
"type": "string",
|
|
2295
|
+
"description": "Human-readable display label",
|
|
2296
|
+
"example": "Target Schema"
|
|
2297
|
+
},
|
|
2298
|
+
"type": {
|
|
2299
|
+
"$ref": "#/components/schemas/ParameterType"
|
|
2300
|
+
},
|
|
2301
|
+
"description": {
|
|
2302
|
+
"type": "string",
|
|
2303
|
+
"description": "Help text for the parameter"
|
|
2304
|
+
},
|
|
2305
|
+
"default": {
|
|
2306
|
+
"description": "Default value for the parameter"
|
|
2307
|
+
},
|
|
2308
|
+
"multi": {
|
|
2309
|
+
"type": "boolean",
|
|
2310
|
+
"default": false,
|
|
2311
|
+
"description": "Allow multiple selections (value becomes array)"
|
|
2312
|
+
},
|
|
2313
|
+
"dependsOn": {
|
|
2314
|
+
"type": "string",
|
|
2315
|
+
"description": "Parent parameter this depends on (for entity-attribute, taxonomy-classification)"
|
|
2316
|
+
},
|
|
2317
|
+
"visibleWhen": {
|
|
2318
|
+
"type": "object",
|
|
2319
|
+
"additionalProperties": {
|
|
2320
|
+
"type": "array"
|
|
2321
|
+
},
|
|
2322
|
+
"description": "Conditional visibility rules (show when parent has specific values)"
|
|
2323
|
+
},
|
|
2324
|
+
"enum": {
|
|
2325
|
+
"type": "array",
|
|
2326
|
+
"items": {
|
|
2327
|
+
"type": "string"
|
|
2328
|
+
},
|
|
2329
|
+
"description": "Allowed values (required for 'select' type)"
|
|
2330
|
+
},
|
|
2331
|
+
"minimum": {
|
|
2332
|
+
"type": "number",
|
|
2333
|
+
"description": "Minimum value (for number type)"
|
|
2334
|
+
},
|
|
2335
|
+
"maximum": {
|
|
2336
|
+
"type": "number",
|
|
2337
|
+
"description": "Maximum value (for number type)"
|
|
2338
|
+
},
|
|
2339
|
+
"step": {
|
|
2340
|
+
"type": "number",
|
|
2341
|
+
"description": "Step increment (for number type)"
|
|
2342
|
+
},
|
|
2343
|
+
"minLength": {
|
|
2344
|
+
"type": "integer",
|
|
2345
|
+
"description": "Minimum length (for text type)"
|
|
2346
|
+
},
|
|
2347
|
+
"maxLength": {
|
|
2348
|
+
"type": "integer",
|
|
2349
|
+
"description": "Maximum length (for text type)"
|
|
2350
|
+
},
|
|
2351
|
+
"schemaFilter": {
|
|
2352
|
+
"type": "array",
|
|
2353
|
+
"items": {
|
|
2354
|
+
"type": "string"
|
|
2355
|
+
},
|
|
2356
|
+
"description": "Filter to specific schemas (for entity-schema, entity-id)"
|
|
2357
|
+
},
|
|
2358
|
+
"attributeTypeFilter": {
|
|
2359
|
+
"type": "array",
|
|
2360
|
+
"items": {
|
|
2361
|
+
"type": "string"
|
|
2362
|
+
},
|
|
2363
|
+
"description": "Filter to specific attribute types (for entity-attribute)"
|
|
2364
|
+
},
|
|
2365
|
+
"hidden": {
|
|
2366
|
+
"type": "boolean",
|
|
2367
|
+
"default": false,
|
|
2368
|
+
"description": "Whether to hide the parameter from the UI"
|
|
2369
|
+
}
|
|
2370
|
+
}
|
|
2371
|
+
},
|
|
2372
|
+
"InputParametersSchema": {
|
|
2373
|
+
"type": "object",
|
|
2374
|
+
"required": [
|
|
2375
|
+
"type",
|
|
2376
|
+
"parameters"
|
|
2377
|
+
],
|
|
2378
|
+
"properties": {
|
|
2379
|
+
"type": {
|
|
2380
|
+
"type": "string",
|
|
2381
|
+
"enum": [
|
|
2382
|
+
"object"
|
|
2383
|
+
],
|
|
2384
|
+
"description": "Always \"object\""
|
|
2385
|
+
},
|
|
2386
|
+
"parameters": {
|
|
2387
|
+
"type": "array",
|
|
2388
|
+
"items": {
|
|
2389
|
+
"$ref": "#/components/schemas/InputParameterDefinition"
|
|
2390
|
+
},
|
|
2391
|
+
"description": "Array of parameter definitions"
|
|
2392
|
+
},
|
|
2393
|
+
"required": {
|
|
2394
|
+
"type": "array",
|
|
2395
|
+
"items": {
|
|
2396
|
+
"type": "string"
|
|
2397
|
+
},
|
|
2398
|
+
"description": "Array of parameter names that are required"
|
|
2399
|
+
}
|
|
2400
|
+
},
|
|
2401
|
+
"example": {
|
|
2402
|
+
"type": "object",
|
|
2403
|
+
"parameters": [
|
|
2404
|
+
{
|
|
2405
|
+
"name": "target_schema",
|
|
2406
|
+
"label": "Target Schema",
|
|
2407
|
+
"type": "entity-schema",
|
|
2408
|
+
"description": "Entity type to create"
|
|
2409
|
+
},
|
|
2410
|
+
{
|
|
2411
|
+
"name": "confidence_threshold",
|
|
2412
|
+
"label": "Confidence Threshold",
|
|
2413
|
+
"type": "number",
|
|
2414
|
+
"minimum": 0,
|
|
2415
|
+
"maximum": 1,
|
|
2416
|
+
"default": 0.8
|
|
2417
|
+
},
|
|
2418
|
+
{
|
|
2419
|
+
"name": "categories",
|
|
2420
|
+
"label": "Categories",
|
|
2421
|
+
"type": "select",
|
|
2422
|
+
"enum": [
|
|
2423
|
+
"invoice",
|
|
2424
|
+
"contract",
|
|
2425
|
+
"letter"
|
|
2426
|
+
],
|
|
2427
|
+
"multi": true
|
|
2428
|
+
}
|
|
2429
|
+
],
|
|
2430
|
+
"required": [
|
|
2431
|
+
"target_schema"
|
|
2432
|
+
]
|
|
2433
|
+
}
|
|
2434
|
+
},
|
|
2435
|
+
"ModelConfig": {
|
|
2436
|
+
"type": "object",
|
|
2437
|
+
"properties": {
|
|
2438
|
+
"model_id": {
|
|
2439
|
+
"type": "string",
|
|
2440
|
+
"default": "anthropic.claude-3-5-sonnet-20241022-v2:0",
|
|
2441
|
+
"description": "AWS Bedrock model ID"
|
|
2442
|
+
},
|
|
2443
|
+
"temperature": {
|
|
2444
|
+
"type": "number",
|
|
2445
|
+
"minimum": 0,
|
|
2446
|
+
"maximum": 1,
|
|
2447
|
+
"default": 0.7
|
|
2448
|
+
},
|
|
2449
|
+
"max_tokens": {
|
|
2450
|
+
"type": "integer",
|
|
2451
|
+
"default": 4096,
|
|
2452
|
+
"maximum": 8192
|
|
2453
|
+
},
|
|
2454
|
+
"thinking": {
|
|
2455
|
+
"type": "boolean",
|
|
2456
|
+
"default": false,
|
|
2457
|
+
"description": "Enable extended thinking/reasoning for the model"
|
|
2458
|
+
},
|
|
2459
|
+
"thinking_budget": {
|
|
2460
|
+
"type": "integer",
|
|
2461
|
+
"default": 10000,
|
|
2462
|
+
"minimum": 1000,
|
|
2463
|
+
"maximum": 50000,
|
|
2464
|
+
"description": "Token budget for extended thinking (only used when thinking is enabled)"
|
|
2465
|
+
}
|
|
2466
|
+
}
|
|
2467
|
+
},
|
|
2468
|
+
"Error": {
|
|
2469
|
+
"type": "object",
|
|
2470
|
+
"properties": {
|
|
2471
|
+
"error": {
|
|
2472
|
+
"type": "string"
|
|
2473
|
+
},
|
|
2474
|
+
"message": {
|
|
2475
|
+
"type": "string"
|
|
2476
|
+
},
|
|
2477
|
+
"details": {
|
|
2478
|
+
"type": "object"
|
|
2479
|
+
}
|
|
2480
|
+
}
|
|
2481
|
+
},
|
|
2482
|
+
"ChatRequest": {
|
|
2483
|
+
"type": "object",
|
|
2484
|
+
"required": [
|
|
2485
|
+
"agentId",
|
|
2486
|
+
"message"
|
|
2487
|
+
],
|
|
2488
|
+
"properties": {
|
|
2489
|
+
"agentId": {
|
|
2490
|
+
"type": "string",
|
|
2491
|
+
"description": "Agent ID to chat with"
|
|
2492
|
+
},
|
|
2493
|
+
"message": {
|
|
2494
|
+
"type": "string",
|
|
2495
|
+
"description": "User message"
|
|
2496
|
+
},
|
|
2497
|
+
"conversationId": {
|
|
2498
|
+
"type": "string",
|
|
2499
|
+
"format": "uuid",
|
|
2500
|
+
"description": "Conversation ID for server-side memory. If provided, loads history from DynamoDB."
|
|
2501
|
+
},
|
|
2502
|
+
"clientHistory": {
|
|
2503
|
+
"type": "array",
|
|
2504
|
+
"items": {
|
|
2505
|
+
"$ref": "#/components/schemas/ChatMessage"
|
|
2506
|
+
},
|
|
2507
|
+
"description": "Client-provided message history (overrides server-side memory)"
|
|
2508
|
+
},
|
|
2509
|
+
"context": {
|
|
2510
|
+
"type": "object",
|
|
2511
|
+
"properties": {
|
|
2512
|
+
"entityId": {
|
|
2513
|
+
"type": "string"
|
|
2514
|
+
},
|
|
2515
|
+
"customData": {
|
|
2516
|
+
"type": "object",
|
|
2517
|
+
"additionalProperties": true
|
|
2518
|
+
}
|
|
2519
|
+
}
|
|
2520
|
+
},
|
|
2521
|
+
"streaming": {
|
|
2522
|
+
"$ref": "#/components/schemas/StreamingOptions"
|
|
2523
|
+
}
|
|
2524
|
+
}
|
|
2525
|
+
},
|
|
2526
|
+
"ChatMessage": {
|
|
2527
|
+
"type": "object",
|
|
2528
|
+
"required": [
|
|
2529
|
+
"role",
|
|
2530
|
+
"content"
|
|
2531
|
+
],
|
|
2532
|
+
"properties": {
|
|
2533
|
+
"role": {
|
|
2534
|
+
"type": "string",
|
|
2535
|
+
"enum": [
|
|
2536
|
+
"user",
|
|
2537
|
+
"assistant",
|
|
2538
|
+
"tool",
|
|
2539
|
+
"system"
|
|
2540
|
+
]
|
|
2541
|
+
},
|
|
2542
|
+
"content": {
|
|
2543
|
+
"type": "string"
|
|
2544
|
+
},
|
|
2545
|
+
"tool_calls": {
|
|
2546
|
+
"type": "array",
|
|
2547
|
+
"items": {
|
|
2548
|
+
"type": "object",
|
|
2549
|
+
"properties": {
|
|
2550
|
+
"id": {
|
|
2551
|
+
"type": "string"
|
|
2552
|
+
},
|
|
2553
|
+
"name": {
|
|
2554
|
+
"type": "string"
|
|
2555
|
+
},
|
|
2556
|
+
"input": {
|
|
2557
|
+
"type": "object"
|
|
2558
|
+
},
|
|
2559
|
+
"output": {
|
|
2560
|
+
"type": "string"
|
|
2561
|
+
}
|
|
2562
|
+
}
|
|
2563
|
+
}
|
|
2564
|
+
}
|
|
2565
|
+
}
|
|
2566
|
+
},
|
|
2567
|
+
"StreamingOptions": {
|
|
2568
|
+
"type": "object",
|
|
2569
|
+
"properties": {
|
|
2570
|
+
"mode": {
|
|
2571
|
+
"type": "string",
|
|
2572
|
+
"enum": [
|
|
2573
|
+
"updates",
|
|
2574
|
+
"messages"
|
|
2575
|
+
],
|
|
2576
|
+
"default": "updates",
|
|
2577
|
+
"description": "Stream mode - updates for step-based, messages for token-based"
|
|
2578
|
+
},
|
|
2579
|
+
"streamTokens": {
|
|
2580
|
+
"type": "boolean",
|
|
2581
|
+
"default": false,
|
|
2582
|
+
"description": "Enable token-level streaming"
|
|
2583
|
+
},
|
|
2584
|
+
"includeMetadata": {
|
|
2585
|
+
"type": "boolean",
|
|
2586
|
+
"default": false,
|
|
2587
|
+
"description": "Include metadata events"
|
|
2588
|
+
}
|
|
2589
|
+
}
|
|
2590
|
+
},
|
|
2591
|
+
"StreamEvent": {
|
|
2592
|
+
"type": "object",
|
|
2593
|
+
"description": "Server-Sent Event for streaming responses",
|
|
2594
|
+
"properties": {
|
|
2595
|
+
"type": {
|
|
2596
|
+
"type": "string",
|
|
2597
|
+
"enum": [
|
|
2598
|
+
"token",
|
|
2599
|
+
"agent_step",
|
|
2600
|
+
"tool_call",
|
|
2601
|
+
"tool_result",
|
|
2602
|
+
"complete",
|
|
2603
|
+
"error",
|
|
2604
|
+
"metadata",
|
|
2605
|
+
"needs_approval"
|
|
2606
|
+
]
|
|
2607
|
+
},
|
|
2608
|
+
"content": {
|
|
2609
|
+
"type": "string",
|
|
2610
|
+
"description": "Token content (for token events)"
|
|
2611
|
+
},
|
|
2612
|
+
"index": {
|
|
2613
|
+
"type": "integer",
|
|
2614
|
+
"description": "Token index (for token events)"
|
|
2615
|
+
},
|
|
2616
|
+
"tool": {
|
|
2617
|
+
"type": "string",
|
|
2618
|
+
"description": "Tool name (for tool events)"
|
|
2619
|
+
},
|
|
2620
|
+
"input": {
|
|
2621
|
+
"type": "object",
|
|
2622
|
+
"description": "Tool input (for tool_call events)"
|
|
2623
|
+
},
|
|
2624
|
+
"output": {
|
|
2625
|
+
"type": "string",
|
|
2626
|
+
"description": "Tool output (for tool_result events)"
|
|
2627
|
+
},
|
|
2628
|
+
"callId": {
|
|
2629
|
+
"type": "string",
|
|
2630
|
+
"description": "Tool call ID"
|
|
2631
|
+
},
|
|
2632
|
+
"result": {
|
|
2633
|
+
"$ref": "#/components/schemas/ExecutionResult"
|
|
2634
|
+
},
|
|
2635
|
+
"error": {
|
|
2636
|
+
"type": "object",
|
|
2637
|
+
"properties": {
|
|
2638
|
+
"code": {
|
|
2639
|
+
"type": "string"
|
|
2640
|
+
},
|
|
2641
|
+
"message": {
|
|
2642
|
+
"type": "string"
|
|
2643
|
+
}
|
|
2644
|
+
}
|
|
2645
|
+
},
|
|
2646
|
+
"conversationId": {
|
|
2647
|
+
"type": "string",
|
|
2648
|
+
"format": "uuid",
|
|
2649
|
+
"description": "Conversation ID (included in complete events)"
|
|
2650
|
+
}
|
|
2651
|
+
}
|
|
2652
|
+
},
|
|
2653
|
+
"ExecutionResult": {
|
|
2654
|
+
"type": "object",
|
|
2655
|
+
"properties": {
|
|
2656
|
+
"response": {
|
|
2657
|
+
"type": "string"
|
|
2658
|
+
},
|
|
2659
|
+
"structured_output": {
|
|
2660
|
+
"type": "object"
|
|
2661
|
+
},
|
|
2662
|
+
"status": {
|
|
2663
|
+
"type": "string",
|
|
2664
|
+
"enum": [
|
|
2665
|
+
"completed",
|
|
2666
|
+
"failed",
|
|
2667
|
+
"max_iterations",
|
|
2668
|
+
"rejected"
|
|
2669
|
+
]
|
|
2670
|
+
},
|
|
2671
|
+
"metrics": {
|
|
2672
|
+
"$ref": "#/components/schemas/ExecutionMetrics"
|
|
2673
|
+
}
|
|
2674
|
+
}
|
|
2675
|
+
},
|
|
2676
|
+
"ConversationItem": {
|
|
2677
|
+
"type": "object",
|
|
2678
|
+
"properties": {
|
|
2679
|
+
"conversation_id": {
|
|
2680
|
+
"type": "string",
|
|
2681
|
+
"format": "uuid"
|
|
2682
|
+
},
|
|
2683
|
+
"user_id": {
|
|
2684
|
+
"type": "string"
|
|
2685
|
+
},
|
|
2686
|
+
"agent_id": {
|
|
2687
|
+
"type": "string"
|
|
2688
|
+
},
|
|
2689
|
+
"title": {
|
|
2690
|
+
"type": "string"
|
|
2691
|
+
},
|
|
2692
|
+
"message_count": {
|
|
2693
|
+
"type": "integer"
|
|
2694
|
+
},
|
|
2695
|
+
"last_message": {
|
|
2696
|
+
"type": "string",
|
|
2697
|
+
"description": "Preview of the last message"
|
|
2698
|
+
},
|
|
2699
|
+
"last_message_at": {
|
|
2700
|
+
"type": "string",
|
|
2701
|
+
"format": "date-time"
|
|
2702
|
+
},
|
|
2703
|
+
"context": {
|
|
2704
|
+
"type": "object",
|
|
2705
|
+
"properties": {
|
|
2706
|
+
"entityId": {
|
|
2707
|
+
"type": "string"
|
|
2708
|
+
},
|
|
2709
|
+
"customData": {
|
|
2710
|
+
"type": "object"
|
|
2711
|
+
}
|
|
2712
|
+
}
|
|
2713
|
+
},
|
|
2714
|
+
"created_at": {
|
|
2715
|
+
"type": "string",
|
|
2716
|
+
"format": "date-time"
|
|
2717
|
+
},
|
|
2718
|
+
"updated_at": {
|
|
2719
|
+
"type": "string",
|
|
2720
|
+
"format": "date-time"
|
|
2721
|
+
}
|
|
2722
|
+
}
|
|
2723
|
+
},
|
|
2724
|
+
"MessageItem": {
|
|
2725
|
+
"type": "object",
|
|
2726
|
+
"properties": {
|
|
2727
|
+
"conversation_id": {
|
|
2728
|
+
"type": "string",
|
|
2729
|
+
"format": "uuid"
|
|
2730
|
+
},
|
|
2731
|
+
"role": {
|
|
2732
|
+
"type": "string",
|
|
2733
|
+
"enum": [
|
|
2734
|
+
"user",
|
|
2735
|
+
"assistant",
|
|
2736
|
+
"tool",
|
|
2737
|
+
"system"
|
|
2738
|
+
]
|
|
2739
|
+
},
|
|
2740
|
+
"content": {
|
|
2741
|
+
"type": "string"
|
|
2742
|
+
},
|
|
2743
|
+
"timestamp": {
|
|
2744
|
+
"type": "string",
|
|
2745
|
+
"format": "date-time"
|
|
2746
|
+
},
|
|
2747
|
+
"tool_calls": {
|
|
2748
|
+
"type": "array",
|
|
2749
|
+
"items": {
|
|
2750
|
+
"type": "object",
|
|
2751
|
+
"properties": {
|
|
2752
|
+
"id": {
|
|
2753
|
+
"type": "string"
|
|
2754
|
+
},
|
|
2755
|
+
"name": {
|
|
2756
|
+
"type": "string"
|
|
2757
|
+
},
|
|
2758
|
+
"input": {
|
|
2759
|
+
"type": "object"
|
|
2760
|
+
},
|
|
2761
|
+
"output": {
|
|
2762
|
+
"type": "string"
|
|
2763
|
+
}
|
|
2764
|
+
}
|
|
2765
|
+
}
|
|
2766
|
+
},
|
|
2767
|
+
"token_count": {
|
|
2768
|
+
"type": "integer"
|
|
2769
|
+
},
|
|
2770
|
+
"trace_id": {
|
|
2771
|
+
"type": "string",
|
|
2772
|
+
"format": "uuid",
|
|
2773
|
+
"description": "Langfuse trace id for the turn (assistant messages only)"
|
|
2774
|
+
},
|
|
2775
|
+
"feedback": {
|
|
2776
|
+
"$ref": "#/components/schemas/MessageFeedback"
|
|
2777
|
+
}
|
|
2778
|
+
}
|
|
2779
|
+
},
|
|
2780
|
+
"MessageFeedback": {
|
|
2781
|
+
"type": "object",
|
|
2782
|
+
"required": [
|
|
2783
|
+
"rating",
|
|
2784
|
+
"user_id",
|
|
2785
|
+
"submitted_at"
|
|
2786
|
+
],
|
|
2787
|
+
"properties": {
|
|
2788
|
+
"rating": {
|
|
2789
|
+
"type": "string",
|
|
2790
|
+
"enum": [
|
|
2791
|
+
"up",
|
|
2792
|
+
"down"
|
|
2793
|
+
]
|
|
2794
|
+
},
|
|
2795
|
+
"comment": {
|
|
2796
|
+
"type": "string"
|
|
2797
|
+
},
|
|
2798
|
+
"user_id": {
|
|
2799
|
+
"type": "string"
|
|
2800
|
+
},
|
|
2801
|
+
"submitted_at": {
|
|
2802
|
+
"type": "string",
|
|
2803
|
+
"format": "date-time"
|
|
2804
|
+
}
|
|
2805
|
+
}
|
|
2806
|
+
},
|
|
2807
|
+
"SubmitFeedbackRequest": {
|
|
2808
|
+
"type": "object",
|
|
2809
|
+
"required": [
|
|
2810
|
+
"trace_id",
|
|
2811
|
+
"rating"
|
|
2812
|
+
],
|
|
2813
|
+
"properties": {
|
|
2814
|
+
"trace_id": {
|
|
2815
|
+
"type": "string",
|
|
2816
|
+
"format": "uuid",
|
|
2817
|
+
"description": "Langfuse trace id of the assistant turn being rated"
|
|
2818
|
+
},
|
|
2819
|
+
"rating": {
|
|
2820
|
+
"type": "string",
|
|
2821
|
+
"enum": [
|
|
2822
|
+
"up",
|
|
2823
|
+
"down"
|
|
2824
|
+
]
|
|
2825
|
+
},
|
|
2826
|
+
"comment": {
|
|
2827
|
+
"type": "string",
|
|
2828
|
+
"description": "Optional free-text feedback"
|
|
2829
|
+
}
|
|
2830
|
+
}
|
|
2831
|
+
},
|
|
2832
|
+
"ListConversationsResponse": {
|
|
2833
|
+
"type": "object",
|
|
2834
|
+
"properties": {
|
|
2835
|
+
"conversations": {
|
|
2836
|
+
"type": "array",
|
|
2837
|
+
"items": {
|
|
2838
|
+
"$ref": "#/components/schemas/ConversationItem"
|
|
2839
|
+
}
|
|
2840
|
+
},
|
|
2841
|
+
"next_cursor": {
|
|
2842
|
+
"type": "string",
|
|
2843
|
+
"nullable": true
|
|
2844
|
+
}
|
|
2845
|
+
}
|
|
2846
|
+
},
|
|
2847
|
+
"ConversationWithMessages": {
|
|
2848
|
+
"type": "object",
|
|
2849
|
+
"properties": {
|
|
2850
|
+
"conversation": {
|
|
2851
|
+
"$ref": "#/components/schemas/ConversationItem"
|
|
2852
|
+
},
|
|
2853
|
+
"messages": {
|
|
2854
|
+
"type": "array",
|
|
2855
|
+
"items": {
|
|
2856
|
+
"$ref": "#/components/schemas/MessageItem"
|
|
2857
|
+
}
|
|
2858
|
+
}
|
|
2859
|
+
}
|
|
2860
|
+
}
|
|
2861
|
+
}
|
|
2862
|
+
}
|
|
2863
|
+
}
|