@epilot/sdk 2.9.1 → 2.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/definitions/ai-agents-runtime.json +1 -1
  2. package/definitions/ai-agents.json +971 -98
  3. package/definitions/integration-toolkit-runtime.json +1 -1
  4. package/definitions/integration-toolkit.json +557 -1
  5. package/dist/ai-agents-D6C5TXLD.cjs +7 -0
  6. package/dist/ai-agents-Y6PH53PH.js +7 -0
  7. package/dist/{ai-agents-runtime-25YRUJHI.js → ai-agents-runtime-EA23HCCP.js} +1 -1
  8. package/dist/{ai-agents-runtime-TILIO3UM.cjs → ai-agents-runtime-WZ3EI3NH.cjs} +2 -2
  9. package/dist/{ai-agents.d-CC5IjXrs.d.cts → ai-agents.d-D-7bTH-9.d.cts} +506 -5
  10. package/dist/{ai-agents.d-CC5IjXrs.d.ts → ai-agents.d-D-7bTH-9.d.ts} +506 -5
  11. package/dist/apis/access-token.cjs +6 -6
  12. package/dist/apis/access-token.js +1 -1
  13. package/dist/apis/address-suggestions.cjs +6 -6
  14. package/dist/apis/address-suggestions.js +1 -1
  15. package/dist/apis/address.cjs +6 -6
  16. package/dist/apis/address.js +1 -1
  17. package/dist/apis/ai-agents.cjs +8 -8
  18. package/dist/apis/ai-agents.d.cts +2 -2
  19. package/dist/apis/ai-agents.d.ts +2 -2
  20. package/dist/apis/ai-agents.js +2 -2
  21. package/dist/apis/app.cjs +6 -6
  22. package/dist/apis/app.js +1 -1
  23. package/dist/apis/audit-logs.cjs +6 -6
  24. package/dist/apis/audit-logs.js +1 -1
  25. package/dist/apis/automation.cjs +6 -6
  26. package/dist/apis/automation.js +1 -1
  27. package/dist/apis/billing.cjs +6 -6
  28. package/dist/apis/billing.js +1 -1
  29. package/dist/apis/blueprint-manifest.cjs +6 -6
  30. package/dist/apis/blueprint-manifest.js +1 -1
  31. package/dist/apis/calendar.cjs +6 -6
  32. package/dist/apis/calendar.js +1 -1
  33. package/dist/apis/configuration-hub.cjs +6 -6
  34. package/dist/apis/configuration-hub.js +1 -1
  35. package/dist/apis/consent.cjs +6 -6
  36. package/dist/apis/consent.js +1 -1
  37. package/dist/apis/customer-portal.cjs +6 -6
  38. package/dist/apis/customer-portal.js +1 -1
  39. package/dist/apis/dashboard.cjs +6 -6
  40. package/dist/apis/dashboard.js +1 -1
  41. package/dist/apis/data-governance.cjs +6 -6
  42. package/dist/apis/data-governance.js +1 -1
  43. package/dist/apis/deduplication.cjs +6 -6
  44. package/dist/apis/deduplication.js +1 -1
  45. package/dist/apis/design.cjs +6 -6
  46. package/dist/apis/design.js +1 -1
  47. package/dist/apis/document.cjs +6 -6
  48. package/dist/apis/document.js +1 -1
  49. package/dist/apis/email-settings.cjs +6 -6
  50. package/dist/apis/email-settings.js +1 -1
  51. package/dist/apis/email-template.cjs +6 -6
  52. package/dist/apis/email-template.js +1 -1
  53. package/dist/apis/entity-mapping.cjs +6 -6
  54. package/dist/apis/entity-mapping.js +1 -1
  55. package/dist/apis/entity.cjs +6 -6
  56. package/dist/apis/entity.js +1 -1
  57. package/dist/apis/environments.cjs +6 -6
  58. package/dist/apis/environments.js +1 -1
  59. package/dist/apis/event-catalog.cjs +6 -6
  60. package/dist/apis/event-catalog.js +1 -1
  61. package/dist/apis/file.cjs +6 -6
  62. package/dist/apis/file.js +1 -1
  63. package/dist/apis/iban.cjs +6 -6
  64. package/dist/apis/iban.js +1 -1
  65. package/dist/apis/integration-toolkit.cjs +8 -8
  66. package/dist/apis/integration-toolkit.d.cts +2 -2
  67. package/dist/apis/integration-toolkit.d.ts +2 -2
  68. package/dist/apis/integration-toolkit.js +2 -2
  69. package/dist/apis/journey.cjs +6 -6
  70. package/dist/apis/journey.js +1 -1
  71. package/dist/apis/kanban.cjs +6 -6
  72. package/dist/apis/kanban.js +1 -1
  73. package/dist/apis/message.cjs +6 -6
  74. package/dist/apis/message.js +1 -1
  75. package/dist/apis/metering.cjs +6 -6
  76. package/dist/apis/metering.js +1 -1
  77. package/dist/apis/notes.cjs +6 -6
  78. package/dist/apis/notes.js +1 -1
  79. package/dist/apis/notification.cjs +6 -6
  80. package/dist/apis/notification.js +1 -1
  81. package/dist/apis/organization.cjs +6 -6
  82. package/dist/apis/organization.js +1 -1
  83. package/dist/apis/partner-directory.cjs +6 -6
  84. package/dist/apis/partner-directory.js +1 -1
  85. package/dist/apis/permissions.cjs +6 -6
  86. package/dist/apis/permissions.js +1 -1
  87. package/dist/apis/pricing-tier.cjs +6 -6
  88. package/dist/apis/pricing-tier.js +1 -1
  89. package/dist/apis/pricing.cjs +6 -6
  90. package/dist/apis/pricing.js +1 -1
  91. package/dist/apis/purpose.cjs +6 -6
  92. package/dist/apis/purpose.js +1 -1
  93. package/dist/apis/query.cjs +6 -6
  94. package/dist/apis/query.js +1 -1
  95. package/dist/apis/sandbox.cjs +6 -6
  96. package/dist/apis/sandbox.js +1 -1
  97. package/dist/apis/sharing.cjs +6 -6
  98. package/dist/apis/sharing.js +1 -1
  99. package/dist/apis/snapshot.cjs +6 -6
  100. package/dist/apis/snapshot.js +1 -1
  101. package/dist/apis/submission.cjs +6 -6
  102. package/dist/apis/submission.js +1 -1
  103. package/dist/apis/target.cjs +6 -6
  104. package/dist/apis/target.js +1 -1
  105. package/dist/apis/targeting.cjs +6 -6
  106. package/dist/apis/targeting.js +1 -1
  107. package/dist/apis/template-variables.cjs +6 -6
  108. package/dist/apis/template-variables.js +1 -1
  109. package/dist/apis/user.cjs +6 -6
  110. package/dist/apis/user.js +1 -1
  111. package/dist/apis/validation-rules.cjs +6 -6
  112. package/dist/apis/validation-rules.js +1 -1
  113. package/dist/apis/webhooks.cjs +6 -6
  114. package/dist/apis/webhooks.js +1 -1
  115. package/dist/apis/workflow-definition.cjs +6 -6
  116. package/dist/apis/workflow-definition.js +1 -1
  117. package/dist/apis/workflow.cjs +6 -6
  118. package/dist/apis/workflow.js +1 -1
  119. package/dist/chunk-3CNCQJOJ.js +14 -0
  120. package/dist/chunk-BRWY3QHG.js +14 -0
  121. package/dist/{chunk-6V3NYADA.cjs → chunk-DCHUVJL4.cjs} +4 -4
  122. package/dist/chunk-ILIHCSNO.cjs +14 -0
  123. package/dist/{chunk-QGP5WMHK.js → chunk-MBVZHZAH.js} +4 -4
  124. package/dist/chunk-YEBEA6XU.cjs +14 -0
  125. package/dist/index.cjs +12 -12
  126. package/dist/index.d.cts +2 -2
  127. package/dist/index.d.ts +2 -2
  128. package/dist/index.js +3 -3
  129. package/dist/integration-toolkit-TL3BQ6FJ.cjs +7 -0
  130. package/dist/integration-toolkit-X3Y4OFVW.js +7 -0
  131. package/dist/{integration-toolkit-runtime-FY7QVFL6.cjs → integration-toolkit-runtime-FR6RZS5O.cjs} +2 -2
  132. package/dist/{integration-toolkit-runtime-HCJ5QLCR.js → integration-toolkit-runtime-I2O6QP5G.js} +1 -1
  133. package/dist/{integration-toolkit.d-BSA9RRdq.d.cts → integration-toolkit.d-DUZ_fiuf.d.cts} +330 -1
  134. package/dist/{integration-toolkit.d-BSA9RRdq.d.ts → integration-toolkit.d-DUZ_fiuf.d.ts} +330 -1
  135. package/docs/ai-agents.md +641 -23
  136. package/docs/integration-toolkit.md +443 -83
  137. package/package.json +1 -1
  138. package/dist/ai-agents-IZWFEUSH.js +0 -7
  139. package/dist/ai-agents-PWHKNRCX.cjs +0 -7
  140. package/dist/chunk-7V7ECXTZ.js +0 -14
  141. package/dist/chunk-FARDEGPH.cjs +0 -14
  142. package/dist/chunk-I53TWOTX.cjs +0 -14
  143. package/dist/chunk-JENQHXFI.js +0 -14
  144. package/dist/integration-toolkit-334NGEOE.cjs +0 -7
  145. package/dist/integration-toolkit-5VCY6CUN.js +0 -7
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.0.0",
3
3
  "info": {
4
4
  "version": "3.0.0",
5
- "title": "AI Agents API - OpenAPI 3.0",
5
+ "title": "AI Agents API",
6
6
  "description": "API for configuring and invoking AI agents in epilot platform",
7
7
  "termsOfService": "https://epilot.cloud/agb",
8
8
  "contact": {
@@ -29,6 +29,14 @@
29
29
  {
30
30
  "name": "Agent Execution",
31
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"
32
40
  }
33
41
  ],
34
42
  "paths": {
@@ -342,6 +350,73 @@
342
350
  }
343
351
  }
