@orq-ai/node 4.5.0-rc.26 → 4.5.0-rc.33

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 (222) hide show
  1. package/README.md +38 -28
  2. package/funcs/agentsList.d.ts +1 -1
  3. package/funcs/agentsList.d.ts.map +1 -1
  4. package/funcs/agentsList.js +5 -3
  5. package/funcs/agentsList.js.map +1 -1
  6. package/funcs/agentsPostV2AgentsA2a.d.ts +18 -0
  7. package/funcs/agentsPostV2AgentsA2a.d.ts.map +1 -0
  8. package/funcs/agentsPostV2AgentsA2a.js +120 -0
  9. package/funcs/agentsPostV2AgentsA2a.js.map +1 -0
  10. package/funcs/agentsPostV2AgentsKeyCardRefresh.d.ts +18 -0
  11. package/funcs/agentsPostV2AgentsKeyCardRefresh.d.ts.map +1 -0
  12. package/funcs/agentsPostV2AgentsKeyCardRefresh.js +124 -0
  13. package/funcs/agentsPostV2AgentsKeyCardRefresh.js.map +1 -0
  14. package/funcs/agentsResponsesGet.d.ts +19 -0
  15. package/funcs/agentsResponsesGet.d.ts.map +1 -0
  16. package/funcs/agentsResponsesGet.js +128 -0
  17. package/funcs/agentsResponsesGet.js.map +1 -0
  18. package/funcs/agentsUpdate.d.ts +1 -1
  19. package/funcs/agentsUpdate.d.ts.map +1 -1
  20. package/funcs/agentsUpdate.js.map +1 -1
  21. package/jsr.json +1 -1
  22. package/lib/config.d.ts +3 -3
  23. package/lib/config.js +3 -3
  24. package/models/components/extendedmessage.d.ts +71 -0
  25. package/models/components/extendedmessage.d.ts.map +1 -0
  26. package/models/components/extendedmessage.js +98 -0
  27. package/models/components/extendedmessage.js.map +1 -0
  28. package/models/components/getagentresponse.d.ts +157 -0
  29. package/models/components/getagentresponse.d.ts.map +1 -0
  30. package/models/components/getagentresponse.js +175 -0
  31. package/models/components/getagentresponse.js.map +1 -0
  32. package/models/components/index.d.ts +2 -0
  33. package/models/components/index.d.ts.map +1 -1
  34. package/models/components/index.js +2 -0
  35. package/models/components/index.js.map +1 -1
  36. package/models/components/partdoneevent.js +1 -1
  37. package/models/components/reasoningpart.js +1 -1
  38. package/models/errors/index.d.ts +2 -0
  39. package/models/errors/index.d.ts.map +1 -1
  40. package/models/errors/index.js +2 -0
  41. package/models/errors/index.js.map +1 -1
  42. package/models/errors/postv2agentsa2a.d.ts +43 -0
  43. package/models/errors/postv2agentsa2a.d.ts.map +1 -0
  44. package/models/errors/postv2agentsa2a.js +94 -0
  45. package/models/errors/postv2agentsa2a.js.map +1 -0
  46. package/models/errors/postv2agentskeycardrefresh.d.ts +43 -0
  47. package/models/errors/postv2agentskeycardrefresh.d.ts.map +1 -0
  48. package/models/errors/postv2agentskeycardrefresh.js +94 -0
  49. package/models/errors/postv2agentskeycardrefresh.js.map +1 -0
  50. package/models/operations/createagentrequest.d.ts +309 -142
  51. package/models/operations/createagentrequest.d.ts.map +1 -1
  52. package/models/operations/createagentrequest.js +292 -160
  53. package/models/operations/createagentrequest.js.map +1 -1
  54. package/models/operations/createagentresponserequest.d.ts +22 -1
  55. package/models/operations/createagentresponserequest.d.ts.map +1 -1
  56. package/models/operations/createagentresponserequest.js +10 -1
  57. package/models/operations/createagentresponserequest.js.map +1 -1
  58. package/models/operations/createannotation.d.ts +1 -1
  59. package/models/operations/createannotation.d.ts.map +1 -1
  60. package/models/operations/createannotation.js +4 -0
  61. package/models/operations/createannotation.js.map +1 -1
  62. package/models/operations/createcontact.js +1 -1
  63. package/models/operations/createdataset.js +1 -1
  64. package/models/operations/createdatasetitem.js +4 -4
  65. package/models/operations/createdatasource.js +1 -1
  66. package/models/operations/createeval.js +16 -16
  67. package/models/operations/createidentity.js +1 -1
  68. package/models/operations/createknowledge.d.ts +7 -7
  69. package/models/operations/createknowledge.d.ts.map +1 -1
  70. package/models/operations/createknowledge.js +11 -11
  71. package/models/operations/createknowledge.js.map +1 -1
  72. package/models/operations/createtool.d.ts +39 -39
  73. package/models/operations/createtool.d.ts.map +1 -1
  74. package/models/operations/createtool.js +52 -49
  75. package/models/operations/createtool.js.map +1 -1
  76. package/models/operations/deploymentinvoke.d.ts +14 -0
  77. package/models/operations/deploymentinvoke.d.ts.map +1 -1
  78. package/models/operations/deploymentinvoke.js +16 -1
  79. package/models/operations/deploymentinvoke.js.map +1 -1
  80. package/models/operations/deploymentstream.d.ts +14 -0
  81. package/models/operations/deploymentstream.d.ts.map +1 -1
  82. package/models/operations/deploymentstream.js +16 -1
  83. package/models/operations/deploymentstream.js.map +1 -1
  84. package/models/operations/fileget.js +1 -1
  85. package/models/operations/filelist.js +1 -1
  86. package/models/operations/fileupload.js +1 -1
  87. package/models/operations/getagentresponse.d.ts +20 -0
  88. package/models/operations/getagentresponse.d.ts.map +1 -0
  89. package/models/operations/getagentresponse.js +56 -0
  90. package/models/operations/getagentresponse.js.map +1 -0
  91. package/models/operations/getalltools.d.ts +39 -39
  92. package/models/operations/getalltools.d.ts.map +1 -1
  93. package/models/operations/getalltools.js +49 -47
  94. package/models/operations/getalltools.js.map +1 -1
  95. package/models/operations/getevals.js +16 -16
  96. package/models/operations/index.d.ts +3 -0
  97. package/models/operations/index.d.ts.map +1 -1
  98. package/models/operations/index.js +3 -0
  99. package/models/operations/index.js.map +1 -1
  100. package/models/operations/invokeagent.d.ts +26 -1
  101. package/models/operations/invokeagent.d.ts.map +1 -1
  102. package/models/operations/invokeagent.js +12 -1
  103. package/models/operations/invokeagent.js.map +1 -1
  104. package/models/operations/listagents.d.ts +331 -147
  105. package/models/operations/listagents.d.ts.map +1 -1
  106. package/models/operations/listagents.js +314 -171
  107. package/models/operations/listagents.js.map +1 -1
  108. package/models/operations/listdatasetdatapoints.js +4 -4
  109. package/models/operations/listdatasets.js +1 -1
  110. package/models/operations/listdatasources.js +1 -1
  111. package/models/operations/listidentities.js +1 -1
  112. package/models/operations/listknowledgebases.d.ts +8 -8
  113. package/models/operations/listknowledgebases.d.ts.map +1 -1
  114. package/models/operations/listknowledgebases.js +13 -15
  115. package/models/operations/listknowledgebases.js.map +1 -1
  116. package/models/operations/postv2agentsa2a.d.ts +119 -0
  117. package/models/operations/postv2agentsa2a.d.ts.map +1 -0
  118. package/models/operations/postv2agentsa2a.js +147 -0
  119. package/models/operations/postv2agentsa2a.js.map +1 -0
  120. package/models/operations/postv2agentskeycardrefresh.d.ts +35 -0
  121. package/models/operations/postv2agentskeycardrefresh.d.ts.map +1 -0
  122. package/models/operations/postv2agentskeycardrefresh.js +71 -0
  123. package/models/operations/postv2agentskeycardrefresh.js.map +1 -0
  124. package/models/operations/retrieveagentrequest.d.ts +316 -150
  125. package/models/operations/retrieveagentrequest.d.ts.map +1 -1
  126. package/models/operations/retrieveagentrequest.js +307 -173
  127. package/models/operations/retrieveagentrequest.js.map +1 -1
  128. package/models/operations/retrievedatapoint.js +4 -4
  129. package/models/operations/retrievedataset.js +1 -1
  130. package/models/operations/retrievedatasource.js +1 -1
  131. package/models/operations/retrieveidentity.js +1 -1
  132. package/models/operations/retrievetool.js +6 -6
  133. package/models/operations/runagent.d.ts +15 -11
  134. package/models/operations/runagent.d.ts.map +1 -1
  135. package/models/operations/runagent.js +12 -12
  136. package/models/operations/runagent.js.map +1 -1
  137. package/models/operations/streamagent.d.ts +22 -1
  138. package/models/operations/streamagent.d.ts.map +1 -1
  139. package/models/operations/streamagent.js +11 -1
  140. package/models/operations/streamagent.js.map +1 -1
  141. package/models/operations/streamrunagent.d.ts +1 -1
  142. package/models/operations/streamrunagent.js +1 -1
  143. package/models/operations/updateagent.d.ts +370 -157
  144. package/models/operations/updateagent.d.ts.map +1 -1
  145. package/models/operations/updateagent.js +336 -179
  146. package/models/operations/updateagent.js.map +1 -1
  147. package/models/operations/updatedatapoint.js +4 -4
  148. package/models/operations/updatedataset.js +1 -1
  149. package/models/operations/updatedatasource.js +1 -1
  150. package/models/operations/updateeval.js +16 -16
  151. package/models/operations/updateidentity.js +1 -1
  152. package/models/operations/updatetool.js +7 -7
  153. package/package.json +1 -1
  154. package/sdk/agents.d.ts +16 -2
  155. package/sdk/agents.d.ts.map +1 -1
  156. package/sdk/agents.js +22 -2
  157. package/sdk/agents.js.map +1 -1
  158. package/sdk/responses.d.ts +8 -0
  159. package/sdk/responses.d.ts.map +1 -1
  160. package/sdk/responses.js +10 -0
  161. package/sdk/responses.js.map +1 -1
  162. package/src/funcs/agentsList.ts +5 -0
  163. package/src/funcs/agentsPostV2AgentsA2a.ts +178 -0
  164. package/src/funcs/agentsPostV2AgentsKeyCardRefresh.ts +187 -0
  165. package/src/funcs/agentsResponsesGet.ts +182 -0
  166. package/src/funcs/agentsUpdate.ts +2 -2
  167. package/src/lib/config.ts +3 -3
  168. package/src/models/components/extendedmessage.ts +146 -0
  169. package/src/models/components/getagentresponse.ts +348 -0
  170. package/src/models/components/index.ts +2 -0
  171. package/src/models/components/partdoneevent.ts +1 -1
  172. package/src/models/components/reasoningpart.ts +1 -1
  173. package/src/models/errors/index.ts +2 -0
  174. package/src/models/errors/postv2agentsa2a.ts +96 -0
  175. package/src/models/errors/postv2agentskeycardrefresh.ts +97 -0
  176. package/src/models/operations/createagentrequest.ts +714 -360
  177. package/src/models/operations/createagentresponserequest.ts +35 -1
  178. package/src/models/operations/createannotation.ts +5 -1
  179. package/src/models/operations/createcontact.ts +1 -1
  180. package/src/models/operations/createdataset.ts +1 -1
  181. package/src/models/operations/createdatasetitem.ts +4 -4
  182. package/src/models/operations/createdatasource.ts +1 -1
  183. package/src/models/operations/createeval.ts +16 -16
  184. package/src/models/operations/createidentity.ts +1 -1
  185. package/src/models/operations/createknowledge.ts +19 -17
  186. package/src/models/operations/createtool.ts +103 -91
  187. package/src/models/operations/deploymentinvoke.ts +38 -0
  188. package/src/models/operations/deploymentstream.ts +38 -0
  189. package/src/models/operations/fileget.ts +1 -1
  190. package/src/models/operations/filelist.ts +1 -1
  191. package/src/models/operations/fileupload.ts +1 -1
  192. package/src/models/operations/getagentresponse.ts +46 -0
  193. package/src/models/operations/getalltools.ts +93 -87
  194. package/src/models/operations/getevals.ts +16 -16
  195. package/src/models/operations/index.ts +3 -0
  196. package/src/models/operations/invokeagent.ts +45 -1
  197. package/src/models/operations/listagents.ts +723 -366
  198. package/src/models/operations/listdatasetdatapoints.ts +4 -4
  199. package/src/models/operations/listdatasets.ts +1 -1
  200. package/src/models/operations/listdatasources.ts +1 -1
  201. package/src/models/operations/listidentities.ts +1 -1
  202. package/src/models/operations/listknowledgebases.ts +72 -64
  203. package/src/models/operations/postv2agentsa2a.ts +252 -0
  204. package/src/models/operations/postv2agentskeycardrefresh.ts +100 -0
  205. package/src/models/operations/retrieveagentrequest.ts +975 -468
  206. package/src/models/operations/retrievedatapoint.ts +4 -4
  207. package/src/models/operations/retrievedataset.ts +1 -1
  208. package/src/models/operations/retrievedatasource.ts +1 -1
  209. package/src/models/operations/retrieveidentity.ts +1 -1
  210. package/src/models/operations/retrievetool.ts +6 -6
  211. package/src/models/operations/runagent.ts +35 -21
  212. package/src/models/operations/streamagent.ts +40 -1
  213. package/src/models/operations/streamrunagent.ts +2 -2
  214. package/src/models/operations/updateagent.ts +876 -385
  215. package/src/models/operations/updatedatapoint.ts +4 -4
  216. package/src/models/operations/updatedataset.ts +1 -1
  217. package/src/models/operations/updatedatasource.ts +1 -1
  218. package/src/models/operations/updateeval.ts +16 -16
  219. package/src/models/operations/updateidentity.ts +1 -1
  220. package/src/models/operations/updatetool.ts +7 -7
  221. package/src/sdk/agents.ts +39 -1
  222. package/src/sdk/responses.ts +19 -0
@@ -20,7 +20,7 @@ export type RetrieveAgentRequestRequest = {
20
20
  /**
21
21
  * The status of the agent. `Live` is the latest version of the agent. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
22
22
  */
23
- export const RetrieveAgentRequestStatus = {
23
+ export const RetrieveAgentRequestResponseBodyAgentsStatus = {
24
24
  Live: "live",
25
25
  Draft: "draft",
26
26
  Pending: "pending",
@@ -29,14 +29,196 @@ export const RetrieveAgentRequestStatus = {
29
29
  /**
30
30
  * The status of the agent. `Live` is the latest version of the agent. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
31
31
  */
32
- export type RetrieveAgentRequestStatus = ClosedEnum<
33
- typeof RetrieveAgentRequestStatus
32
+ export type RetrieveAgentRequestResponseBodyAgentsStatus = ClosedEnum<
33
+ typeof RetrieveAgentRequestResponseBodyAgentsStatus
34
+ >;
35
+
36
+ export type RetrieveAgentRequestResponseBodyAgentsTeamOfAgents = {
37
+ /**
38
+ * The unique key of the agent within the workspace
39
+ */
40
+ key: string;
41
+ /**
42
+ * The role of the agent in this context. This is used to give extra information to the leader to help it decide which agent to hand off to.
43
+ */
44
+ role?: string | undefined;
45
+ };
46
+
47
+ export type RetrieveAgentRequestResponseBodyAgentsMetrics = {
48
+ totalCost: number;
49
+ };
50
+
51
+ export type RetrieveAgentRequestResponseBodyAgentsKnowledgeBases = {
52
+ /**
53
+ * Unique identifier of the knowledge base to search
54
+ */
55
+ knowledgeId: string;
56
+ };
57
+
58
+ export const RetrieveAgentRequestResponseBodyAgentsSource = {
59
+ Internal: "internal",
60
+ External: "external",
61
+ Experiment: "experiment",
62
+ } as const;
63
+ export type RetrieveAgentRequestResponseBodyAgentsSource = ClosedEnum<
64
+ typeof RetrieveAgentRequestResponseBodyAgentsSource
65
+ >;
66
+
67
+ export type RetrieveAgentRequestResponseBodyHeaders = {
68
+ /**
69
+ * Header value. **Update behavior**: Provide empty string ("") to preserve existing encrypted value without re-entering credentials. Provide new value to rotate. Omit header entirely to remove.
70
+ */
71
+ value: string;
72
+ encrypted: boolean;
73
+ };
74
+
75
+ /**
76
+ * A2A configuration with agent endpoint and authentication. External agents manage their own model/settings.
77
+ */
78
+ export type ResponseBodyA2AAgentConfiguration = {
79
+ /**
80
+ * The A2A agent endpoint URL (e.g., https://example.com/agent/a2a)
81
+ */
82
+ agentUrl: string;
83
+ /**
84
+ * Optional explicit URL to fetch agent card. Defaults to {agent_url}/card if not provided
85
+ */
86
+ cardUrl?: string | undefined;
87
+ /**
88
+ * HTTP headers for A2A agent requests with encryption support (max 20 headers). **Update behavior**: Empty string values preserve existing encrypted headers, allowing partial updates without credential re-entry.
89
+ */
90
+ headers?:
91
+ | { [k: string]: RetrieveAgentRequestResponseBodyHeaders }
92
+ | undefined;
93
+ /**
94
+ * Cached agent card from discovery. Refreshed periodically.
95
+ */
96
+ cachedCard?: any | undefined;
97
+ };
98
+
99
+ export type RetrieveAgentRequestResponseBody2 = {
100
+ id: string;
101
+ /**
102
+ * Unique identifier for the agent within the workspace
103
+ */
104
+ key: string;
105
+ displayName?: string | undefined;
106
+ projectId: string;
107
+ createdById?: string | null | undefined;
108
+ updatedById?: string | null | undefined;
109
+ created?: string | undefined;
110
+ updated?: string | undefined;
111
+ /**
112
+ * The status of the agent. `Live` is the latest version of the agent. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
113
+ */
114
+ status: RetrieveAgentRequestResponseBodyAgentsStatus;
115
+ versionHash?: string | undefined;
116
+ /**
117
+ * Entity storage path in the format: `project/folder/subfolder/...`
118
+ *
119
+ * @remarks
120
+ *
121
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
122
+ *
123
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
124
+ */
125
+ path: string;
126
+ /**
127
+ * Array of memory store identifiers. Accepts both memory store IDs and keys.
128
+ */
129
+ memoryStores?: Array<string> | undefined;
130
+ /**
131
+ * The agents that are accessible to this orchestrator. The main agent can hand off to these agents to perform tasks.
132
+ */
133
+ teamOfAgents?:
134
+ | Array<RetrieveAgentRequestResponseBodyAgentsTeamOfAgents>
135
+ | undefined;
136
+ metrics?: RetrieveAgentRequestResponseBodyAgentsMetrics | undefined;
137
+ /**
138
+ * Extracted variables from agent instructions
139
+ */
140
+ variables?: { [k: string]: any } | undefined;
141
+ /**
142
+ * Agent knowledge bases reference
143
+ */
144
+ knowledgeBases?:
145
+ | Array<RetrieveAgentRequestResponseBodyAgentsKnowledgeBases>
146
+ | undefined;
147
+ source?: RetrieveAgentRequestResponseBodyAgentsSource | undefined;
148
+ /**
149
+ * External A2A-compliant agent
150
+ */
151
+ type: "a2a";
152
+ /**
153
+ * Role fetched from agent card name or user-provided
154
+ */
155
+ role: string;
156
+ /**
157
+ * Description fetched from agent card or user-provided
158
+ */
159
+ description: string;
160
+ systemPrompt?: string | undefined;
161
+ /**
162
+ * Instructions from agent card description or user-provided
163
+ */
164
+ instructions: string;
165
+ /**
166
+ * A2A configuration with agent endpoint and authentication. External agents manage their own model/settings.
167
+ */
168
+ a2a: ResponseBodyA2AAgentConfiguration;
169
+ };
170
+
171
+ /**
172
+ * The status of the agent. `Live` is the latest version of the agent. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
173
+ */
174
+ export const RetrieveAgentRequestResponseBodyStatus = {
175
+ Live: "live",
176
+ Draft: "draft",
177
+ Pending: "pending",
178
+ Published: "published",
179
+ } as const;
180
+ /**
181
+ * The status of the agent. `Live` is the latest version of the agent. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
182
+ */
183
+ export type RetrieveAgentRequestResponseBodyStatus = ClosedEnum<
184
+ typeof RetrieveAgentRequestResponseBodyStatus
185
+ >;
186
+
187
+ export type RetrieveAgentRequestResponseBodyTeamOfAgents = {
188
+ /**
189
+ * The unique key of the agent within the workspace
190
+ */
191
+ key: string;
192
+ /**
193
+ * The role of the agent in this context. This is used to give extra information to the leader to help it decide which agent to hand off to.
194
+ */
195
+ role?: string | undefined;
196
+ };
197
+
198
+ export type RetrieveAgentRequestResponseBodyMetrics = {
199
+ totalCost: number;
200
+ };
201
+
202
+ export type RetrieveAgentRequestResponseBodyKnowledgeBases = {
203
+ /**
204
+ * Unique identifier of the knowledge base to search
205
+ */
206
+ knowledgeId: string;
207
+ };
208
+
209
+ export const RetrieveAgentRequestResponseBodySource = {
210
+ Internal: "internal",
211
+ External: "external",
212
+ Experiment: "experiment",
213
+ } as const;
214
+ export type RetrieveAgentRequestResponseBodySource = ClosedEnum<
215
+ typeof RetrieveAgentRequestResponseBodySource
34
216
  >;
35
217
 
36
218
  /**
37
219
  * If all, the agent will require approval for all tools. If respect_tool, the agent will require approval for tools that have the requires_approval flag set to true. If none, the agent will not require approval for any tools.
38
220
  */
39
- export const RetrieveAgentRequestToolApprovalRequired = {
221
+ export const RetrieveAgentRequestResponseBodyToolApprovalRequired = {
40
222
  All: "all",
41
223
  RespectTool: "respect_tool",
42
224
  None: "none",
@@ -44,11 +226,11 @@ export const RetrieveAgentRequestToolApprovalRequired = {
44
226
  /**
45
227
  * If all, the agent will require approval for all tools. If respect_tool, the agent will require approval for tools that have the requires_approval flag set to true. If none, the agent will not require approval for any tools.
46
228
  */
47
- export type RetrieveAgentRequestToolApprovalRequired = ClosedEnum<
48
- typeof RetrieveAgentRequestToolApprovalRequired
229
+ export type RetrieveAgentRequestResponseBodyToolApprovalRequired = ClosedEnum<
230
+ typeof RetrieveAgentRequestResponseBodyToolApprovalRequired
49
231
  >;
50
232
 
51
- export type RetrieveAgentRequestConditions = {
233
+ export type ResponseBodyConditions = {
52
234
  /**
53
235
  * The argument of the tool call to evaluate
54
236
  */
@@ -63,7 +245,7 @@ export type RetrieveAgentRequestConditions = {
63
245
  value: string;
64
246
  };
65
247
 
66
- export type RetrieveAgentRequestTools = {
248
+ export type RetrieveAgentRequestResponseBodyTools = {
67
249
  /**
68
250
  * The id of the resource
69
251
  */
@@ -83,7 +265,7 @@ export type RetrieveAgentRequestTools = {
83
265
  * Nested tool ID for MCP tools (identifies specific tool within MCP server)
84
266
  */
85
267
  toolId?: string | undefined;
86
- conditions?: Array<RetrieveAgentRequestConditions> | undefined;
268
+ conditions?: Array<ResponseBodyConditions> | undefined;
87
269
  /**
88
270
  * Tool execution timeout in seconds (default: 2 minutes, max: 10 minutes)
89
271
  */
@@ -93,18 +275,18 @@ export type RetrieveAgentRequestTools = {
93
275
  /**
94
276
  * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
95
277
  */
96
- export const RetrieveAgentRequestExecuteOn = {
278
+ export const RetrieveAgentRequestResponseBodyExecuteOn = {
97
279
  Input: "input",
98
280
  Output: "output",
99
281
  } as const;
100
282
  /**
101
283
  * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
102
284
  */
103
- export type RetrieveAgentRequestExecuteOn = ClosedEnum<
104
- typeof RetrieveAgentRequestExecuteOn
285
+ export type RetrieveAgentRequestResponseBodyExecuteOn = ClosedEnum<
286
+ typeof RetrieveAgentRequestResponseBodyExecuteOn
105
287
  >;
106
288
 
107
- export type RetrieveAgentRequestEvaluators = {
289
+ export type RetrieveAgentRequestResponseBodyEvaluators = {
108
290
  /**
109
291
  * Unique key or identifier of the evaluator
110
292
  */
@@ -116,24 +298,24 @@ export type RetrieveAgentRequestEvaluators = {
116
298
  /**
117
299
  * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
118
300
  */
119
- executeOn: RetrieveAgentRequestExecuteOn;
301
+ executeOn: RetrieveAgentRequestResponseBodyExecuteOn;
120
302
  };
121
303
 
122
304
  /**
123
305
  * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
124
306
  */
125
- export const RetrieveAgentRequestAgentsExecuteOn = {
307
+ export const RetrieveAgentRequestResponseBodyAgentsExecuteOn = {
126
308
  Input: "input",
127
309
  Output: "output",
128
310
  } as const;
129
311
  /**
130
312
  * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
131
313
  */
132
- export type RetrieveAgentRequestAgentsExecuteOn = ClosedEnum<
133
- typeof RetrieveAgentRequestAgentsExecuteOn
314
+ export type RetrieveAgentRequestResponseBodyAgentsExecuteOn = ClosedEnum<
315
+ typeof RetrieveAgentRequestResponseBodyAgentsExecuteOn
134
316
  >;
135
317
 
136
- export type RetrieveAgentRequestGuardrails = {
318
+ export type RetrieveAgentRequestResponseBodyGuardrails = {
137
319
  /**
138
320
  * Unique key or identifier of the evaluator
139
321
  */
@@ -145,10 +327,10 @@ export type RetrieveAgentRequestGuardrails = {
145
327
  /**
146
328
  * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
147
329
  */
148
- executeOn: RetrieveAgentRequestAgentsExecuteOn;
330
+ executeOn: RetrieveAgentRequestResponseBodyAgentsExecuteOn;
149
331
  };
150
332
 
151
- export type RetrieveAgentRequestSettings = {
333
+ export type RetrieveAgentRequestResponseBodySettings = {
152
334
  /**
153
335
  * Maximum iterations(llm calls) before the agent will stop executing.
154
336
  */
@@ -164,16 +346,16 @@ export type RetrieveAgentRequestSettings = {
164
346
  /**
165
347
  * If all, the agent will require approval for all tools. If respect_tool, the agent will require approval for tools that have the requires_approval flag set to true. If none, the agent will not require approval for any tools.
166
348
  */
167
- toolApprovalRequired: RetrieveAgentRequestToolApprovalRequired;
168
- tools?: Array<RetrieveAgentRequestTools> | undefined;
349
+ toolApprovalRequired: RetrieveAgentRequestResponseBodyToolApprovalRequired;
350
+ tools?: Array<RetrieveAgentRequestResponseBodyTools> | undefined;
169
351
  /**
170
352
  * Configuration for an evaluator applied to the agent
171
353
  */
172
- evaluators?: Array<RetrieveAgentRequestEvaluators> | undefined;
354
+ evaluators?: Array<RetrieveAgentRequestResponseBodyEvaluators> | undefined;
173
355
  /**
174
356
  * Configuration for a guardrail applied to the agent
175
357
  */
176
- guardrails?: Array<RetrieveAgentRequestGuardrails> | undefined;
358
+ guardrails?: Array<RetrieveAgentRequestResponseBodyGuardrails> | undefined;
177
359
  };
178
360
 
179
361
  export type RetrieveAgentRequestResponseFormatJsonSchema = {
@@ -226,7 +408,7 @@ export type RetrieveAgentRequestResponseFormatText = {
226
408
  /**
227
409
  * An object specifying the format that the model must output
228
410
  */
229
- export type RetrieveAgentRequestResponseFormat =
411
+ export type RetrieveAgentRequestResponseBodyResponseFormat =
230
412
  | RetrieveAgentRequestResponseFormatText
231
413
  | RetrieveAgentRequestResponseFormatJSONObject
232
414
  | RetrieveAgentRequestResponseFormatAgentsJSONSchema;
@@ -243,7 +425,7 @@ export type RetrieveAgentRequestResponseFormat =
243
425
  *
244
426
  * Any of "none", "minimal", "low", "medium", "high", "xhigh".
245
427
  */
246
- export const RetrieveAgentRequestReasoningEffort = {
428
+ export const RetrieveAgentRequestResponseBodyReasoningEffort = {
247
429
  None: "none",
248
430
  Minimal: "minimal",
249
431
  Low: "low",
@@ -263,16 +445,16 @@ export const RetrieveAgentRequestReasoningEffort = {
263
445
  *
264
446
  * Any of "none", "minimal", "low", "medium", "high", "xhigh".
265
447
  */
266
- export type RetrieveAgentRequestReasoningEffort = ClosedEnum<
267
- typeof RetrieveAgentRequestReasoningEffort
448
+ export type RetrieveAgentRequestResponseBodyReasoningEffort = ClosedEnum<
449
+ typeof RetrieveAgentRequestResponseBodyReasoningEffort
268
450
  >;
269
451
 
270
452
  /**
271
453
  * Up to 4 sequences where the API will stop generating further tokens.
272
454
  */
273
- export type RetrieveAgentRequestStop = string | Array<string>;
455
+ export type RetrieveAgentRequestResponseBodyStop = string | Array<string>;
274
456
 
275
- export type RetrieveAgentRequestThinking =
457
+ export type RetrieveAgentRequestResponseBodyThinking =
276
458
  | components.ThinkingConfigDisabledSchema
277
459
  | components.ThinkingConfigEnabledSchema;
278
460
 
@@ -316,16 +498,16 @@ export type RetrieveAgentRequestToolChoice1 = ClosedEnum<
316
498
  /**
317
499
  * Controls which (if any) tool is called by the model.
318
500
  */
319
- export type RetrieveAgentRequestToolChoice =
501
+ export type RetrieveAgentRequestResponseBodyToolChoice =
320
502
  | RetrieveAgentRequestToolChoice2
321
503
  | RetrieveAgentRequestToolChoice1;
322
504
 
323
- export const RetrieveAgentRequestModalities = {
505
+ export const RetrieveAgentRequestResponseBodyModalities = {
324
506
  Text: "text",
325
507
  Audio: "audio",
326
508
  } as const;
327
- export type RetrieveAgentRequestModalities = ClosedEnum<
328
- typeof RetrieveAgentRequestModalities
509
+ export type RetrieveAgentRequestResponseBodyModalities = ClosedEnum<
510
+ typeof RetrieveAgentRequestResponseBodyModalities
329
511
  >;
330
512
 
331
513
  /**
@@ -343,53 +525,54 @@ export type RetrieveAgentRequestId1 = ClosedEnum<
343
525
  typeof RetrieveAgentRequestId1
344
526
  >;
345
527
 
346
- export type RetrieveAgentRequestId = RetrieveAgentRequestId1 | string;
528
+ export type RetrieveAgentRequestResponseBodyId =
529
+ | RetrieveAgentRequestId1
530
+ | string;
347
531
 
348
532
  /**
349
533
  * Determines whether the guardrail runs on the input (user message) or output (model response).
350
534
  */
351
- export const RetrieveAgentRequestAgentsResponseExecuteOn = {
535
+ export const RetrieveAgentRequestResponseBodyAgentsResponseExecuteOn = {
352
536
  Input: "input",
353
537
  Output: "output",
354
538
  } as const;
355
539
  /**
356
540
  * Determines whether the guardrail runs on the input (user message) or output (model response).
357
541
  */
358
- export type RetrieveAgentRequestAgentsResponseExecuteOn = ClosedEnum<
359
- typeof RetrieveAgentRequestAgentsResponseExecuteOn
360
- >;
542
+ export type RetrieveAgentRequestResponseBodyAgentsResponseExecuteOn =
543
+ ClosedEnum<typeof RetrieveAgentRequestResponseBodyAgentsResponseExecuteOn>;
361
544
 
362
- export type RetrieveAgentRequestAgentsGuardrails = {
545
+ export type RetrieveAgentRequestResponseBodyAgentsGuardrails = {
363
546
  id: RetrieveAgentRequestId1 | string;
364
547
  /**
365
548
  * Determines whether the guardrail runs on the input (user message) or output (model response).
366
549
  */
367
- executeOn: RetrieveAgentRequestAgentsResponseExecuteOn;
550
+ executeOn: RetrieveAgentRequestResponseBodyAgentsResponseExecuteOn;
368
551
  };
369
552
 
370
- export type RetrieveAgentRequestFallbacks = {
553
+ export type RetrieveAgentRequestResponseBodyFallbacks = {
371
554
  /**
372
555
  * Fallback model identifier
373
556
  */
374
557
  model: string;
375
558
  };
376
559
 
377
- export const RetrieveAgentRequestType = {
560
+ export const RetrieveAgentRequestResponseBodyAgentsResponseType = {
378
561
  ExactMatch: "exact_match",
379
562
  } as const;
380
- export type RetrieveAgentRequestType = ClosedEnum<
381
- typeof RetrieveAgentRequestType
563
+ export type RetrieveAgentRequestResponseBodyAgentsResponseType = ClosedEnum<
564
+ typeof RetrieveAgentRequestResponseBodyAgentsResponseType
382
565
  >;
383
566
 
384
567
  /**
385
568
  * Cache configuration for the request.
386
569
  */
387
- export type RetrieveAgentRequestCache = {
570
+ export type RetrieveAgentRequestResponseBodyCache = {
388
571
  /**
389
572
  * Time to live for cached responses in seconds. Maximum 259200 seconds (3 days).
390
573
  */
391
574
  ttl: number;
392
- type: RetrieveAgentRequestType;
575
+ type: RetrieveAgentRequestResponseBodyAgentsResponseType;
393
576
  };
394
577
 
395
578
  export const RetrieveAgentRequestLoadBalancerType = {
@@ -418,13 +601,13 @@ export type RetrieveAgentRequestLoadBalancer1 = {
418
601
  /**
419
602
  * Load balancer configuration for the request.
420
603
  */
421
- export type RetrieveAgentRequestLoadBalancer =
604
+ export type RetrieveAgentRequestResponseBodyLoadBalancer =
422
605
  RetrieveAgentRequestLoadBalancer1;
423
606
 
424
607
  /**
425
608
  * Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured.
426
609
  */
427
- export type RetrieveAgentRequestTimeout = {
610
+ export type RetrieveAgentRequestResponseBodyTimeout = {
428
611
  /**
429
612
  * Timeout value in milliseconds
430
613
  */
@@ -434,7 +617,7 @@ export type RetrieveAgentRequestTimeout = {
434
617
  /**
435
618
  * Model behavior parameters (snake_case) stored as part of the agent configuration. These become the default parameters used when the agent is executed. Commonly used: temperature (0-1, controls randomness), max_completion_tokens (response length), top_p (nucleus sampling). Advanced: frequency_penalty, presence_penalty, response_format (JSON/structured output), reasoning_effort (for o1/thinking models), seed (reproducibility), stop sequences. Model-specific support varies. Runtime parameters in agent execution requests can override these defaults.
436
619
  */
437
- export type RetrieveAgentRequestParameters = {
620
+ export type RetrieveAgentRequestResponseBodyParameters = {
438
621
  /**
439
622
  * The name to display on the trace. If not specified, the default system name will be used.
440
623
  */
@@ -479,7 +662,7 @@ export type RetrieveAgentRequestParameters = {
479
662
  *
480
663
  * Any of "none", "minimal", "low", "medium", "high", "xhigh".
481
664
  */
482
- reasoningEffort?: RetrieveAgentRequestReasoningEffort | undefined;
665
+ reasoningEffort?: RetrieveAgentRequestResponseBodyReasoningEffort | undefined;
483
666
  /**
484
667
  * Adjusts response verbosity. Lower levels yield shorter answers.
485
668
  */
@@ -522,19 +705,24 @@ export type RetrieveAgentRequestParameters = {
522
705
  /**
523
706
  * Output types that you would like the model to generate. Most models are capable of generating text, which is the default: ["text"]. The gpt-4o-audio-preview model can also be used to generate audio. To request that this model generate both text and audio responses, you can use: ["text", "audio"].
524
707
  */
525
- modalities?: Array<RetrieveAgentRequestModalities> | null | undefined;
708
+ modalities?:
709
+ | Array<RetrieveAgentRequestResponseBodyModalities>
710
+ | null
711
+ | undefined;
526
712
  /**
527
713
  * A list of guardrails to apply to the request.
528
714
  */
529
- guardrails?: Array<RetrieveAgentRequestAgentsGuardrails> | undefined;
715
+ guardrails?:
716
+ | Array<RetrieveAgentRequestResponseBodyAgentsGuardrails>
717
+ | undefined;
530
718
  /**
531
719
  * Array of fallback models to use if primary model fails
532
720
  */
533
- fallbacks?: Array<RetrieveAgentRequestFallbacks> | undefined;
721
+ fallbacks?: Array<RetrieveAgentRequestResponseBodyFallbacks> | undefined;
534
722
  /**
535
723
  * Cache configuration for the request.
536
724
  */
537
- cache?: RetrieveAgentRequestCache | undefined;
725
+ cache?: RetrieveAgentRequestResponseBodyCache | undefined;
538
726
  /**
539
727
  * Load balancer configuration for the request.
540
728
  */
@@ -542,13 +730,13 @@ export type RetrieveAgentRequestParameters = {
542
730
  /**
543
731
  * Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured.
544
732
  */
545
- timeout?: RetrieveAgentRequestTimeout | undefined;
733
+ timeout?: RetrieveAgentRequestResponseBodyTimeout | undefined;
546
734
  };
547
735
 
548
736
  /**
549
737
  * Retry configuration for model requests. Allows customizing retry count (1-5) and HTTP status codes that trigger retries. Default codes: [429]. Common codes: 500 (internal error), 429 (rate limit), 502/503/504 (gateway errors).
550
738
  */
551
- export type RetrieveAgentRequestRetry = {
739
+ export type RetrieveAgentRequestResponseBodyRetry = {
552
740
  /**
553
741
  * Number of retry attempts (1-5)
554
742
  */
@@ -977,11 +1165,11 @@ export type RetrieveAgentRequestFallbackModelConfiguration2 = {
977
1165
  /**
978
1166
  * Fallback model for automatic failover when primary model request fails. Supports optional parameter overrides. Can be a simple model ID string or a configuration object with model-specific parameters. Fallbacks are tried in order.
979
1167
  */
980
- export type RetrieveAgentRequestFallbackModelConfiguration =
1168
+ export type RetrieveAgentRequestResponseBodyFallbackModelConfiguration =
981
1169
  | RetrieveAgentRequestFallbackModelConfiguration2
982
1170
  | string;
983
1171
 
984
- export type RetrieveAgentRequestModel = {
1172
+ export type ResponseBodyModel = {
985
1173
  /**
986
1174
  * The database ID of the primary model
987
1175
  */
@@ -993,11 +1181,11 @@ export type RetrieveAgentRequestModel = {
993
1181
  /**
994
1182
  * Model behavior parameters (snake_case) stored as part of the agent configuration. These become the default parameters used when the agent is executed. Commonly used: temperature (0-1, controls randomness), max_completion_tokens (response length), top_p (nucleus sampling). Advanced: frequency_penalty, presence_penalty, response_format (JSON/structured output), reasoning_effort (for o1/thinking models), seed (reproducibility), stop sequences. Model-specific support varies. Runtime parameters in agent execution requests can override these defaults.
995
1183
  */
996
- parameters?: RetrieveAgentRequestParameters | undefined;
1184
+ parameters?: RetrieveAgentRequestResponseBodyParameters | undefined;
997
1185
  /**
998
1186
  * Retry configuration for model requests. Allows customizing retry count (1-5) and HTTP status codes that trigger retries. Default codes: [429]. Common codes: 500 (internal error), 429 (rate limit), 502/503/504 (gateway errors).
999
1187
  */
1000
- retry?: RetrieveAgentRequestRetry | undefined;
1188
+ retry?: RetrieveAgentRequestResponseBodyRetry | undefined;
1001
1189
  /**
1002
1190
  * Optional array of fallback models (string IDs or config objects) that will be used automatically in order if the primary model fails
1003
1191
  */
@@ -1007,63 +1195,22 @@ export type RetrieveAgentRequestModel = {
1007
1195
  | undefined;
1008
1196
  };
1009
1197
 
1010
- export type RetrieveAgentRequestTeamOfAgents = {
1011
- /**
1012
- * The unique key of the agent within the workspace
1013
- */
1014
- key: string;
1015
- /**
1016
- * The role of the agent in this context. This is used to give extra information to the leader to help it decide which agent to hand off to.
1017
- */
1018
- role?: string | undefined;
1019
- };
1020
-
1021
- export type RetrieveAgentRequestMetrics = {
1022
- totalCost: number;
1023
- };
1024
-
1025
- export type RetrieveAgentRequestKnowledgeBases = {
1026
- /**
1027
- * Unique identifier of the knowledge base to search
1028
- */
1029
- knowledgeId: string;
1030
- };
1031
-
1032
- export const RetrieveAgentRequestSource = {
1033
- Internal: "internal",
1034
- External: "external",
1035
- Experiment: "experiment",
1036
- } as const;
1037
- export type RetrieveAgentRequestSource = ClosedEnum<
1038
- typeof RetrieveAgentRequestSource
1039
- >;
1040
-
1041
- /**
1042
- * Agent successfully retrieved. Returns the complete agent manifest with all configuration details, including models, tools, knowledge bases, and execution settings.
1043
- */
1044
- export type RetrieveAgentRequestResponseBody = {
1198
+ export type RetrieveAgentRequestResponseBody1 = {
1045
1199
  id: string;
1046
1200
  /**
1047
1201
  * Unique identifier for the agent within the workspace
1048
1202
  */
1049
1203
  key: string;
1050
1204
  displayName?: string | undefined;
1051
- workspaceId: string;
1052
1205
  projectId: string;
1053
1206
  createdById?: string | null | undefined;
1054
1207
  updatedById?: string | null | undefined;
1055
1208
  created?: string | undefined;
1056
1209
  updated?: string | undefined;
1057
- role: string;
1058
- description: string;
1059
- systemPrompt?: string | undefined;
1060
- instructions: string;
1061
1210
  /**
1062
1211
  * The status of the agent. `Live` is the latest version of the agent. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
1063
1212
  */
1064
- status: RetrieveAgentRequestStatus;
1065
- settings?: RetrieveAgentRequestSettings | undefined;
1066
- model: RetrieveAgentRequestModel;
1213
+ status: RetrieveAgentRequestResponseBodyStatus;
1067
1214
  versionHash?: string | undefined;
1068
1215
  /**
1069
1216
  * Entity storage path in the format: `project/folder/subfolder/...`
@@ -1078,12 +1225,14 @@ export type RetrieveAgentRequestResponseBody = {
1078
1225
  /**
1079
1226
  * Array of memory store identifiers. Accepts both memory store IDs and keys.
1080
1227
  */
1081
- memoryStores: Array<string>;
1228
+ memoryStores?: Array<string> | undefined;
1082
1229
  /**
1083
1230
  * The agents that are accessible to this orchestrator. The main agent can hand off to these agents to perform tasks.
1084
1231
  */
1085
- teamOfAgents: Array<RetrieveAgentRequestTeamOfAgents>;
1086
- metrics?: RetrieveAgentRequestMetrics | undefined;
1232
+ teamOfAgents?:
1233
+ | Array<RetrieveAgentRequestResponseBodyTeamOfAgents>
1234
+ | undefined;
1235
+ metrics?: RetrieveAgentRequestResponseBodyMetrics | undefined;
1087
1236
  /**
1088
1237
  * Extracted variables from agent instructions
1089
1238
  */
@@ -1091,10 +1240,29 @@ export type RetrieveAgentRequestResponseBody = {
1091
1240
  /**
1092
1241
  * Agent knowledge bases reference
1093
1242
  */
1094
- knowledgeBases?: Array<RetrieveAgentRequestKnowledgeBases> | undefined;
1095
- source?: RetrieveAgentRequestSource | undefined;
1243
+ knowledgeBases?:
1244
+ | Array<RetrieveAgentRequestResponseBodyKnowledgeBases>
1245
+ | undefined;
1246
+ source?: RetrieveAgentRequestResponseBodySource | undefined;
1247
+ /**
1248
+ * Orquesta-managed agent
1249
+ */
1250
+ type: "internal";
1251
+ role: string;
1252
+ description: string;
1253
+ systemPrompt?: string | undefined;
1254
+ instructions: string;
1255
+ settings?: RetrieveAgentRequestResponseBodySettings | undefined;
1256
+ model: ResponseBodyModel;
1096
1257
  };
1097
1258
 
1259
+ /**
1260
+ * Agent successfully retrieved. Returns the complete agent manifest with all configuration details, including models, tools, knowledge bases, and execution settings.
1261
+ */
1262
+ export type RetrieveAgentRequestResponseBody =
1263
+ | RetrieveAgentRequestResponseBody1
1264
+ | RetrieveAgentRequestResponseBody2;
1265
+
1098
1266
  /** @internal */
1099
1267
  export type RetrieveAgentRequestRequest$Outbound = {
1100
1268
  agent_key: string;
@@ -1111,31 +1279,341 @@ export const RetrieveAgentRequestRequest$outboundSchema: z.ZodType<
1111
1279
  return remap$(v, {
1112
1280
  agentKey: "agent_key",
1113
1281
  });
1114
- });
1282
+ });
1283
+
1284
+ export function retrieveAgentRequestRequestToJSON(
1285
+ retrieveAgentRequestRequest: RetrieveAgentRequestRequest,
1286
+ ): string {
1287
+ return JSON.stringify(
1288
+ RetrieveAgentRequestRequest$outboundSchema.parse(
1289
+ retrieveAgentRequestRequest,
1290
+ ),
1291
+ );
1292
+ }
1293
+
1294
+ /** @internal */
1295
+ export const RetrieveAgentRequestResponseBodyAgentsStatus$inboundSchema:
1296
+ z.ZodNativeEnum<typeof RetrieveAgentRequestResponseBodyAgentsStatus> = z
1297
+ .nativeEnum(RetrieveAgentRequestResponseBodyAgentsStatus);
1298
+
1299
+ /** @internal */
1300
+ export const RetrieveAgentRequestResponseBodyAgentsTeamOfAgents$inboundSchema:
1301
+ z.ZodType<
1302
+ RetrieveAgentRequestResponseBodyAgentsTeamOfAgents,
1303
+ z.ZodTypeDef,
1304
+ unknown
1305
+ > = z.object({
1306
+ key: z.string(),
1307
+ role: z.string().optional(),
1308
+ });
1309
+
1310
+ export function retrieveAgentRequestResponseBodyAgentsTeamOfAgentsFromJSON(
1311
+ jsonString: string,
1312
+ ): SafeParseResult<
1313
+ RetrieveAgentRequestResponseBodyAgentsTeamOfAgents,
1314
+ SDKValidationError
1315
+ > {
1316
+ return safeParse(
1317
+ jsonString,
1318
+ (x) =>
1319
+ RetrieveAgentRequestResponseBodyAgentsTeamOfAgents$inboundSchema.parse(
1320
+ JSON.parse(x),
1321
+ ),
1322
+ `Failed to parse 'RetrieveAgentRequestResponseBodyAgentsTeamOfAgents' from JSON`,
1323
+ );
1324
+ }
1325
+
1326
+ /** @internal */
1327
+ export const RetrieveAgentRequestResponseBodyAgentsMetrics$inboundSchema:
1328
+ z.ZodType<
1329
+ RetrieveAgentRequestResponseBodyAgentsMetrics,
1330
+ z.ZodTypeDef,
1331
+ unknown
1332
+ > = z.object({
1333
+ total_cost: z.number().default(0),
1334
+ }).transform((v) => {
1335
+ return remap$(v, {
1336
+ "total_cost": "totalCost",
1337
+ });
1338
+ });
1339
+
1340
+ export function retrieveAgentRequestResponseBodyAgentsMetricsFromJSON(
1341
+ jsonString: string,
1342
+ ): SafeParseResult<
1343
+ RetrieveAgentRequestResponseBodyAgentsMetrics,
1344
+ SDKValidationError
1345
+ > {
1346
+ return safeParse(
1347
+ jsonString,
1348
+ (x) =>
1349
+ RetrieveAgentRequestResponseBodyAgentsMetrics$inboundSchema.parse(
1350
+ JSON.parse(x),
1351
+ ),
1352
+ `Failed to parse 'RetrieveAgentRequestResponseBodyAgentsMetrics' from JSON`,
1353
+ );
1354
+ }
1355
+
1356
+ /** @internal */
1357
+ export const RetrieveAgentRequestResponseBodyAgentsKnowledgeBases$inboundSchema:
1358
+ z.ZodType<
1359
+ RetrieveAgentRequestResponseBodyAgentsKnowledgeBases,
1360
+ z.ZodTypeDef,
1361
+ unknown
1362
+ > = z.object({
1363
+ knowledge_id: z.string(),
1364
+ }).transform((v) => {
1365
+ return remap$(v, {
1366
+ "knowledge_id": "knowledgeId",
1367
+ });
1368
+ });
1369
+
1370
+ export function retrieveAgentRequestResponseBodyAgentsKnowledgeBasesFromJSON(
1371
+ jsonString: string,
1372
+ ): SafeParseResult<
1373
+ RetrieveAgentRequestResponseBodyAgentsKnowledgeBases,
1374
+ SDKValidationError
1375
+ > {
1376
+ return safeParse(
1377
+ jsonString,
1378
+ (x) =>
1379
+ RetrieveAgentRequestResponseBodyAgentsKnowledgeBases$inboundSchema.parse(
1380
+ JSON.parse(x),
1381
+ ),
1382
+ `Failed to parse 'RetrieveAgentRequestResponseBodyAgentsKnowledgeBases' from JSON`,
1383
+ );
1384
+ }
1385
+
1386
+ /** @internal */
1387
+ export const RetrieveAgentRequestResponseBodyAgentsSource$inboundSchema:
1388
+ z.ZodNativeEnum<typeof RetrieveAgentRequestResponseBodyAgentsSource> = z
1389
+ .nativeEnum(RetrieveAgentRequestResponseBodyAgentsSource);
1390
+
1391
+ /** @internal */
1392
+ export const RetrieveAgentRequestResponseBodyHeaders$inboundSchema: z.ZodType<
1393
+ RetrieveAgentRequestResponseBodyHeaders,
1394
+ z.ZodTypeDef,
1395
+ unknown
1396
+ > = z.object({
1397
+ value: z.string(),
1398
+ encrypted: z.boolean().default(false),
1399
+ });
1400
+
1401
+ export function retrieveAgentRequestResponseBodyHeadersFromJSON(
1402
+ jsonString: string,
1403
+ ): SafeParseResult<
1404
+ RetrieveAgentRequestResponseBodyHeaders,
1405
+ SDKValidationError
1406
+ > {
1407
+ return safeParse(
1408
+ jsonString,
1409
+ (x) =>
1410
+ RetrieveAgentRequestResponseBodyHeaders$inboundSchema.parse(
1411
+ JSON.parse(x),
1412
+ ),
1413
+ `Failed to parse 'RetrieveAgentRequestResponseBodyHeaders' from JSON`,
1414
+ );
1415
+ }
1416
+
1417
+ /** @internal */
1418
+ export const ResponseBodyA2AAgentConfiguration$inboundSchema: z.ZodType<
1419
+ ResponseBodyA2AAgentConfiguration,
1420
+ z.ZodTypeDef,
1421
+ unknown
1422
+ > = z.object({
1423
+ agent_url: z.string(),
1424
+ card_url: z.string().optional(),
1425
+ headers: z.record(
1426
+ z.lazy(() => RetrieveAgentRequestResponseBodyHeaders$inboundSchema),
1427
+ ).optional(),
1428
+ cached_card: z.any().optional(),
1429
+ }).transform((v) => {
1430
+ return remap$(v, {
1431
+ "agent_url": "agentUrl",
1432
+ "card_url": "cardUrl",
1433
+ "cached_card": "cachedCard",
1434
+ });
1435
+ });
1436
+
1437
+ export function responseBodyA2AAgentConfigurationFromJSON(
1438
+ jsonString: string,
1439
+ ): SafeParseResult<ResponseBodyA2AAgentConfiguration, SDKValidationError> {
1440
+ return safeParse(
1441
+ jsonString,
1442
+ (x) => ResponseBodyA2AAgentConfiguration$inboundSchema.parse(JSON.parse(x)),
1443
+ `Failed to parse 'ResponseBodyA2AAgentConfiguration' from JSON`,
1444
+ );
1445
+ }
1446
+
1447
+ /** @internal */
1448
+ export const RetrieveAgentRequestResponseBody2$inboundSchema: z.ZodType<
1449
+ RetrieveAgentRequestResponseBody2,
1450
+ z.ZodTypeDef,
1451
+ unknown
1452
+ > = z.object({
1453
+ _id: z.string(),
1454
+ key: z.string(),
1455
+ display_name: z.string().optional(),
1456
+ project_id: z.string(),
1457
+ created_by_id: z.nullable(z.string()).optional(),
1458
+ updated_by_id: z.nullable(z.string()).optional(),
1459
+ created: z.string().optional(),
1460
+ updated: z.string().optional(),
1461
+ status: RetrieveAgentRequestResponseBodyAgentsStatus$inboundSchema,
1462
+ version_hash: z.string().optional(),
1463
+ path: z.string(),
1464
+ memory_stores: z.array(z.string()).optional(),
1465
+ team_of_agents: z.array(
1466
+ z.lazy(() =>
1467
+ RetrieveAgentRequestResponseBodyAgentsTeamOfAgents$inboundSchema
1468
+ ),
1469
+ ).optional(),
1470
+ metrics: z.lazy(() =>
1471
+ RetrieveAgentRequestResponseBodyAgentsMetrics$inboundSchema
1472
+ ).optional(),
1473
+ variables: z.record(z.any()).optional(),
1474
+ knowledge_bases: z.array(
1475
+ z.lazy(() =>
1476
+ RetrieveAgentRequestResponseBodyAgentsKnowledgeBases$inboundSchema
1477
+ ),
1478
+ ).optional(),
1479
+ source: RetrieveAgentRequestResponseBodyAgentsSource$inboundSchema.optional(),
1480
+ type: z.literal("a2a"),
1481
+ role: z.string(),
1482
+ description: z.string(),
1483
+ system_prompt: z.string().optional(),
1484
+ instructions: z.string(),
1485
+ a2a: z.lazy(() => ResponseBodyA2AAgentConfiguration$inboundSchema),
1486
+ }).transform((v) => {
1487
+ return remap$(v, {
1488
+ "_id": "id",
1489
+ "display_name": "displayName",
1490
+ "project_id": "projectId",
1491
+ "created_by_id": "createdById",
1492
+ "updated_by_id": "updatedById",
1493
+ "version_hash": "versionHash",
1494
+ "memory_stores": "memoryStores",
1495
+ "team_of_agents": "teamOfAgents",
1496
+ "knowledge_bases": "knowledgeBases",
1497
+ "system_prompt": "systemPrompt",
1498
+ });
1499
+ });
1500
+
1501
+ export function retrieveAgentRequestResponseBody2FromJSON(
1502
+ jsonString: string,
1503
+ ): SafeParseResult<RetrieveAgentRequestResponseBody2, SDKValidationError> {
1504
+ return safeParse(
1505
+ jsonString,
1506
+ (x) => RetrieveAgentRequestResponseBody2$inboundSchema.parse(JSON.parse(x)),
1507
+ `Failed to parse 'RetrieveAgentRequestResponseBody2' from JSON`,
1508
+ );
1509
+ }
1510
+
1511
+ /** @internal */
1512
+ export const RetrieveAgentRequestResponseBodyStatus$inboundSchema:
1513
+ z.ZodNativeEnum<typeof RetrieveAgentRequestResponseBodyStatus> = z.nativeEnum(
1514
+ RetrieveAgentRequestResponseBodyStatus,
1515
+ );
1516
+
1517
+ /** @internal */
1518
+ export const RetrieveAgentRequestResponseBodyTeamOfAgents$inboundSchema:
1519
+ z.ZodType<
1520
+ RetrieveAgentRequestResponseBodyTeamOfAgents,
1521
+ z.ZodTypeDef,
1522
+ unknown
1523
+ > = z.object({
1524
+ key: z.string(),
1525
+ role: z.string().optional(),
1526
+ });
1527
+
1528
+ export function retrieveAgentRequestResponseBodyTeamOfAgentsFromJSON(
1529
+ jsonString: string,
1530
+ ): SafeParseResult<
1531
+ RetrieveAgentRequestResponseBodyTeamOfAgents,
1532
+ SDKValidationError
1533
+ > {
1534
+ return safeParse(
1535
+ jsonString,
1536
+ (x) =>
1537
+ RetrieveAgentRequestResponseBodyTeamOfAgents$inboundSchema.parse(
1538
+ JSON.parse(x),
1539
+ ),
1540
+ `Failed to parse 'RetrieveAgentRequestResponseBodyTeamOfAgents' from JSON`,
1541
+ );
1542
+ }
1543
+
1544
+ /** @internal */
1545
+ export const RetrieveAgentRequestResponseBodyMetrics$inboundSchema: z.ZodType<
1546
+ RetrieveAgentRequestResponseBodyMetrics,
1547
+ z.ZodTypeDef,
1548
+ unknown
1549
+ > = z.object({
1550
+ total_cost: z.number().default(0),
1551
+ }).transform((v) => {
1552
+ return remap$(v, {
1553
+ "total_cost": "totalCost",
1554
+ });
1555
+ });
1556
+
1557
+ export function retrieveAgentRequestResponseBodyMetricsFromJSON(
1558
+ jsonString: string,
1559
+ ): SafeParseResult<
1560
+ RetrieveAgentRequestResponseBodyMetrics,
1561
+ SDKValidationError
1562
+ > {
1563
+ return safeParse(
1564
+ jsonString,
1565
+ (x) =>
1566
+ RetrieveAgentRequestResponseBodyMetrics$inboundSchema.parse(
1567
+ JSON.parse(x),
1568
+ ),
1569
+ `Failed to parse 'RetrieveAgentRequestResponseBodyMetrics' from JSON`,
1570
+ );
1571
+ }
1572
+
1573
+ /** @internal */
1574
+ export const RetrieveAgentRequestResponseBodyKnowledgeBases$inboundSchema:
1575
+ z.ZodType<
1576
+ RetrieveAgentRequestResponseBodyKnowledgeBases,
1577
+ z.ZodTypeDef,
1578
+ unknown
1579
+ > = z.object({
1580
+ knowledge_id: z.string(),
1581
+ }).transform((v) => {
1582
+ return remap$(v, {
1583
+ "knowledge_id": "knowledgeId",
1584
+ });
1585
+ });
1115
1586
 
1116
- export function retrieveAgentRequestRequestToJSON(
1117
- retrieveAgentRequestRequest: RetrieveAgentRequestRequest,
1118
- ): string {
1119
- return JSON.stringify(
1120
- RetrieveAgentRequestRequest$outboundSchema.parse(
1121
- retrieveAgentRequestRequest,
1122
- ),
1587
+ export function retrieveAgentRequestResponseBodyKnowledgeBasesFromJSON(
1588
+ jsonString: string,
1589
+ ): SafeParseResult<
1590
+ RetrieveAgentRequestResponseBodyKnowledgeBases,
1591
+ SDKValidationError
1592
+ > {
1593
+ return safeParse(
1594
+ jsonString,
1595
+ (x) =>
1596
+ RetrieveAgentRequestResponseBodyKnowledgeBases$inboundSchema.parse(
1597
+ JSON.parse(x),
1598
+ ),
1599
+ `Failed to parse 'RetrieveAgentRequestResponseBodyKnowledgeBases' from JSON`,
1123
1600
  );
1124
1601
  }
1125
1602
 
1126
1603
  /** @internal */
1127
- export const RetrieveAgentRequestStatus$inboundSchema: z.ZodNativeEnum<
1128
- typeof RetrieveAgentRequestStatus
1129
- > = z.nativeEnum(RetrieveAgentRequestStatus);
1604
+ export const RetrieveAgentRequestResponseBodySource$inboundSchema:
1605
+ z.ZodNativeEnum<typeof RetrieveAgentRequestResponseBodySource> = z.nativeEnum(
1606
+ RetrieveAgentRequestResponseBodySource,
1607
+ );
1130
1608
 
1131
1609
  /** @internal */
1132
- export const RetrieveAgentRequestToolApprovalRequired$inboundSchema:
1133
- z.ZodNativeEnum<typeof RetrieveAgentRequestToolApprovalRequired> = z
1134
- .nativeEnum(RetrieveAgentRequestToolApprovalRequired);
1610
+ export const RetrieveAgentRequestResponseBodyToolApprovalRequired$inboundSchema:
1611
+ z.ZodNativeEnum<typeof RetrieveAgentRequestResponseBodyToolApprovalRequired> =
1612
+ z.nativeEnum(RetrieveAgentRequestResponseBodyToolApprovalRequired);
1135
1613
 
1136
1614
  /** @internal */
1137
- export const RetrieveAgentRequestConditions$inboundSchema: z.ZodType<
1138
- RetrieveAgentRequestConditions,
1615
+ export const ResponseBodyConditions$inboundSchema: z.ZodType<
1616
+ ResponseBodyConditions,
1139
1617
  z.ZodTypeDef,
1140
1618
  unknown
1141
1619
  > = z.object({
@@ -1144,19 +1622,19 @@ export const RetrieveAgentRequestConditions$inboundSchema: z.ZodType<
1144
1622
  value: z.string(),
1145
1623
  });
1146
1624
 
1147
- export function retrieveAgentRequestConditionsFromJSON(
1625
+ export function responseBodyConditionsFromJSON(
1148
1626
  jsonString: string,
1149
- ): SafeParseResult<RetrieveAgentRequestConditions, SDKValidationError> {
1627
+ ): SafeParseResult<ResponseBodyConditions, SDKValidationError> {
1150
1628
  return safeParse(
1151
1629
  jsonString,
1152
- (x) => RetrieveAgentRequestConditions$inboundSchema.parse(JSON.parse(x)),
1153
- `Failed to parse 'RetrieveAgentRequestConditions' from JSON`,
1630
+ (x) => ResponseBodyConditions$inboundSchema.parse(JSON.parse(x)),
1631
+ `Failed to parse 'ResponseBodyConditions' from JSON`,
1154
1632
  );
1155
1633
  }
1156
1634
 
1157
1635
  /** @internal */
1158
- export const RetrieveAgentRequestTools$inboundSchema: z.ZodType<
1159
- RetrieveAgentRequestTools,
1636
+ export const RetrieveAgentRequestResponseBodyTools$inboundSchema: z.ZodType<
1637
+ RetrieveAgentRequestResponseBodyTools,
1160
1638
  z.ZodTypeDef,
1161
1639
  unknown
1162
1640
  > = z.object({
@@ -1167,9 +1645,8 @@ export const RetrieveAgentRequestTools$inboundSchema: z.ZodType<
1167
1645
  description: z.string().optional(),
1168
1646
  requires_approval: z.boolean().default(false),
1169
1647
  tool_id: z.string().optional(),
1170
- conditions: z.array(
1171
- z.lazy(() => RetrieveAgentRequestConditions$inboundSchema),
1172
- ).optional(),
1648
+ conditions: z.array(z.lazy(() => ResponseBodyConditions$inboundSchema))
1649
+ .optional(),
1173
1650
  timeout: z.number().default(120),
1174
1651
  }).transform((v) => {
1175
1652
  return remap$(v, {
@@ -1180,96 +1657,108 @@ export const RetrieveAgentRequestTools$inboundSchema: z.ZodType<
1180
1657
  });
1181
1658
  });
1182
1659
 
1183
- export function retrieveAgentRequestToolsFromJSON(
1660
+ export function retrieveAgentRequestResponseBodyToolsFromJSON(
1184
1661
  jsonString: string,
1185
- ): SafeParseResult<RetrieveAgentRequestTools, SDKValidationError> {
1662
+ ): SafeParseResult<RetrieveAgentRequestResponseBodyTools, SDKValidationError> {
1186
1663
  return safeParse(
1187
1664
  jsonString,
1188
- (x) => RetrieveAgentRequestTools$inboundSchema.parse(JSON.parse(x)),
1189
- `Failed to parse 'RetrieveAgentRequestTools' from JSON`,
1665
+ (x) =>
1666
+ RetrieveAgentRequestResponseBodyTools$inboundSchema.parse(JSON.parse(x)),
1667
+ `Failed to parse 'RetrieveAgentRequestResponseBodyTools' from JSON`,
1190
1668
  );
1191
1669
  }
1192
1670
 
1193
1671
  /** @internal */
1194
- export const RetrieveAgentRequestExecuteOn$inboundSchema: z.ZodNativeEnum<
1195
- typeof RetrieveAgentRequestExecuteOn
1196
- > = z.nativeEnum(RetrieveAgentRequestExecuteOn);
1672
+ export const RetrieveAgentRequestResponseBodyExecuteOn$inboundSchema:
1673
+ z.ZodNativeEnum<typeof RetrieveAgentRequestResponseBodyExecuteOn> = z
1674
+ .nativeEnum(RetrieveAgentRequestResponseBodyExecuteOn);
1197
1675
 
1198
1676
  /** @internal */
1199
- export const RetrieveAgentRequestEvaluators$inboundSchema: z.ZodType<
1200
- RetrieveAgentRequestEvaluators,
1201
- z.ZodTypeDef,
1202
- unknown
1203
- > = z.object({
1204
- id: z.string(),
1205
- sample_rate: z.number().default(50),
1206
- execute_on: RetrieveAgentRequestExecuteOn$inboundSchema,
1207
- }).transform((v) => {
1208
- return remap$(v, {
1209
- "sample_rate": "sampleRate",
1210
- "execute_on": "executeOn",
1211
- });
1212
- });
1677
+ export const RetrieveAgentRequestResponseBodyEvaluators$inboundSchema:
1678
+ z.ZodType<RetrieveAgentRequestResponseBodyEvaluators, z.ZodTypeDef, unknown> =
1679
+ z.object({
1680
+ id: z.string(),
1681
+ sample_rate: z.number().default(50),
1682
+ execute_on: RetrieveAgentRequestResponseBodyExecuteOn$inboundSchema,
1683
+ }).transform((v) => {
1684
+ return remap$(v, {
1685
+ "sample_rate": "sampleRate",
1686
+ "execute_on": "executeOn",
1687
+ });
1688
+ });
1213
1689
 
1214
- export function retrieveAgentRequestEvaluatorsFromJSON(
1690
+ export function retrieveAgentRequestResponseBodyEvaluatorsFromJSON(
1215
1691
  jsonString: string,
1216
- ): SafeParseResult<RetrieveAgentRequestEvaluators, SDKValidationError> {
1692
+ ): SafeParseResult<
1693
+ RetrieveAgentRequestResponseBodyEvaluators,
1694
+ SDKValidationError
1695
+ > {
1217
1696
  return safeParse(
1218
1697
  jsonString,
1219
- (x) => RetrieveAgentRequestEvaluators$inboundSchema.parse(JSON.parse(x)),
1220
- `Failed to parse 'RetrieveAgentRequestEvaluators' from JSON`,
1698
+ (x) =>
1699
+ RetrieveAgentRequestResponseBodyEvaluators$inboundSchema.parse(
1700
+ JSON.parse(x),
1701
+ ),
1702
+ `Failed to parse 'RetrieveAgentRequestResponseBodyEvaluators' from JSON`,
1221
1703
  );
1222
1704
  }
1223
1705
 
1224
1706
  /** @internal */
1225
- export const RetrieveAgentRequestAgentsExecuteOn$inboundSchema: z.ZodNativeEnum<
1226
- typeof RetrieveAgentRequestAgentsExecuteOn
1227
- > = z.nativeEnum(RetrieveAgentRequestAgentsExecuteOn);
1707
+ export const RetrieveAgentRequestResponseBodyAgentsExecuteOn$inboundSchema:
1708
+ z.ZodNativeEnum<typeof RetrieveAgentRequestResponseBodyAgentsExecuteOn> = z
1709
+ .nativeEnum(RetrieveAgentRequestResponseBodyAgentsExecuteOn);
1228
1710
 
1229
1711
  /** @internal */
1230
- export const RetrieveAgentRequestGuardrails$inboundSchema: z.ZodType<
1231
- RetrieveAgentRequestGuardrails,
1232
- z.ZodTypeDef,
1233
- unknown
1234
- > = z.object({
1235
- id: z.string(),
1236
- sample_rate: z.number().default(50),
1237
- execute_on: RetrieveAgentRequestAgentsExecuteOn$inboundSchema,
1238
- }).transform((v) => {
1239
- return remap$(v, {
1240
- "sample_rate": "sampleRate",
1241
- "execute_on": "executeOn",
1242
- });
1243
- });
1712
+ export const RetrieveAgentRequestResponseBodyGuardrails$inboundSchema:
1713
+ z.ZodType<RetrieveAgentRequestResponseBodyGuardrails, z.ZodTypeDef, unknown> =
1714
+ z.object({
1715
+ id: z.string(),
1716
+ sample_rate: z.number().default(50),
1717
+ execute_on: RetrieveAgentRequestResponseBodyAgentsExecuteOn$inboundSchema,
1718
+ }).transform((v) => {
1719
+ return remap$(v, {
1720
+ "sample_rate": "sampleRate",
1721
+ "execute_on": "executeOn",
1722
+ });
1723
+ });
1244
1724
 
1245
- export function retrieveAgentRequestGuardrailsFromJSON(
1725
+ export function retrieveAgentRequestResponseBodyGuardrailsFromJSON(
1246
1726
  jsonString: string,
1247
- ): SafeParseResult<RetrieveAgentRequestGuardrails, SDKValidationError> {
1727
+ ): SafeParseResult<
1728
+ RetrieveAgentRequestResponseBodyGuardrails,
1729
+ SDKValidationError
1730
+ > {
1248
1731
  return safeParse(
1249
1732
  jsonString,
1250
- (x) => RetrieveAgentRequestGuardrails$inboundSchema.parse(JSON.parse(x)),
1251
- `Failed to parse 'RetrieveAgentRequestGuardrails' from JSON`,
1733
+ (x) =>
1734
+ RetrieveAgentRequestResponseBodyGuardrails$inboundSchema.parse(
1735
+ JSON.parse(x),
1736
+ ),
1737
+ `Failed to parse 'RetrieveAgentRequestResponseBodyGuardrails' from JSON`,
1252
1738
  );
1253
1739
  }
1254
1740
 
1255
1741
  /** @internal */
1256
- export const RetrieveAgentRequestSettings$inboundSchema: z.ZodType<
1257
- RetrieveAgentRequestSettings,
1742
+ export const RetrieveAgentRequestResponseBodySettings$inboundSchema: z.ZodType<
1743
+ RetrieveAgentRequestResponseBodySettings,
1258
1744
  z.ZodTypeDef,
1259
1745
  unknown
1260
1746
  > = z.object({
1261
1747
  max_iterations: z.number().int().default(100),
1262
1748
  max_execution_time: z.number().int().default(600),
1263
1749
  max_cost: z.number().default(0),
1264
- tool_approval_required: RetrieveAgentRequestToolApprovalRequired$inboundSchema
1265
- .default("respect_tool"),
1266
- tools: z.array(z.lazy(() => RetrieveAgentRequestTools$inboundSchema))
1267
- .optional(),
1750
+ tool_approval_required:
1751
+ RetrieveAgentRequestResponseBodyToolApprovalRequired$inboundSchema.default(
1752
+ "respect_tool",
1753
+ ),
1754
+ tools: z.array(
1755
+ z.lazy(() => RetrieveAgentRequestResponseBodyTools$inboundSchema),
1756
+ ).optional(),
1268
1757
  evaluators: z.array(
1269
- z.lazy(() => RetrieveAgentRequestEvaluators$inboundSchema),
1758
+ z.lazy(() => RetrieveAgentRequestResponseBodyEvaluators$inboundSchema),
1270
1759
  ).optional(),
1271
1760
  guardrails: z.array(
1272
- z.lazy(() => RetrieveAgentRequestGuardrails$inboundSchema),
1761
+ z.lazy(() => RetrieveAgentRequestResponseBodyGuardrails$inboundSchema),
1273
1762
  ).optional(),
1274
1763
  }).transform((v) => {
1275
1764
  return remap$(v, {
@@ -1280,13 +1769,19 @@ export const RetrieveAgentRequestSettings$inboundSchema: z.ZodType<
1280
1769
  });
1281
1770
  });
1282
1771
 
1283
- export function retrieveAgentRequestSettingsFromJSON(
1772
+ export function retrieveAgentRequestResponseBodySettingsFromJSON(
1284
1773
  jsonString: string,
1285
- ): SafeParseResult<RetrieveAgentRequestSettings, SDKValidationError> {
1774
+ ): SafeParseResult<
1775
+ RetrieveAgentRequestResponseBodySettings,
1776
+ SDKValidationError
1777
+ > {
1286
1778
  return safeParse(
1287
1779
  jsonString,
1288
- (x) => RetrieveAgentRequestSettings$inboundSchema.parse(JSON.parse(x)),
1289
- `Failed to parse 'RetrieveAgentRequestSettings' from JSON`,
1780
+ (x) =>
1781
+ RetrieveAgentRequestResponseBodySettings$inboundSchema.parse(
1782
+ JSON.parse(x),
1783
+ ),
1784
+ `Failed to parse 'RetrieveAgentRequestResponseBodySettings' from JSON`,
1290
1785
  );
1291
1786
  }
1292
1787
 
@@ -1399,54 +1894,61 @@ export function retrieveAgentRequestResponseFormatTextFromJSON(
1399
1894
  }
1400
1895
 
1401
1896
  /** @internal */
1402
- export const RetrieveAgentRequestResponseFormat$inboundSchema: z.ZodType<
1403
- RetrieveAgentRequestResponseFormat,
1404
- z.ZodTypeDef,
1405
- unknown
1406
- > = z.union([
1407
- z.lazy(() => RetrieveAgentRequestResponseFormatText$inboundSchema),
1408
- z.lazy(() => RetrieveAgentRequestResponseFormatJSONObject$inboundSchema),
1409
- z.lazy(() =>
1410
- RetrieveAgentRequestResponseFormatAgentsJSONSchema$inboundSchema
1411
- ),
1412
- ]);
1897
+ export const RetrieveAgentRequestResponseBodyResponseFormat$inboundSchema:
1898
+ z.ZodType<
1899
+ RetrieveAgentRequestResponseBodyResponseFormat,
1900
+ z.ZodTypeDef,
1901
+ unknown
1902
+ > = z.union([
1903
+ z.lazy(() => RetrieveAgentRequestResponseFormatText$inboundSchema),
1904
+ z.lazy(() => RetrieveAgentRequestResponseFormatJSONObject$inboundSchema),
1905
+ z.lazy(() =>
1906
+ RetrieveAgentRequestResponseFormatAgentsJSONSchema$inboundSchema
1907
+ ),
1908
+ ]);
1413
1909
 
1414
- export function retrieveAgentRequestResponseFormatFromJSON(
1910
+ export function retrieveAgentRequestResponseBodyResponseFormatFromJSON(
1415
1911
  jsonString: string,
1416
- ): SafeParseResult<RetrieveAgentRequestResponseFormat, SDKValidationError> {
1912
+ ): SafeParseResult<
1913
+ RetrieveAgentRequestResponseBodyResponseFormat,
1914
+ SDKValidationError
1915
+ > {
1417
1916
  return safeParse(
1418
1917
  jsonString,
1419
1918
  (x) =>
1420
- RetrieveAgentRequestResponseFormat$inboundSchema.parse(JSON.parse(x)),
1421
- `Failed to parse 'RetrieveAgentRequestResponseFormat' from JSON`,
1919
+ RetrieveAgentRequestResponseBodyResponseFormat$inboundSchema.parse(
1920
+ JSON.parse(x),
1921
+ ),
1922
+ `Failed to parse 'RetrieveAgentRequestResponseBodyResponseFormat' from JSON`,
1422
1923
  );
1423
1924
  }
1424
1925
 
1425
1926
  /** @internal */
1426
- export const RetrieveAgentRequestReasoningEffort$inboundSchema: z.ZodNativeEnum<
1427
- typeof RetrieveAgentRequestReasoningEffort
1428
- > = z.nativeEnum(RetrieveAgentRequestReasoningEffort);
1927
+ export const RetrieveAgentRequestResponseBodyReasoningEffort$inboundSchema:
1928
+ z.ZodNativeEnum<typeof RetrieveAgentRequestResponseBodyReasoningEffort> = z
1929
+ .nativeEnum(RetrieveAgentRequestResponseBodyReasoningEffort);
1429
1930
 
1430
1931
  /** @internal */
1431
- export const RetrieveAgentRequestStop$inboundSchema: z.ZodType<
1432
- RetrieveAgentRequestStop,
1932
+ export const RetrieveAgentRequestResponseBodyStop$inboundSchema: z.ZodType<
1933
+ RetrieveAgentRequestResponseBodyStop,
1433
1934
  z.ZodTypeDef,
1434
1935
  unknown
1435
1936
  > = z.union([z.string(), z.array(z.string())]);
1436
1937
 
1437
- export function retrieveAgentRequestStopFromJSON(
1938
+ export function retrieveAgentRequestResponseBodyStopFromJSON(
1438
1939
  jsonString: string,
1439
- ): SafeParseResult<RetrieveAgentRequestStop, SDKValidationError> {
1940
+ ): SafeParseResult<RetrieveAgentRequestResponseBodyStop, SDKValidationError> {
1440
1941
  return safeParse(
1441
1942
  jsonString,
1442
- (x) => RetrieveAgentRequestStop$inboundSchema.parse(JSON.parse(x)),
1443
- `Failed to parse 'RetrieveAgentRequestStop' from JSON`,
1943
+ (x) =>
1944
+ RetrieveAgentRequestResponseBodyStop$inboundSchema.parse(JSON.parse(x)),
1945
+ `Failed to parse 'RetrieveAgentRequestResponseBodyStop' from JSON`,
1444
1946
  );
1445
1947
  }
1446
1948
 
1447
1949
  /** @internal */
1448
- export const RetrieveAgentRequestThinking$inboundSchema: z.ZodType<
1449
- RetrieveAgentRequestThinking,
1950
+ export const RetrieveAgentRequestResponseBodyThinking$inboundSchema: z.ZodType<
1951
+ RetrieveAgentRequestResponseBodyThinking,
1450
1952
  z.ZodTypeDef,
1451
1953
  unknown
1452
1954
  > = z.union([
@@ -1454,13 +1956,19 @@ export const RetrieveAgentRequestThinking$inboundSchema: z.ZodType<
1454
1956
  components.ThinkingConfigEnabledSchema$inboundSchema,
1455
1957
  ]);
1456
1958
 
1457
- export function retrieveAgentRequestThinkingFromJSON(
1959
+ export function retrieveAgentRequestResponseBodyThinkingFromJSON(
1458
1960
  jsonString: string,
1459
- ): SafeParseResult<RetrieveAgentRequestThinking, SDKValidationError> {
1961
+ ): SafeParseResult<
1962
+ RetrieveAgentRequestResponseBodyThinking,
1963
+ SDKValidationError
1964
+ > {
1460
1965
  return safeParse(
1461
1966
  jsonString,
1462
- (x) => RetrieveAgentRequestThinking$inboundSchema.parse(JSON.parse(x)),
1463
- `Failed to parse 'RetrieveAgentRequestThinking' from JSON`,
1967
+ (x) =>
1968
+ RetrieveAgentRequestResponseBodyThinking$inboundSchema.parse(
1969
+ JSON.parse(x),
1970
+ ),
1971
+ `Failed to parse 'RetrieveAgentRequestResponseBodyThinking' from JSON`,
1464
1972
  );
1465
1973
  }
1466
1974
 
@@ -1515,29 +2023,33 @@ export const RetrieveAgentRequestToolChoice1$inboundSchema: z.ZodNativeEnum<
1515
2023
  > = z.nativeEnum(RetrieveAgentRequestToolChoice1);
1516
2024
 
1517
2025
  /** @internal */
1518
- export const RetrieveAgentRequestToolChoice$inboundSchema: z.ZodType<
1519
- RetrieveAgentRequestToolChoice,
1520
- z.ZodTypeDef,
1521
- unknown
1522
- > = z.union([
1523
- z.lazy(() => RetrieveAgentRequestToolChoice2$inboundSchema),
1524
- RetrieveAgentRequestToolChoice1$inboundSchema,
1525
- ]);
2026
+ export const RetrieveAgentRequestResponseBodyToolChoice$inboundSchema:
2027
+ z.ZodType<RetrieveAgentRequestResponseBodyToolChoice, z.ZodTypeDef, unknown> =
2028
+ z.union([
2029
+ z.lazy(() => RetrieveAgentRequestToolChoice2$inboundSchema),
2030
+ RetrieveAgentRequestToolChoice1$inboundSchema,
2031
+ ]);
1526
2032
 
1527
- export function retrieveAgentRequestToolChoiceFromJSON(
2033
+ export function retrieveAgentRequestResponseBodyToolChoiceFromJSON(
1528
2034
  jsonString: string,
1529
- ): SafeParseResult<RetrieveAgentRequestToolChoice, SDKValidationError> {
2035
+ ): SafeParseResult<
2036
+ RetrieveAgentRequestResponseBodyToolChoice,
2037
+ SDKValidationError
2038
+ > {
1530
2039
  return safeParse(
1531
2040
  jsonString,
1532
- (x) => RetrieveAgentRequestToolChoice$inboundSchema.parse(JSON.parse(x)),
1533
- `Failed to parse 'RetrieveAgentRequestToolChoice' from JSON`,
2041
+ (x) =>
2042
+ RetrieveAgentRequestResponseBodyToolChoice$inboundSchema.parse(
2043
+ JSON.parse(x),
2044
+ ),
2045
+ `Failed to parse 'RetrieveAgentRequestResponseBodyToolChoice' from JSON`,
1534
2046
  );
1535
2047
  }
1536
2048
 
1537
2049
  /** @internal */
1538
- export const RetrieveAgentRequestModalities$inboundSchema: z.ZodNativeEnum<
1539
- typeof RetrieveAgentRequestModalities
1540
- > = z.nativeEnum(RetrieveAgentRequestModalities);
2050
+ export const RetrieveAgentRequestResponseBodyModalities$inboundSchema:
2051
+ z.ZodNativeEnum<typeof RetrieveAgentRequestResponseBodyModalities> = z
2052
+ .nativeEnum(RetrieveAgentRequestResponseBodyModalities);
1541
2053
 
1542
2054
  /** @internal */
1543
2055
  export const RetrieveAgentRequestId1$inboundSchema: z.ZodNativeEnum<
@@ -1545,93 +2057,109 @@ export const RetrieveAgentRequestId1$inboundSchema: z.ZodNativeEnum<
1545
2057
  > = z.nativeEnum(RetrieveAgentRequestId1);
1546
2058
 
1547
2059
  /** @internal */
1548
- export const RetrieveAgentRequestId$inboundSchema: z.ZodType<
1549
- RetrieveAgentRequestId,
2060
+ export const RetrieveAgentRequestResponseBodyId$inboundSchema: z.ZodType<
2061
+ RetrieveAgentRequestResponseBodyId,
1550
2062
  z.ZodTypeDef,
1551
2063
  unknown
1552
2064
  > = z.union([RetrieveAgentRequestId1$inboundSchema, z.string()]);
1553
2065
 
1554
- export function retrieveAgentRequestIdFromJSON(
2066
+ export function retrieveAgentRequestResponseBodyIdFromJSON(
1555
2067
  jsonString: string,
1556
- ): SafeParseResult<RetrieveAgentRequestId, SDKValidationError> {
2068
+ ): SafeParseResult<RetrieveAgentRequestResponseBodyId, SDKValidationError> {
1557
2069
  return safeParse(
1558
2070
  jsonString,
1559
- (x) => RetrieveAgentRequestId$inboundSchema.parse(JSON.parse(x)),
1560
- `Failed to parse 'RetrieveAgentRequestId' from JSON`,
2071
+ (x) =>
2072
+ RetrieveAgentRequestResponseBodyId$inboundSchema.parse(JSON.parse(x)),
2073
+ `Failed to parse 'RetrieveAgentRequestResponseBodyId' from JSON`,
1561
2074
  );
1562
2075
  }
1563
2076
 
1564
2077
  /** @internal */
1565
- export const RetrieveAgentRequestAgentsResponseExecuteOn$inboundSchema:
1566
- z.ZodNativeEnum<typeof RetrieveAgentRequestAgentsResponseExecuteOn> = z
1567
- .nativeEnum(RetrieveAgentRequestAgentsResponseExecuteOn);
2078
+ export const RetrieveAgentRequestResponseBodyAgentsResponseExecuteOn$inboundSchema:
2079
+ z.ZodNativeEnum<
2080
+ typeof RetrieveAgentRequestResponseBodyAgentsResponseExecuteOn
2081
+ > = z.nativeEnum(RetrieveAgentRequestResponseBodyAgentsResponseExecuteOn);
1568
2082
 
1569
2083
  /** @internal */
1570
- export const RetrieveAgentRequestAgentsGuardrails$inboundSchema: z.ZodType<
1571
- RetrieveAgentRequestAgentsGuardrails,
1572
- z.ZodTypeDef,
1573
- unknown
1574
- > = z.object({
1575
- id: z.union([RetrieveAgentRequestId1$inboundSchema, z.string()]),
1576
- execute_on: RetrieveAgentRequestAgentsResponseExecuteOn$inboundSchema,
1577
- }).transform((v) => {
1578
- return remap$(v, {
1579
- "execute_on": "executeOn",
2084
+ export const RetrieveAgentRequestResponseBodyAgentsGuardrails$inboundSchema:
2085
+ z.ZodType<
2086
+ RetrieveAgentRequestResponseBodyAgentsGuardrails,
2087
+ z.ZodTypeDef,
2088
+ unknown
2089
+ > = z.object({
2090
+ id: z.union([RetrieveAgentRequestId1$inboundSchema, z.string()]),
2091
+ execute_on:
2092
+ RetrieveAgentRequestResponseBodyAgentsResponseExecuteOn$inboundSchema,
2093
+ }).transform((v) => {
2094
+ return remap$(v, {
2095
+ "execute_on": "executeOn",
2096
+ });
1580
2097
  });
1581
- });
1582
2098
 
1583
- export function retrieveAgentRequestAgentsGuardrailsFromJSON(
2099
+ export function retrieveAgentRequestResponseBodyAgentsGuardrailsFromJSON(
1584
2100
  jsonString: string,
1585
- ): SafeParseResult<RetrieveAgentRequestAgentsGuardrails, SDKValidationError> {
2101
+ ): SafeParseResult<
2102
+ RetrieveAgentRequestResponseBodyAgentsGuardrails,
2103
+ SDKValidationError
2104
+ > {
1586
2105
  return safeParse(
1587
2106
  jsonString,
1588
2107
  (x) =>
1589
- RetrieveAgentRequestAgentsGuardrails$inboundSchema.parse(JSON.parse(x)),
1590
- `Failed to parse 'RetrieveAgentRequestAgentsGuardrails' from JSON`,
2108
+ RetrieveAgentRequestResponseBodyAgentsGuardrails$inboundSchema.parse(
2109
+ JSON.parse(x),
2110
+ ),
2111
+ `Failed to parse 'RetrieveAgentRequestResponseBodyAgentsGuardrails' from JSON`,
1591
2112
  );
1592
2113
  }
1593
2114
 
1594
2115
  /** @internal */
1595
- export const RetrieveAgentRequestFallbacks$inboundSchema: z.ZodType<
1596
- RetrieveAgentRequestFallbacks,
2116
+ export const RetrieveAgentRequestResponseBodyFallbacks$inboundSchema: z.ZodType<
2117
+ RetrieveAgentRequestResponseBodyFallbacks,
1597
2118
  z.ZodTypeDef,
1598
2119
  unknown
1599
2120
  > = z.object({
1600
2121
  model: z.string(),
1601
2122
  });
1602
2123
 
1603
- export function retrieveAgentRequestFallbacksFromJSON(
2124
+ export function retrieveAgentRequestResponseBodyFallbacksFromJSON(
1604
2125
  jsonString: string,
1605
- ): SafeParseResult<RetrieveAgentRequestFallbacks, SDKValidationError> {
2126
+ ): SafeParseResult<
2127
+ RetrieveAgentRequestResponseBodyFallbacks,
2128
+ SDKValidationError
2129
+ > {
1606
2130
  return safeParse(
1607
2131
  jsonString,
1608
- (x) => RetrieveAgentRequestFallbacks$inboundSchema.parse(JSON.parse(x)),
1609
- `Failed to parse 'RetrieveAgentRequestFallbacks' from JSON`,
2132
+ (x) =>
2133
+ RetrieveAgentRequestResponseBodyFallbacks$inboundSchema.parse(
2134
+ JSON.parse(x),
2135
+ ),
2136
+ `Failed to parse 'RetrieveAgentRequestResponseBodyFallbacks' from JSON`,
1610
2137
  );
1611
2138
  }
1612
2139
 
1613
2140
  /** @internal */
1614
- export const RetrieveAgentRequestType$inboundSchema: z.ZodNativeEnum<
1615
- typeof RetrieveAgentRequestType
1616
- > = z.nativeEnum(RetrieveAgentRequestType);
2141
+ export const RetrieveAgentRequestResponseBodyAgentsResponseType$inboundSchema:
2142
+ z.ZodNativeEnum<typeof RetrieveAgentRequestResponseBodyAgentsResponseType> = z
2143
+ .nativeEnum(RetrieveAgentRequestResponseBodyAgentsResponseType);
1617
2144
 
1618
2145
  /** @internal */
1619
- export const RetrieveAgentRequestCache$inboundSchema: z.ZodType<
1620
- RetrieveAgentRequestCache,
2146
+ export const RetrieveAgentRequestResponseBodyCache$inboundSchema: z.ZodType<
2147
+ RetrieveAgentRequestResponseBodyCache,
1621
2148
  z.ZodTypeDef,
1622
2149
  unknown
1623
2150
  > = z.object({
1624
2151
  ttl: z.number().default(1800),
1625
- type: RetrieveAgentRequestType$inboundSchema,
2152
+ type: RetrieveAgentRequestResponseBodyAgentsResponseType$inboundSchema,
1626
2153
  });
1627
2154
 
1628
- export function retrieveAgentRequestCacheFromJSON(
2155
+ export function retrieveAgentRequestResponseBodyCacheFromJSON(
1629
2156
  jsonString: string,
1630
- ): SafeParseResult<RetrieveAgentRequestCache, SDKValidationError> {
2157
+ ): SafeParseResult<RetrieveAgentRequestResponseBodyCache, SDKValidationError> {
1631
2158
  return safeParse(
1632
2159
  jsonString,
1633
- (x) => RetrieveAgentRequestCache$inboundSchema.parse(JSON.parse(x)),
1634
- `Failed to parse 'RetrieveAgentRequestCache' from JSON`,
2160
+ (x) =>
2161
+ RetrieveAgentRequestResponseBodyCache$inboundSchema.parse(JSON.parse(x)),
2162
+ `Failed to parse 'RetrieveAgentRequestResponseBodyCache' from JSON`,
1635
2163
  );
1636
2164
  }
1637
2165
 
@@ -1685,25 +2213,32 @@ export function retrieveAgentRequestLoadBalancer1FromJSON(
1685
2213
  }
1686
2214
 
1687
2215
  /** @internal */
1688
- export const RetrieveAgentRequestLoadBalancer$inboundSchema: z.ZodType<
1689
- RetrieveAgentRequestLoadBalancer,
1690
- z.ZodTypeDef,
1691
- unknown
1692
- > = z.lazy(() => RetrieveAgentRequestLoadBalancer1$inboundSchema);
2216
+ export const RetrieveAgentRequestResponseBodyLoadBalancer$inboundSchema:
2217
+ z.ZodType<
2218
+ RetrieveAgentRequestResponseBodyLoadBalancer,
2219
+ z.ZodTypeDef,
2220
+ unknown
2221
+ > = z.lazy(() => RetrieveAgentRequestLoadBalancer1$inboundSchema);
1693
2222
 
1694
- export function retrieveAgentRequestLoadBalancerFromJSON(
2223
+ export function retrieveAgentRequestResponseBodyLoadBalancerFromJSON(
1695
2224
  jsonString: string,
1696
- ): SafeParseResult<RetrieveAgentRequestLoadBalancer, SDKValidationError> {
2225
+ ): SafeParseResult<
2226
+ RetrieveAgentRequestResponseBodyLoadBalancer,
2227
+ SDKValidationError
2228
+ > {
1697
2229
  return safeParse(
1698
2230
  jsonString,
1699
- (x) => RetrieveAgentRequestLoadBalancer$inboundSchema.parse(JSON.parse(x)),
1700
- `Failed to parse 'RetrieveAgentRequestLoadBalancer' from JSON`,
2231
+ (x) =>
2232
+ RetrieveAgentRequestResponseBodyLoadBalancer$inboundSchema.parse(
2233
+ JSON.parse(x),
2234
+ ),
2235
+ `Failed to parse 'RetrieveAgentRequestResponseBodyLoadBalancer' from JSON`,
1701
2236
  );
1702
2237
  }
1703
2238
 
1704
2239
  /** @internal */
1705
- export const RetrieveAgentRequestTimeout$inboundSchema: z.ZodType<
1706
- RetrieveAgentRequestTimeout,
2240
+ export const RetrieveAgentRequestResponseBodyTimeout$inboundSchema: z.ZodType<
2241
+ RetrieveAgentRequestResponseBodyTimeout,
1707
2242
  z.ZodTypeDef,
1708
2243
  unknown
1709
2244
  > = z.object({
@@ -1714,91 +2249,112 @@ export const RetrieveAgentRequestTimeout$inboundSchema: z.ZodType<
1714
2249
  });
1715
2250
  });
1716
2251
 
1717
- export function retrieveAgentRequestTimeoutFromJSON(
2252
+ export function retrieveAgentRequestResponseBodyTimeoutFromJSON(
1718
2253
  jsonString: string,
1719
- ): SafeParseResult<RetrieveAgentRequestTimeout, SDKValidationError> {
2254
+ ): SafeParseResult<
2255
+ RetrieveAgentRequestResponseBodyTimeout,
2256
+ SDKValidationError
2257
+ > {
1720
2258
  return safeParse(
1721
2259
  jsonString,
1722
- (x) => RetrieveAgentRequestTimeout$inboundSchema.parse(JSON.parse(x)),
1723
- `Failed to parse 'RetrieveAgentRequestTimeout' from JSON`,
2260
+ (x) =>
2261
+ RetrieveAgentRequestResponseBodyTimeout$inboundSchema.parse(
2262
+ JSON.parse(x),
2263
+ ),
2264
+ `Failed to parse 'RetrieveAgentRequestResponseBodyTimeout' from JSON`,
1724
2265
  );
1725
2266
  }
1726
2267
 
1727
2268
  /** @internal */
1728
- export const RetrieveAgentRequestParameters$inboundSchema: z.ZodType<
1729
- RetrieveAgentRequestParameters,
1730
- z.ZodTypeDef,
1731
- unknown
1732
- > = z.object({
1733
- name: z.string().optional(),
1734
- frequency_penalty: z.nullable(z.number()).optional(),
1735
- max_tokens: z.nullable(z.number().int()).optional(),
1736
- max_completion_tokens: z.nullable(z.number().int()).optional(),
1737
- presence_penalty: z.nullable(z.number()).optional(),
1738
- response_format: z.union([
1739
- z.lazy(() => RetrieveAgentRequestResponseFormatText$inboundSchema),
1740
- z.lazy(() => RetrieveAgentRequestResponseFormatJSONObject$inboundSchema),
1741
- z.lazy(() =>
1742
- RetrieveAgentRequestResponseFormatAgentsJSONSchema$inboundSchema
1743
- ),
1744
- ]).optional(),
1745
- reasoning_effort: RetrieveAgentRequestReasoningEffort$inboundSchema
1746
- .optional(),
1747
- verbosity: z.string().optional(),
1748
- seed: z.nullable(z.number()).optional(),
1749
- stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
1750
- thinking: z.union([
1751
- components.ThinkingConfigDisabledSchema$inboundSchema,
1752
- components.ThinkingConfigEnabledSchema$inboundSchema,
1753
- ]).optional(),
1754
- temperature: z.nullable(z.number()).optional(),
1755
- top_p: z.nullable(z.number()).optional(),
1756
- top_k: z.nullable(z.number()).optional(),
1757
- tool_choice: z.union([
1758
- z.lazy(() => RetrieveAgentRequestToolChoice2$inboundSchema),
1759
- RetrieveAgentRequestToolChoice1$inboundSchema,
1760
- ]).optional(),
1761
- parallel_tool_calls: z.boolean().optional(),
1762
- modalities: z.nullable(z.array(RetrieveAgentRequestModalities$inboundSchema))
1763
- .optional(),
1764
- guardrails: z.array(
1765
- z.lazy(() => RetrieveAgentRequestAgentsGuardrails$inboundSchema),
1766
- ).optional(),
1767
- fallbacks: z.array(z.lazy(() => RetrieveAgentRequestFallbacks$inboundSchema))
1768
- .optional(),
1769
- cache: z.lazy(() => RetrieveAgentRequestCache$inboundSchema).optional(),
1770
- load_balancer: z.lazy(() => RetrieveAgentRequestLoadBalancer1$inboundSchema)
1771
- .optional(),
1772
- timeout: z.lazy(() => RetrieveAgentRequestTimeout$inboundSchema).optional(),
1773
- }).transform((v) => {
1774
- return remap$(v, {
1775
- "frequency_penalty": "frequencyPenalty",
1776
- "max_tokens": "maxTokens",
1777
- "max_completion_tokens": "maxCompletionTokens",
1778
- "presence_penalty": "presencePenalty",
1779
- "response_format": "responseFormat",
1780
- "reasoning_effort": "reasoningEffort",
1781
- "top_p": "topP",
1782
- "top_k": "topK",
1783
- "tool_choice": "toolChoice",
1784
- "parallel_tool_calls": "parallelToolCalls",
1785
- "load_balancer": "loadBalancer",
1786
- });
1787
- });
2269
+ export const RetrieveAgentRequestResponseBodyParameters$inboundSchema:
2270
+ z.ZodType<RetrieveAgentRequestResponseBodyParameters, z.ZodTypeDef, unknown> =
2271
+ z.object({
2272
+ name: z.string().optional(),
2273
+ frequency_penalty: z.nullable(z.number()).optional(),
2274
+ max_tokens: z.nullable(z.number().int()).optional(),
2275
+ max_completion_tokens: z.nullable(z.number().int()).optional(),
2276
+ presence_penalty: z.nullable(z.number()).optional(),
2277
+ response_format: z.union([
2278
+ z.lazy(() => RetrieveAgentRequestResponseFormatText$inboundSchema),
2279
+ z.lazy(() =>
2280
+ RetrieveAgentRequestResponseFormatJSONObject$inboundSchema
2281
+ ),
2282
+ z.lazy(() =>
2283
+ RetrieveAgentRequestResponseFormatAgentsJSONSchema$inboundSchema
2284
+ ),
2285
+ ]).optional(),
2286
+ reasoning_effort:
2287
+ RetrieveAgentRequestResponseBodyReasoningEffort$inboundSchema
2288
+ .optional(),
2289
+ verbosity: z.string().optional(),
2290
+ seed: z.nullable(z.number()).optional(),
2291
+ stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
2292
+ thinking: z.union([
2293
+ components.ThinkingConfigDisabledSchema$inboundSchema,
2294
+ components.ThinkingConfigEnabledSchema$inboundSchema,
2295
+ ]).optional(),
2296
+ temperature: z.nullable(z.number()).optional(),
2297
+ top_p: z.nullable(z.number()).optional(),
2298
+ top_k: z.nullable(z.number()).optional(),
2299
+ tool_choice: z.union([
2300
+ z.lazy(() => RetrieveAgentRequestToolChoice2$inboundSchema),
2301
+ RetrieveAgentRequestToolChoice1$inboundSchema,
2302
+ ]).optional(),
2303
+ parallel_tool_calls: z.boolean().optional(),
2304
+ modalities: z.nullable(
2305
+ z.array(RetrieveAgentRequestResponseBodyModalities$inboundSchema),
2306
+ ).optional(),
2307
+ guardrails: z.array(
2308
+ z.lazy(() =>
2309
+ RetrieveAgentRequestResponseBodyAgentsGuardrails$inboundSchema
2310
+ ),
2311
+ ).optional(),
2312
+ fallbacks: z.array(
2313
+ z.lazy(() => RetrieveAgentRequestResponseBodyFallbacks$inboundSchema),
2314
+ ).optional(),
2315
+ cache: z.lazy(() => RetrieveAgentRequestResponseBodyCache$inboundSchema)
2316
+ .optional(),
2317
+ load_balancer: z.lazy(() =>
2318
+ RetrieveAgentRequestLoadBalancer1$inboundSchema
2319
+ ).optional(),
2320
+ timeout: z.lazy(() =>
2321
+ RetrieveAgentRequestResponseBodyTimeout$inboundSchema
2322
+ ).optional(),
2323
+ }).transform((v) => {
2324
+ return remap$(v, {
2325
+ "frequency_penalty": "frequencyPenalty",
2326
+ "max_tokens": "maxTokens",
2327
+ "max_completion_tokens": "maxCompletionTokens",
2328
+ "presence_penalty": "presencePenalty",
2329
+ "response_format": "responseFormat",
2330
+ "reasoning_effort": "reasoningEffort",
2331
+ "top_p": "topP",
2332
+ "top_k": "topK",
2333
+ "tool_choice": "toolChoice",
2334
+ "parallel_tool_calls": "parallelToolCalls",
2335
+ "load_balancer": "loadBalancer",
2336
+ });
2337
+ });
1788
2338
 
1789
- export function retrieveAgentRequestParametersFromJSON(
2339
+ export function retrieveAgentRequestResponseBodyParametersFromJSON(
1790
2340
  jsonString: string,
1791
- ): SafeParseResult<RetrieveAgentRequestParameters, SDKValidationError> {
2341
+ ): SafeParseResult<
2342
+ RetrieveAgentRequestResponseBodyParameters,
2343
+ SDKValidationError
2344
+ > {
1792
2345
  return safeParse(
1793
2346
  jsonString,
1794
- (x) => RetrieveAgentRequestParameters$inboundSchema.parse(JSON.parse(x)),
1795
- `Failed to parse 'RetrieveAgentRequestParameters' from JSON`,
2347
+ (x) =>
2348
+ RetrieveAgentRequestResponseBodyParameters$inboundSchema.parse(
2349
+ JSON.parse(x),
2350
+ ),
2351
+ `Failed to parse 'RetrieveAgentRequestResponseBodyParameters' from JSON`,
1796
2352
  );
1797
2353
  }
1798
2354
 
1799
2355
  /** @internal */
1800
- export const RetrieveAgentRequestRetry$inboundSchema: z.ZodType<
1801
- RetrieveAgentRequestRetry,
2356
+ export const RetrieveAgentRequestResponseBodyRetry$inboundSchema: z.ZodType<
2357
+ RetrieveAgentRequestResponseBodyRetry,
1802
2358
  z.ZodTypeDef,
1803
2359
  unknown
1804
2360
  > = z.object({
@@ -1810,13 +2366,14 @@ export const RetrieveAgentRequestRetry$inboundSchema: z.ZodType<
1810
2366
  });
1811
2367
  });
1812
2368
 
1813
- export function retrieveAgentRequestRetryFromJSON(
2369
+ export function retrieveAgentRequestResponseBodyRetryFromJSON(
1814
2370
  jsonString: string,
1815
- ): SafeParseResult<RetrieveAgentRequestRetry, SDKValidationError> {
2371
+ ): SafeParseResult<RetrieveAgentRequestResponseBodyRetry, SDKValidationError> {
1816
2372
  return safeParse(
1817
2373
  jsonString,
1818
- (x) => RetrieveAgentRequestRetry$inboundSchema.parse(JSON.parse(x)),
1819
- `Failed to parse 'RetrieveAgentRequestRetry' from JSON`,
2374
+ (x) =>
2375
+ RetrieveAgentRequestResponseBodyRetry$inboundSchema.parse(JSON.parse(x)),
2376
+ `Failed to parse 'RetrieveAgentRequestResponseBodyRetry' from JSON`,
1820
2377
  );
1821
2378
  }
1822
2379
 
@@ -2507,9 +3064,9 @@ export function retrieveAgentRequestFallbackModelConfiguration2FromJSON(
2507
3064
  }
2508
3065
 
2509
3066
  /** @internal */
2510
- export const RetrieveAgentRequestFallbackModelConfiguration$inboundSchema:
3067
+ export const RetrieveAgentRequestResponseBodyFallbackModelConfiguration$inboundSchema:
2511
3068
  z.ZodType<
2512
- RetrieveAgentRequestFallbackModelConfiguration,
3069
+ RetrieveAgentRequestResponseBodyFallbackModelConfiguration,
2513
3070
  z.ZodTypeDef,
2514
3071
  unknown
2515
3072
  > = z.union([
@@ -2517,33 +3074,34 @@ export const RetrieveAgentRequestFallbackModelConfiguration$inboundSchema:
2517
3074
  z.string(),
2518
3075
  ]);
2519
3076
 
2520
- export function retrieveAgentRequestFallbackModelConfigurationFromJSON(
3077
+ export function retrieveAgentRequestResponseBodyFallbackModelConfigurationFromJSON(
2521
3078
  jsonString: string,
2522
3079
  ): SafeParseResult<
2523
- RetrieveAgentRequestFallbackModelConfiguration,
3080
+ RetrieveAgentRequestResponseBodyFallbackModelConfiguration,
2524
3081
  SDKValidationError
2525
3082
  > {
2526
3083
  return safeParse(
2527
3084
  jsonString,
2528
3085
  (x) =>
2529
- RetrieveAgentRequestFallbackModelConfiguration$inboundSchema.parse(
2530
- JSON.parse(x),
2531
- ),
2532
- `Failed to parse 'RetrieveAgentRequestFallbackModelConfiguration' from JSON`,
3086
+ RetrieveAgentRequestResponseBodyFallbackModelConfiguration$inboundSchema
3087
+ .parse(JSON.parse(x)),
3088
+ `Failed to parse 'RetrieveAgentRequestResponseBodyFallbackModelConfiguration' from JSON`,
2533
3089
  );
2534
3090
  }
2535
3091
 
2536
3092
  /** @internal */
2537
- export const RetrieveAgentRequestModel$inboundSchema: z.ZodType<
2538
- RetrieveAgentRequestModel,
3093
+ export const ResponseBodyModel$inboundSchema: z.ZodType<
3094
+ ResponseBodyModel,
2539
3095
  z.ZodTypeDef,
2540
3096
  unknown
2541
3097
  > = z.object({
2542
3098
  id: z.string(),
2543
3099
  integration_id: z.nullable(z.string()).optional(),
2544
- parameters: z.lazy(() => RetrieveAgentRequestParameters$inboundSchema)
3100
+ parameters: z.lazy(() =>
3101
+ RetrieveAgentRequestResponseBodyParameters$inboundSchema
3102
+ ).optional(),
3103
+ retry: z.lazy(() => RetrieveAgentRequestResponseBodyRetry$inboundSchema)
2545
3104
  .optional(),
2546
- retry: z.lazy(() => RetrieveAgentRequestRetry$inboundSchema).optional(),
2547
3105
  fallback_models: z.nullable(
2548
3106
  z.array(z.union([
2549
3107
  z.lazy(() =>
@@ -2559,138 +3117,87 @@ export const RetrieveAgentRequestModel$inboundSchema: z.ZodType<
2559
3117
  });
2560
3118
  });
2561
3119
 
2562
- export function retrieveAgentRequestModelFromJSON(
2563
- jsonString: string,
2564
- ): SafeParseResult<RetrieveAgentRequestModel, SDKValidationError> {
2565
- return safeParse(
2566
- jsonString,
2567
- (x) => RetrieveAgentRequestModel$inboundSchema.parse(JSON.parse(x)),
2568
- `Failed to parse 'RetrieveAgentRequestModel' from JSON`,
2569
- );
2570
- }
2571
-
2572
- /** @internal */
2573
- export const RetrieveAgentRequestTeamOfAgents$inboundSchema: z.ZodType<
2574
- RetrieveAgentRequestTeamOfAgents,
2575
- z.ZodTypeDef,
2576
- unknown
2577
- > = z.object({
2578
- key: z.string(),
2579
- role: z.string().optional(),
2580
- });
2581
-
2582
- export function retrieveAgentRequestTeamOfAgentsFromJSON(
2583
- jsonString: string,
2584
- ): SafeParseResult<RetrieveAgentRequestTeamOfAgents, SDKValidationError> {
2585
- return safeParse(
2586
- jsonString,
2587
- (x) => RetrieveAgentRequestTeamOfAgents$inboundSchema.parse(JSON.parse(x)),
2588
- `Failed to parse 'RetrieveAgentRequestTeamOfAgents' from JSON`,
2589
- );
2590
- }
2591
-
2592
- /** @internal */
2593
- export const RetrieveAgentRequestMetrics$inboundSchema: z.ZodType<
2594
- RetrieveAgentRequestMetrics,
2595
- z.ZodTypeDef,
2596
- unknown
2597
- > = z.object({
2598
- total_cost: z.number().default(0),
2599
- }).transform((v) => {
2600
- return remap$(v, {
2601
- "total_cost": "totalCost",
2602
- });
2603
- });
2604
-
2605
- export function retrieveAgentRequestMetricsFromJSON(
3120
+ export function responseBodyModelFromJSON(
2606
3121
  jsonString: string,
2607
- ): SafeParseResult<RetrieveAgentRequestMetrics, SDKValidationError> {
3122
+ ): SafeParseResult<ResponseBodyModel, SDKValidationError> {
2608
3123
  return safeParse(
2609
3124
  jsonString,
2610
- (x) => RetrieveAgentRequestMetrics$inboundSchema.parse(JSON.parse(x)),
2611
- `Failed to parse 'RetrieveAgentRequestMetrics' from JSON`,
2612
- );
2613
- }
2614
-
2615
- /** @internal */
2616
- export const RetrieveAgentRequestKnowledgeBases$inboundSchema: z.ZodType<
2617
- RetrieveAgentRequestKnowledgeBases,
2618
- z.ZodTypeDef,
2619
- unknown
2620
- > = z.object({
2621
- knowledge_id: z.string(),
2622
- }).transform((v) => {
2623
- return remap$(v, {
2624
- "knowledge_id": "knowledgeId",
2625
- });
2626
- });
2627
-
2628
- export function retrieveAgentRequestKnowledgeBasesFromJSON(
2629
- jsonString: string,
2630
- ): SafeParseResult<RetrieveAgentRequestKnowledgeBases, SDKValidationError> {
2631
- return safeParse(
2632
- jsonString,
2633
- (x) =>
2634
- RetrieveAgentRequestKnowledgeBases$inboundSchema.parse(JSON.parse(x)),
2635
- `Failed to parse 'RetrieveAgentRequestKnowledgeBases' from JSON`,
3125
+ (x) => ResponseBodyModel$inboundSchema.parse(JSON.parse(x)),
3126
+ `Failed to parse 'ResponseBodyModel' from JSON`,
2636
3127
  );
2637
3128
  }
2638
3129
 
2639
3130
  /** @internal */
2640
- export const RetrieveAgentRequestSource$inboundSchema: z.ZodNativeEnum<
2641
- typeof RetrieveAgentRequestSource
2642
- > = z.nativeEnum(RetrieveAgentRequestSource);
2643
-
2644
- /** @internal */
2645
- export const RetrieveAgentRequestResponseBody$inboundSchema: z.ZodType<
2646
- RetrieveAgentRequestResponseBody,
3131
+ export const RetrieveAgentRequestResponseBody1$inboundSchema: z.ZodType<
3132
+ RetrieveAgentRequestResponseBody1,
2647
3133
  z.ZodTypeDef,
2648
3134
  unknown
2649
3135
  > = z.object({
2650
3136
  _id: z.string(),
2651
3137
  key: z.string(),
2652
3138
  display_name: z.string().optional(),
2653
- workspace_id: z.string(),
2654
3139
  project_id: z.string(),
2655
3140
  created_by_id: z.nullable(z.string()).optional(),
2656
3141
  updated_by_id: z.nullable(z.string()).optional(),
2657
3142
  created: z.string().optional(),
2658
3143
  updated: z.string().optional(),
2659
- role: z.string(),
2660
- description: z.string(),
2661
- system_prompt: z.string().optional(),
2662
- instructions: z.string(),
2663
- status: RetrieveAgentRequestStatus$inboundSchema,
2664
- settings: z.lazy(() => RetrieveAgentRequestSettings$inboundSchema).optional(),
2665
- model: z.lazy(() => RetrieveAgentRequestModel$inboundSchema),
3144
+ status: RetrieveAgentRequestResponseBodyStatus$inboundSchema,
2666
3145
  version_hash: z.string().optional(),
2667
3146
  path: z.string(),
2668
- memory_stores: z.array(z.string()),
3147
+ memory_stores: z.array(z.string()).optional(),
2669
3148
  team_of_agents: z.array(
2670
- z.lazy(() => RetrieveAgentRequestTeamOfAgents$inboundSchema),
2671
- ),
2672
- metrics: z.lazy(() => RetrieveAgentRequestMetrics$inboundSchema).optional(),
3149
+ z.lazy(() => RetrieveAgentRequestResponseBodyTeamOfAgents$inboundSchema),
3150
+ ).optional(),
3151
+ metrics: z.lazy(() => RetrieveAgentRequestResponseBodyMetrics$inboundSchema)
3152
+ .optional(),
2673
3153
  variables: z.record(z.any()).optional(),
2674
3154
  knowledge_bases: z.array(
2675
- z.lazy(() => RetrieveAgentRequestKnowledgeBases$inboundSchema),
3155
+ z.lazy(() => RetrieveAgentRequestResponseBodyKnowledgeBases$inboundSchema),
2676
3156
  ).optional(),
2677
- source: RetrieveAgentRequestSource$inboundSchema.optional(),
3157
+ source: RetrieveAgentRequestResponseBodySource$inboundSchema.optional(),
3158
+ type: z.literal("internal"),
3159
+ role: z.string(),
3160
+ description: z.string(),
3161
+ system_prompt: z.string().optional(),
3162
+ instructions: z.string(),
3163
+ settings: z.lazy(() => RetrieveAgentRequestResponseBodySettings$inboundSchema)
3164
+ .optional(),
3165
+ model: z.lazy(() => ResponseBodyModel$inboundSchema),
2678
3166
  }).transform((v) => {
2679
3167
  return remap$(v, {
2680
3168
  "_id": "id",
2681
3169
  "display_name": "displayName",
2682
- "workspace_id": "workspaceId",
2683
3170
  "project_id": "projectId",
2684
3171
  "created_by_id": "createdById",
2685
3172
  "updated_by_id": "updatedById",
2686
- "system_prompt": "systemPrompt",
2687
3173
  "version_hash": "versionHash",
2688
3174
  "memory_stores": "memoryStores",
2689
3175
  "team_of_agents": "teamOfAgents",
2690
3176
  "knowledge_bases": "knowledgeBases",
3177
+ "system_prompt": "systemPrompt",
2691
3178
  });
2692
3179
  });
2693
3180
 
3181
+ export function retrieveAgentRequestResponseBody1FromJSON(
3182
+ jsonString: string,
3183
+ ): SafeParseResult<RetrieveAgentRequestResponseBody1, SDKValidationError> {
3184
+ return safeParse(
3185
+ jsonString,
3186
+ (x) => RetrieveAgentRequestResponseBody1$inboundSchema.parse(JSON.parse(x)),
3187
+ `Failed to parse 'RetrieveAgentRequestResponseBody1' from JSON`,
3188
+ );
3189
+ }
3190
+
3191
+ /** @internal */
3192
+ export const RetrieveAgentRequestResponseBody$inboundSchema: z.ZodType<
3193
+ RetrieveAgentRequestResponseBody,
3194
+ z.ZodTypeDef,
3195
+ unknown
3196
+ > = z.union([
3197
+ z.lazy(() => RetrieveAgentRequestResponseBody1$inboundSchema),
3198
+ z.lazy(() => RetrieveAgentRequestResponseBody2$inboundSchema),
3199
+ ]);
3200
+
2694
3201
  export function retrieveAgentRequestResponseBodyFromJSON(
2695
3202
  jsonString: string,
2696
3203
  ): SafeParseResult<RetrieveAgentRequestResponseBody, SDKValidationError> {