344
352
  },
353
+ "/v1/agents/{agent_id}/execute/stream": {
354
+ "post": {
355
+ "tags": [
356
+ "Agent Execution"
357
+ ],
358
+ "summary": "Execute an agent with streaming response",
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
+ },
345
420
  "/v1/executions": {
346
421
  "get": {
347
422
  "tags": [
@@ -689,102 +764,448 @@
689
764
  }
690
765
  }
691
766
  }
692
- }
693
- },
694
- "components": {
695
- "securitySchemes": {
696
- "EpilotAuth": {
697
- "type": "http",
698
- "scheme": "bearer",
699
- "description": "Authorization header with epilot OAuth2 bearer token. Supports RFC8725 for JWT validation.",
700
- "bearerFormat": "JWT"
701
- }
702
767
  },
703
- "schemas": {
704
- "AgentId": {
705
- "type": "string",
706
- "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",
707
- "example": "skill:email-categorizer"
708
- },
709
- "CreateAgentRequest": {
710
- "type": "object",
711
- "required": [
712
- "name",
713
- "system_prompt",
714
- "execution_pattern"
768
+ "/v1/executions/{execution_id}/stream": {
769
+ "get": {
770
+ "tags": [
771
+ "Agent Execution"
715
772
  ],
716
- "properties": {
717
- "name": {
718
- "type": "string",
719
- "minLength": 1,
720
- "maxLength": 100,
721
- "example": "Email Reply Generator"
722
- },
723
- "description": {
724
- "type": "string",
725
- "maxLength": 1000
726
- },
727
- "category": {
728
- "$ref": "#/components/schemas/SkillCategory"
729
- },
730
- "icon": {
731
- "type": "string",
732
- "example": "mail-reply"
733
- },
734
- "system_prompt": {
735
- "type": "string",
736
- "minLength": 1,
737
- "description": "Core LLM instructions"
773
+ "summary": "Reconnect to execution stream",
774
+ "description": "Reconnects to an execution's event stream after approval. Replays missed events from event log and continues streaming if execution is still running.",
775
+ "operationId": "streamExecution",
776
+ "security": [
777
+ {
778
+ "EpilotAuth": []
779
+ }
780
+ ],
781
+ "parameters": [
782
+ {
783
+ "name": "execution_id",
784
+ "in": "path",
785
+ "required": true,
786
+ "schema": {
787
+ "type": "string",
788
+ "format": "uuid"
789
+ }
738
790
  },
739
- "tools": {
740
- "type": "array",
741
- "items": {
742
- "type": "string"
791
+ {
792
+ "name": "from_sequence",
793
+ "in": "query",
794
+ "schema": {
795
+ "type": "integer"
743
796
  },
744
- "description": "Tool IDs this agent can use",
745
- "example": [
746
- "entity.search",
747
- "message.draft"
748
- ]
749
- },
750
- "model_config": {
751
- "$ref": "#/components/schemas/ModelConfig"
752
- },
753
- "max_iterations": {
754
- "type": "integer",
755
- "minimum": 1,
756
- "maximum": 20,
757
- "default": 10,
758
- "description": "Max ReAct loop iterations"
759
- },
760
- "execution_pattern": {
761
- "$ref": "#/components/schemas/ExecutionPattern"
797
+ "description": "Resume from this event sequence number (for reconnection)"
798
+ }
799
+ ],
800
+ "responses": {
801
+ "200": {
802
+ "description": "SSE stream of execution events",
803
+ "content": {
804
+ "text/event-stream": {
805
+ "schema": {
806
+ "$ref": "#/components/schemas/StreamEvent"
807
+ }
808
+ }
809
+ }
762
810
  },
763
- "execution_mode": {
764
- "$ref": "#/components/schemas/ExecutionMode"
811
+ "404": {
812
+ "description": "Execution not found",
813
+ "content": {
814
+ "application/json": {
815
+ "schema": {
816
+ "$ref": "#/components/schemas/Error"
817
+ }
818
+ }
819
+ }
820
+ }
821
+ }
822
+ }
823
+ },
824
+ "/v1/chat": {
825
+ "post": {
826
+ "tags": [
827
+ "Chat"
828
+ ],
829
+ "summary": "Streaming chat with AI agent",
830
+ "description": "Initiates a streaming chat session with an AI agent. Supports server-side conversation memory via conversationId or client-provided history via clientHistory.",
831
+ "operationId": "chat",
832
+ "security": [
833
+ {
834
+ "EpilotAuth": []
835
+ }
836
+ ],
837
+ "requestBody": {
838
+ "required": true,
839
+ "content": {
840
+ "application/json": {
841
+ "schema": {
842
+ "$ref": "#/components/schemas/ChatRequest"
843
+ }
844
+ }
845
+ }
846
+ },
847
+ "responses": {
848
+ "200": {
849
+ "description": "SSE stream of chat events",
850
+ "content": {
851
+ "text/event-stream": {
852
+ "schema": {
853
+ "$ref": "#/components/schemas/StreamEvent"
854
+ }
855
+ }
856
+ }
765
857
  },
766
- "output_schema": {
767
- "type": "object",
768
- "description": "JSON Schema for expected output"
858
+ "400": {
859
+ "description": "Invalid request",
860
+ "content": {
861
+ "application/json": {
862
+ "schema": {
863
+ "$ref": "#/components/schemas/Error"
864
+ }
865
+ }
866
+ }
769
867
  },
770
- "input_parameters_schema": {
771
- "$ref": "#/components/schemas/InputParametersSchema"
868
+ "404": {
869
+ "description": "Agent not found",
870
+ "content": {
871
+ "application/json": {
872
+ "schema": {
873
+ "$ref": "#/components/schemas/Error"
874
+ }
875
+ }
876
+ }
772
877
  }
773
878
  }
774
- },
775
- "UpdateAgentRequest": {
776
- "type": "object",
777
- "properties": {
778
- "name": {
779
- "type": "string",
780
- "minLength": 1,
781
- "maxLength": 100
879
+ }
880
+ },
881
+ "/v1/conversations": {
882
+ "get": {
883
+ "tags": [
884
+ "Conversations"
885
+ ],
886
+ "summary": "List conversations",
887
+ "description": "Lists conversations for the authenticated user, sorted by most recent.",
888
+ "operationId": "listConversations",
889
+ "security": [
890
+ {
891
+ "EpilotAuth": []
892
+ }
893
+ ],
894
+ "parameters": [
895
+ {
896
+ "name": "agent_id",
897
+ "in": "query",
898
+ "schema": {
899
+ "type": "string"
900
+ },
901
+ "description": "Filter by agent ID"
782
902
  },
783
- "description": {
784
- "type": "string",
785
- "maxLength": 1000
903
+ {
904
+ "name": "limit",
905
+ "in": "query",
906
+ "schema": {
907
+ "type": "integer",
908
+ "default": 20
909
+ },
910
+ "description": "Maximum number of conversations to return"
786
911
  },
787
- "category": {
912
+ {
913
+ "name": "cursor",
914
+ "in": "query",
915
+ "schema": {
916
+ "type": "string"
917
+ },
918
+ "description": "Pagination cursor"
919
+ }
920
+ ],
921
+ "responses": {
922
+ "200": {
923
+ "description": "List of conversations",
924
+ "content": {
925
+ "application/json": {
926
+ "schema": {
927
+ "$ref": "#/components/schemas/ListConversationsResponse"
928
+ }
929
+ }
930
+ }
931
+ },
932
+ "400": {
933
+ "description": "Error fetching conversations",
934
+ "content": {
935
+ "application/json": {
936
+ "schema": {
937
+ "$ref": "#/components/schemas/Error"
938
+ }
939
+ }
940
+ }
941
+ }
942
+ }
943
+ }
944
+ },
945
+ "/v1/conversations/{conversation_id}": {
946
+ "get": {
947
+ "tags": [
948
+ "Conversations"
949
+ ],
950
+ "summary": "Get conversation with messages",
951
+ "description": "Retrieves a conversation and its message history.",
952
+ "operationId": "getConversation",
953
+ "security": [
954
+ {
955
+ "EpilotAuth": []
956
+ }
957
+ ],
958
+ "parameters": [
959
+ {
960
+ "name": "conversation_id",
961
+ "in": "path",
962
+ "required": true,
963
+ "schema": {
964
+ "type": "string",
965
+ "format": "uuid"
966
+ }
967
+ },
968
+ {
969
+ "name": "message_limit",
970
+ "in": "query",
971
+ "schema": {
972
+ "type": "integer",
973
+ "default": 100
974
+ },
975
+ "description": "Maximum number of messages to return"
976
+ }
977
+ ],
978
+ "responses": {
979
+ "200": {
980
+ "description": "Conversation with messages",
981
+ "content": {
982
+ "application/json": {
983
+ "schema": {
984
+ "$ref": "#/components/schemas/ConversationWithMessages"
985
+ }
986
+ }
987
+ }
988
+ },
989
+ "404": {
990
+ "description": "Conversation not found",
991
+ "content": {
992
+ "application/json": {
993
+ "schema": {
994
+ "$ref": "#/components/schemas/Error"
995
+ }
996
+ }
997
+ }
998
+ }
999
+ }
1000
+ },
1001
+ "delete": {
1002
+ "tags": [
1003
+ "Conversations"
1004
+ ],
1005
+ "summary": "Delete conversation",
1006
+ "description": "Deletes a conversation and all its messages.",
1007
+ "operationId": "deleteConversation",
1008
+ "security": [
1009
+ {
1010
+ "EpilotAuth": []
1011
+ }
1012
+ ],
1013
+ "parameters": [
1014
+ {
1015
+ "name": "conversation_id",
1016
+ "in": "path",
1017
+ "required": true,
1018
+ "schema": {
1019
+ "type": "string",
1020
+ "format": "uuid"
1021
+ }
1022
+ }
1023
+ ],
1024
+ "responses": {
1025
+ "204": {
1026
+ "description": "Conversation deleted"
1027
+ },
1028
+ "404": {
1029
+ "description": "Conversation not found",
1030
+ "content": {
1031
+ "application/json": {
1032
+ "schema": {
1033
+ "$ref": "#/components/schemas/Error"
1034
+ }
1035
+ }
1036
+ }
1037
+ }
1038
+ }
1039
+ }
1040
+ },
1041
+ "/v1/conversations/{conversation_id}/feedback": {
1042
+ "post": {
1043
+ "tags": [
1044
+ "Conversations"
1045
+ ],
1046
+ "summary": "Submit feedback for an assistant turn",
1047
+ "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",
1048
+ "operationId": "submitConversationFeedback",
1049
+ "security": [
1050
+ {
1051
+ "EpilotAuth": []
1052
+ }
1053
+ ],
1054
+ "parameters": [
1055
+ {
1056
+ "name": "conversation_id",
1057
+ "in": "path",
1058
+ "required": true,
1059
+ "schema": {
1060
+ "type": "string",
1061
+ "format": "uuid"
1062
+ }
1063
+ }
1064
+ ],
1065
+ "requestBody": {
1066
+ "required": true,
1067
+ "content": {
1068
+ "application/json": {
1069
+ "schema": {
1070
+ "$ref": "#/components/schemas/SubmitFeedbackRequest"
1071
+ }
1072
+ }
1073
+ }
1074
+ },
1075
+ "responses": {
1076
+ "200": {
1077
+ "description": "Feedback recorded",
1078
+ "content": {
1079
+ "application/json": {
1080
+ "schema": {
1081
+ "type": "object",
1082
+ "properties": {
1083
+ "feedback": {
1084
+ "$ref": "#/components/schemas/MessageFeedback"
1085
+ }
1086
+ }
1087
+ }
1088
+ }
1089
+ }
1090
+ },
1091
+ "400": {
1092
+ "description": "Invalid request",
1093
+ "content": {
1094
+ "application/json": {
1095
+ "schema": {
1096
+ "$ref": "#/components/schemas/Error"
1097
+ }
1098
+ }
1099
+ }
1100
+ },
1101
+ "404": {
1102
+ "description": "Conversation or message not found",
1103
+ "content": {
1104
+ "application/json": {
1105
+ "schema": {
1106
+ "$ref": "#/components/schemas/Error"
1107
+ }
1108
+ }
1109
+ }
1110
+ }
1111
+ }
1112
+ }
1113
+ }
1114
+ },
1115
+ "components": {
1116
+ "securitySchemes": {
1117
+ "EpilotAuth": {
1118
+ "type": "http",
1119
+ "scheme": "bearer",
1120
+ "description": "Authorization header with epilot OAuth2 bearer token. Supports RFC8725 for JWT validation.",
1121
+ "bearerFormat": "JWT"
1122
+ }
1123
+ },
1124
+ "schemas": {
1125
+ "AgentId": {
1126
+ "type": "string",
1127
+ "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",
1128
+ "example": "skill:email-categorizer"
1129
+ },
1130
+ "CreateAgentRequest": {
1131
+ "type": "object",
1132
+ "required": [
1133
+ "name",
1134
+ "system_prompt",
1135
+ "execution_pattern"
1136
+ ],
1137
+ "properties": {
1138
+ "name": {
1139
+ "type": "string",
1140
+ "minLength": 1,
1141
+ "maxLength": 100,
1142
+ "example": "Email Reply Generator"
1143
+ },
1144
+ "description": {
1145
+ "type": "string",
1146
+ "maxLength": 1000
1147
+ },
1148
+ "category": {
1149
+ "$ref": "#/components/schemas/SkillCategory"
1150
+ },
1151
+ "icon": {
1152
+ "type": "string",
1153
+ "example": "mail-reply"
1154
+ },
1155
+ "system_prompt": {
1156
+ "type": "string",
1157
+ "minLength": 1,
1158
+ "description": "Core LLM instructions"
1159
+ },
1160
+ "tools": {
1161
+ "type": "array",
1162
+ "items": {
1163
+ "type": "string"
1164
+ },
1165
+ "description": "Tool IDs this agent can use",
1166
+ "example": [
1167
+ "entity.search",
1168
+ "message.draft"
1169
+ ]
1170
+ },
1171
+ "model_config": {
1172
+ "$ref": "#/components/schemas/ModelConfig"
1173
+ },
1174
+ "max_iterations": {
1175
+ "type": "integer",
1176
+ "minimum": 1,
1177
+ "maximum": 20,
1178
+ "default": 10,
1179
+ "description": "Max ReAct loop iterations"
1180
+ },
1181
+ "execution_pattern": {
1182
+ "$ref": "#/components/schemas/ExecutionPattern"
1183
+ },
1184
+ "execution_mode": {
1185
+ "$ref": "#/components/schemas/ExecutionMode"
1186
+ },
1187
+ "output_schema": {
1188
+ "type": "object",
1189
+ "description": "JSON Schema for expected output"
1190
+ },
1191
+ "input_parameters_schema": {
1192
+ "$ref": "#/components/schemas/InputParametersSchema"
1193
+ }
1194
+ }
1195
+ },
1196
+ "UpdateAgentRequest": {
1197
+ "type": "object",
1198
+ "properties": {
1199
+ "name": {
1200
+ "type": "string",
1201
+ "minLength": 1,
1202
+ "maxLength": 100
1203
+ },
1204
+ "description": {
1205
+ "type": "string",
1206
+ "maxLength": 1000
1207
+ },
1208
+ "category": {
788
1209
  "$ref": "#/components/schemas/SkillCategory"
789
1210
  },
790
1211
  "icon": {
@@ -946,6 +1367,28 @@
946
1367
  "reason": {
947
1368
  "type": "string",
948
1369
  "description": "Optional reason for approval"
1370
+ },
1371
+ "approved_action_ids": {
1372
+ "type": "array",
1373
+ "items": {
1374
+ "type": "string"
1375
+ },
1376
+ "description": "For batch approval - list of action IDs to approve. If not provided, all actions are approved."
1377
+ },
1378
+ "rejected_action_ids": {
1379
+ "type": "array",
1380
+ "items": {
1381
+ "type": "string"
1382
+ },
1383
+ "description": "For batch approval - list of action IDs to reject. Actions not in approved_action_ids are implicitly rejected."
1384
+ },
1385
+ "share_scope": {
1386
+ "type": "string",
1387
+ "enum": [
1388
+ "primary_only",
1389
+ "primary_and_relations"
1390
+ ],
1391
+ "description": "For `partnering.proposeAssignment` approvals. `primary_only` (default) shares only the primary entity; `primary_and_relations` also shares every entity in the proposal's `related_entities` as a child of the primary. Ignored by other tools.\n"
949
1392
  }
950
1393
  }
951
1394
  },
@@ -1087,17 +1530,48 @@
1087
1530
  "pending_action": {
1088
1531
  "$ref": "#/components/schemas/PendingAction"
1089
1532
  },
1090
- "metrics": {
1091
- "$ref": "#/components/schemas/ExecutionMetrics"
1533
+ "metrics": {
1534
+ "$ref": "#/components/schemas/ExecutionMetrics"
1535
+ },
1536
+ "started_at": {
1537
+ "type": "string",
1538
+ "format": "date-time"
1539
+ },
1540
+ "completed_at": {
1541
+ "type": "string",
1542
+ "format": "date-time",
1543
+ "nullable": true
1544
+ },
1545
+ "iterations": {
1546
+ "type": "array",
1547
+ "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.",
1548
+ "items": {
1549
+ "$ref": "#/components/schemas/ExecutionIterationProjection"
1550
+ }
1551
+ }
1552
+ }
1553
+ },
1554
+ "ExecutionIterationProjection": {
1555
+ "type": "object",
1556
+ "properties": {
1557
+ "index": {
1558
+ "type": "integer"
1559
+ },
1560
+ "tool": {
1561
+ "type": "string",
1562
+ "nullable": true,
1563
+ "description": "Tool id the iteration invoked, or null for a non-tool step"
1092
1564
  },
1093
- "started_at": {
1565
+ "status": {
1094
1566
  "type": "string",
1095
- "format": "date-time"
1567
+ "enum": [
1568
+ "running",
1569
+ "completed"
1570
+ ]
1096
1571
  },
1097
- "completed_at": {
1572
+ "timestamp": {
1098
1573
  "type": "string",
1099
- "format": "date-time",
1100
- "nullable": true
1574
+ "format": "date-time"
1101
1575
  }
1102
1576
  }
1103
1577
  },
@@ -1286,7 +1760,8 @@
1286
1760
  "apply",
1287
1761
  "send",
1288
1762
  "link",
1289
- "unlink"
1763
+ "unlink",
1764
+ "batch_approval"
1290
1765
  ],
1291
1766
  "description": "Type of action being previewed"
1292
1767
  },
@@ -1414,7 +1889,7 @@
1414
1889
  "type": "string",
1415
1890
  "enum": [
1416
1891
  "entity",
1417
- "email",
1892
+ "message",
1418
1893
  "taxonomy",
1419
1894
  "rag",
1420
1895
  "workflow"
@@ -1462,9 +1937,10 @@
1462
1937
  "enum": [
1463
1938
  "flows",
1464
1939
  "copilot",
1940
+ "portals",
1465
1941
  "all"
1466
1942
  ],
1467
- "description": "Where the skill/agent is available:\n- flows: Available in workflow automations\n- copilot: Available as a sub-agent in copilot\n- all: Available everywhere\n"
1943
+ "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"
1468
1944
  },
1469
1945
  "ExecutionContext": {
1470
1946
  "type": "string",
@@ -1517,9 +1993,10 @@
1517
1993
  "taxonomy",
1518
1994
  "taxonomy-classification",
1519
1995
  "shared-inbox",
1520
- "label"
1996
+ "label",
1997
+ "matching-criteria"
1521
1998
  ],
1522
- "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"
1999
+ "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"
1523
2000
  },
1524
2001
  "InputParameterDefinition": {
1525
2002
  "type": "object",
@@ -1605,6 +2082,11 @@
1605
2082
  "type": "string"
1606
2083
  },
1607
2084
  "description": "Filter to specific attribute types (for entity-attribute)"
2085
+ },
2086
+ "hidden": {
2087
+ "type": "boolean",
2088
+ "default": false,
2089
+ "description": "Whether to hide the parameter from the UI"
1608
2090
  }
1609
2091
  }
1610
2092
  },
@@ -1689,6 +2171,18 @@
1689
2171
  "type": "integer",
1690
2172
  "default": 4096,
1691
2173
  "maximum": 8192
2174
+ },
2175
+ "thinking": {
2176
+ "type": "boolean",
2177
+ "default": false,
2178
+ "description": "Enable extended thinking/reasoning for the model"
2179
+ },
2180
+ "thinking_budget": {
2181
+ "type": "integer",
2182
+ "default": 10000,
2183
+ "minimum": 1000,
2184
+ "maximum": 50000,
2185
+ "description": "Token budget for extended thinking (only used when thinking is enabled)"
1692
2186
  }
1693
2187
  }
1694
2188
  },
@@ -1705,6 +2199,385 @@
1705
2199
  "type": "object"
1706
2200
  }
1707
2201
  }
2202
+ },
2203
+ "ChatRequest": {
2204
+ "type": "object",
2205
+ "required": [
2206
+ "agentId",
2207
+ "message"
2208
+ ],
2209
+ "properties": {
2210
+ "agentId": {
2211
+ "type": "string",
2212
+ "description": "Agent ID to chat with"
2213
+ },
2214
+ "message": {
2215
+ "type": "string",
2216
+ "description": "User message"
2217
+ },
2218
+ "conversationId": {
2219
+ "type": "string",
2220
+ "format": "uuid",
2221
+ "description": "Conversation ID for server-side memory. If provided, loads history from DynamoDB."
2222
+ },
2223
+ "clientHistory": {
2224
+ "type": "array",
2225
+ "items": {
2226
+ "$ref": "#/components/schemas/ChatMessage"
2227
+ },
2228
+ "description": "Client-provided message history (overrides server-side memory)"
2229
+ },
2230
+ "context": {
2231
+ "type": "object",
2232
+ "properties": {
2233
+ "entityId": {
2234
+ "type": "string"
2235
+ },
2236
+ "customData": {
2237
+ "type": "object",
2238
+ "additionalProperties": true
2239
+ }
2240
+ }
2241
+ },
2242
+ "streaming": {
2243
+ "$ref": "#/components/schemas/StreamingOptions"
2244
+ }
2245
+ }
2246
+ },
2247
+ "ChatMessage": {
2248
+ "type": "object",
2249
+ "required": [
2250
+ "role",
2251
+ "content"
2252
+ ],
2253
+ "properties": {
2254
+ "role": {
2255
+ "type": "string",
2256
+ "enum": [
2257
+ "user",
2258
+ "assistant",
2259
+ "tool",
2260
+ "system"
2261
+ ]
2262
+ },
2263
+ "content": {
2264
+ "type": "string"
2265
+ },
2266
+ "tool_calls": {
2267
+ "type": "array",
2268
+ "items": {
2269
+ "type": "object",
2270
+ "properties": {
2271
+ "id": {
2272
+ "type": "string"
2273
+ },
2274
+ "name": {
2275
+ "type": "string"
2276
+ },
2277
+ "input": {
2278
+ "type": "object"
2279
+ },
2280
+ "output": {
2281
+ "type": "string"
2282
+ }
2283
+ }
2284
+ }
2285
+ }
2286
+ }
2287
+ },
2288
+ "StreamingOptions": {
2289
+ "type": "object",
2290
+ "properties": {
2291
+ "mode": {
2292
+ "type": "string",
2293
+ "enum": [
2294
+ "updates",
2295
+ "messages"
2296
+ ],
2297
+ "default": "updates",
2298
+ "description": "Stream mode - updates for step-based, messages for token-based"
2299
+ },
2300
+ "streamTokens": {
2301
+ "type": "boolean",
2302
+ "default": false,
2303
+ "description": "Enable token-level streaming"
2304
+ },
2305
+ "includeMetadata": {
2306
+ "type": "boolean",
2307
+ "default": false,
2308
+ "description": "Include metadata events"
2309
+ }
2310
+ }
2311
+ },
2312
+ "StreamEvent": {
2313
+ "type": "object",
2314
+ "description": "Server-Sent Event for streaming responses",
2315
+ "properties": {
2316
+ "type": {
2317
+ "type": "string",
2318
+ "enum": [
2319
+ "token",
2320
+ "agent_step",
2321
+ "tool_call",
2322
+ "tool_result",
2323
+ "complete",
2324
+ "error",
2325
+ "metadata",
2326
+ "needs_approval"
2327
+ ]
2328
+ },
2329
+ "content": {
2330
+ "type": "string",
2331
+ "description": "Token content (for token events)"
2332
+ },
2333
+ "index": {
2334
+ "type": "integer",
2335
+ "description": "Token index (for token events)"
2336
+ },
2337
+ "tool": {
2338
+ "type": "string",
2339
+ "description": "Tool name (for tool events)"
2340
+ },
2341
+ "input": {
2342
+ "type": "object",
2343
+ "description": "Tool input (for tool_call events)"
2344
+ },
2345
+ "output": {
2346
+ "type": "string",
2347
+ "description": "Tool output (for tool_result events)"
2348
+ },
2349
+ "callId": {
2350
+ "type": "string",
2351
+ "description": "Tool call ID"
2352
+ },
2353
+ "result": {
2354
+ "$ref": "#/components/schemas/ExecutionResult"
2355
+ },
2356
+ "error": {
2357
+ "type": "object",
2358
+ "properties": {
2359
+ "code": {
2360
+ "type": "string"
2361
+ },
2362
+ "message": {
2363
+ "type": "string"
2364
+ }
2365
+ }
2366
+ },
2367
+ "conversationId": {
2368
+ "type": "string",
2369
+ "format": "uuid",
2370
+ "description": "Conversation ID (included in complete events)"
2371
+ }
2372
+ }
2373
+ },
2374
+ "ExecutionResult": {
2375
+ "type": "object",
2376
+ "properties": {
2377
+ "response": {
2378
+ "type": "string"
2379
+ },
2380
+ "structured_output": {
2381
+ "type": "object"
2382
+ },
2383
+ "status": {
2384
+ "type": "string",
2385
+ "enum": [
2386
+ "completed",
2387
+ "failed",
2388
+ "max_iterations",
2389
+ "rejected"
2390
+ ]
2391
+ },
2392
+ "metrics": {
2393
+ "$ref": "#/components/schemas/ExecutionMetrics"
2394
+ }
2395
+ }
2396
+ },
2397
+ "ConversationItem": {
2398
+ "type": "object",
2399
+ "properties": {
2400
+ "conversation_id": {
2401
+ "type": "string",
2402
+ "format": "uuid"
2403
+ },
2404
+ "user_id": {
2405
+ "type": "string"
2406
+ },
2407
+ "agent_id": {
2408
+ "type": "string"
2409
+ },
2410
+ "title": {
2411
+ "type": "string"
2412
+ },
2413
+ "message_count": {
2414
+ "type": "integer"
2415
+ },
2416
+ "last_message": {
2417
+ "type": "string",
2418
+ "description": "Preview of the last message"
2419
+ },
2420
+ "last_message_at": {
2421
+ "type": "string",
2422
+ "format": "date-time"
2423
+ },
2424
+ "context": {
2425
+ "type": "object",
2426
+ "properties": {
2427
+ "entityId": {
2428
+ "type": "string"
2429
+ },
2430
+ "customData": {
2431
+ "type": "object"
2432
+ }
2433
+ }
2434
+ },
2435
+ "created_at": {
2436
+ "type": "string",
2437
+ "format": "date-time"
2438
+ },
2439
+ "updated_at": {
2440
+ "type": "string",
2441
+ "format": "date-time"
2442
+ }
2443
+ }
2444
+ },
2445
+ "MessageItem": {
2446
+ "type": "object",
2447
+ "properties": {
2448
+ "conversation_id": {
2449
+ "type": "string",
2450
+ "format": "uuid"
2451
+ },
2452
+ "role": {
2453
+ "type": "string",
2454
+ "enum": [
2455
+ "user",
2456
+ "assistant",
2457
+ "tool",
2458
+ "system"
2459
+ ]
2460
+ },
2461
+ "content": {
2462
+ "type": "string"
2463
+ },
2464
+ "timestamp": {
2465
+ "type": "string",
2466
+ "format": "date-time"
2467
+ },
2468
+ "tool_calls": {
2469
+ "type": "array",
2470
+ "items": {
2471
+ "type": "object",
2472
+ "properties": {
2473
+ "id": {
2474
+ "type": "string"
2475
+ },
2476
+ "name": {
2477
+ "type": "string"
2478
+ },
2479
+ "input": {
2480
+ "type": "object"
2481
+ },
2482
+ "output": {
2483
+ "type": "string"
2484
+ }
2485
+ }
2486
+ }
2487
+ },
2488
+ "token_count": {
2489
+ "type": "integer"
2490
+ },
2491
+ "trace_id": {
2492
+ "type": "string",
2493
+ "format": "uuid",
2494
+ "description": "Langfuse trace id for the turn (assistant messages only)"
2495
+ },
2496
+ "feedback": {
2497
+ "$ref": "#/components/schemas/MessageFeedback"
2498
+ }
2499
+ }
2500
+ },
2501
+ "MessageFeedback": {
2502
+ "type": "object",
2503
+ "required": [
2504
+ "rating",
2505
+ "user_id",
2506
+ "submitted_at"
2507
+ ],
2508
+ "properties": {
2509
+ "rating": {
2510
+ "type": "string",
2511
+ "enum": [
2512
+ "up",
2513
+ "down"
2514
+ ]
2515
+ },
2516
+ "comment": {
2517
+ "type": "string"
2518
+ },
2519
+ "user_id": {
2520
+ "type": "string"
2521
+ },
2522
+ "submitted_at": {
2523
+ "type": "string",
2524
+ "format": "date-time"
2525
+ }
2526
+ }
2527
+ },
2528
+ "SubmitFeedbackRequest": {
2529
+ "type": "object",
2530
+ "required": [
2531
+ "trace_id",
2532
+ "rating"
2533
+ ],
2534
+ "properties": {
2535
+ "trace_id": {
2536
+ "type": "string",
2537
+ "format": "uuid",
2538
+ "description": "Langfuse trace id of the assistant turn being rated"
2539
+ },
2540
+ "rating": {
2541
+ "type": "string",
2542
+ "enum": [
2543
+ "up",
2544
+ "down"
2545
+ ]
2546
+ },
2547
+ "comment": {
2548
+ "type": "string",
2549
+ "description": "Optional free-text feedback"
2550
+ }
2551
+ }
2552
+ },
2553
+ "ListConversationsResponse": {
2554
+ "type": "object",
2555
+ "properties": {
2556
+ "conversations": {
2557
+ "type": "array",
2558
+ "items": {
2559
+ "$ref": "#/components/schemas/ConversationItem"
2560
+ }
2561
+ },
2562
+ "next_cursor": {
2563
+ "type": "string",
2564
+ "nullable": true
2565
+ }
2566
+ }
2567
+ },
2568
+ "ConversationWithMessages": {
2569
+ "type": "object",
2570
+ "properties": {
2571
+ "conversation": {
2572
+ "$ref": "#/components/schemas/ConversationItem"
2573
+ },
2574
+ "messages": {
2575
+ "type": "array",
2576
+ "items": {
2577
+ "$ref": "#/components/schemas/MessageItem"
2578
+ }
2579
+ }
2580
+ }
1708
2581
  }
1709
2582
  }
1710
2583
  }