@orq-ai/node 4.0.4 → 4.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/bin/mcp-server.js +213 -213
  2. package/bin/mcp-server.js.map +36 -36
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +2 -2
  6. package/lib/config.js +2 -2
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/server.js +1 -1
  9. package/models/operations/createbudget.js +2 -2
  10. package/models/operations/createcontact.js +2 -2
  11. package/models/operations/createdataset.js +2 -2
  12. package/models/operations/createdatasetitem.js +8 -8
  13. package/models/operations/createdatasource.js +2 -2
  14. package/models/operations/createeval.js +28 -28
  15. package/models/operations/createtool.js +12 -12
  16. package/models/operations/fileget.js +2 -2
  17. package/models/operations/filelist.js +2 -2
  18. package/models/operations/fileupload.js +2 -2
  19. package/models/operations/getalltools.js +12 -12
  20. package/models/operations/getbudget.js +2 -2
  21. package/models/operations/getevals.js +28 -28
  22. package/models/operations/listbudgets.js +2 -2
  23. package/models/operations/listcontacts.js +2 -2
  24. package/models/operations/listdatasetdatapoints.js +8 -8
  25. package/models/operations/listdatasets.js +2 -2
  26. package/models/operations/listdatasources.js +2 -2
  27. package/models/operations/retrievecontact.js +2 -2
  28. package/models/operations/retrievedatapoint.js +8 -8
  29. package/models/operations/retrievedataset.js +2 -2
  30. package/models/operations/retrievedatasource.js +2 -2
  31. package/models/operations/retrievetool.js +12 -12
  32. package/models/operations/runagent.js +2 -2
  33. package/models/operations/streamrunagent.js +2 -2
  34. package/models/operations/updatebudget.js +2 -2
  35. package/models/operations/updatecontact.js +2 -2
  36. package/models/operations/updatedatapoint.js +8 -8
  37. package/models/operations/updatedataset.js +2 -2
  38. package/models/operations/updatedatasource.js +2 -2
  39. package/models/operations/updateeval.js +28 -28
  40. package/models/operations/updatetool.js +14 -14
  41. package/package.json +1 -1
  42. package/packages/orq-rc/README.md +38 -47
  43. package/packages/orq-rc/docs/sdks/agents/README.md +230 -529
  44. package/packages/orq-rc/docs/sdks/responses/README.md +60 -65
  45. package/packages/orq-rc/examples/package-lock.json +1 -1
  46. package/packages/orq-rc/jsr.json +1 -1
  47. package/packages/orq-rc/package-lock.json +2 -2
  48. package/packages/orq-rc/package.json +1 -1
  49. package/packages/orq-rc/src/funcs/agentsCreate.ts +16 -14
  50. package/packages/orq-rc/src/funcs/agentsDelete.ts +10 -6
  51. package/packages/orq-rc/src/funcs/agentsInvoke.ts +16 -6
  52. package/packages/orq-rc/src/funcs/agentsList.ts +18 -6
  53. package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +23 -12
  54. package/packages/orq-rc/src/funcs/agentsRetrieve.ts +21 -16
  55. package/packages/orq-rc/src/funcs/agentsRun.ts +4 -2
  56. package/packages/orq-rc/src/funcs/agentsStream.ts +16 -6
  57. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +4 -2
  58. package/packages/orq-rc/src/funcs/agentsUpdate.ts +14 -6
  59. package/packages/orq-rc/src/lib/config.ts +2 -2
  60. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  61. package/packages/orq-rc/src/mcp-server/server.ts +1 -9
  62. package/packages/orq-rc/src/mcp-server/tools/agentsCreate.ts +3 -3
  63. package/packages/orq-rc/src/mcp-server/tools/agentsDelete.ts +5 -5
  64. package/packages/orq-rc/src/mcp-server/tools/agentsInvoke.ts +7 -4
  65. package/packages/orq-rc/src/mcp-server/tools/agentsList.ts +9 -5
  66. package/packages/orq-rc/src/mcp-server/tools/agentsResponsesCreate.ts +8 -4
  67. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieve.ts +5 -5
  68. package/packages/orq-rc/src/mcp-server/tools/agentsRun.ts +2 -2
  69. package/packages/orq-rc/src/mcp-server/tools/agentsStream.ts +7 -4
  70. package/packages/orq-rc/src/mcp-server/tools/agentsStreamRun.ts +2 -2
  71. package/packages/orq-rc/src/mcp-server/tools/agentsUpdate.ts +8 -4
  72. package/packages/orq-rc/src/models/errors/createagentrequest.ts +67 -0
  73. package/packages/orq-rc/src/models/errors/deleteagent.ts +2 -2
  74. package/packages/orq-rc/src/models/errors/index.ts +2 -3
  75. package/packages/orq-rc/src/models/errors/{listagenttasks.ts → retrieveagentrequest.ts} +15 -15
  76. package/packages/orq-rc/src/models/errors/updateagent.ts +2 -2
  77. package/packages/orq-rc/src/models/operations/{createagent.ts → createagentrequest.ts} +1643 -1485
  78. package/packages/orq-rc/src/models/operations/{createagentresponse.ts → createagentresponserequest.ts} +141 -127
  79. package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
  80. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  81. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  82. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +8 -8
  83. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  84. package/packages/orq-rc/src/models/operations/createeval.ts +28 -28
  85. package/packages/orq-rc/src/models/operations/createprompt.ts +4 -4
  86. package/packages/orq-rc/src/models/operations/createtool.ts +12 -12
  87. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  88. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  89. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  90. package/packages/orq-rc/src/models/operations/getalltools.ts +12 -12
  91. package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
  92. package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
  93. package/packages/orq-rc/src/models/operations/index.ts +3 -7
  94. package/packages/orq-rc/src/models/operations/invokeagent.ts +153 -190
  95. package/packages/orq-rc/src/models/operations/listagents.ts +9 -21
  96. package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
  97. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  98. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +8 -8
  99. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  100. package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
  101. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +3741 -0
  102. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  103. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +8 -8
  104. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  105. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  106. package/packages/orq-rc/src/models/operations/retrievetool.ts +12 -12
  107. package/packages/orq-rc/src/models/operations/runagent.ts +53 -57
  108. package/packages/orq-rc/src/models/operations/streamagent.ts +1 -1
  109. package/packages/orq-rc/src/models/operations/streamrunagent.ts +68 -82
  110. package/packages/orq-rc/src/models/operations/updateagent.ts +17 -17
  111. package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
  112. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  113. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +8 -8
  114. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  115. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  116. package/packages/orq-rc/src/models/operations/updateeval.ts +28 -28
  117. package/packages/orq-rc/src/models/operations/updateprompt.ts +4 -4
  118. package/packages/orq-rc/src/models/operations/updatetool.ts +14 -14
  119. package/packages/orq-rc/src/sdk/agents.ts +51 -99
  120. package/packages/orq-rc/src/sdk/responses.ts +7 -5
  121. package/src/lib/config.ts +2 -2
  122. package/src/mcp-server/mcp-server.ts +1 -1
  123. package/src/mcp-server/server.ts +1 -1
  124. package/src/models/operations/createbudget.ts +2 -2
  125. package/src/models/operations/createcontact.ts +2 -2
  126. package/src/models/operations/createdataset.ts +2 -2
  127. package/src/models/operations/createdatasetitem.ts +8 -8
  128. package/src/models/operations/createdatasource.ts +2 -2
  129. package/src/models/operations/createeval.ts +28 -28
  130. package/src/models/operations/createtool.ts +12 -12
  131. package/src/models/operations/fileget.ts +2 -2
  132. package/src/models/operations/filelist.ts +2 -2
  133. package/src/models/operations/fileupload.ts +2 -2
  134. package/src/models/operations/getalltools.ts +12 -12
  135. package/src/models/operations/getbudget.ts +2 -2
  136. package/src/models/operations/getevals.ts +28 -28
  137. package/src/models/operations/listbudgets.ts +2 -2
  138. package/src/models/operations/listcontacts.ts +2 -2
  139. package/src/models/operations/listdatasetdatapoints.ts +8 -8
  140. package/src/models/operations/listdatasets.ts +2 -2
  141. package/src/models/operations/listdatasources.ts +2 -2
  142. package/src/models/operations/retrievecontact.ts +2 -2
  143. package/src/models/operations/retrievedatapoint.ts +8 -8
  144. package/src/models/operations/retrievedataset.ts +2 -2
  145. package/src/models/operations/retrievedatasource.ts +2 -2
  146. package/src/models/operations/retrievetool.ts +12 -12
  147. package/src/models/operations/runagent.ts +2 -2
  148. package/src/models/operations/streamrunagent.ts +2 -2
  149. package/src/models/operations/updatebudget.ts +2 -2
  150. package/src/models/operations/updatecontact.ts +2 -2
  151. package/src/models/operations/updatedatapoint.ts +8 -8
  152. package/src/models/operations/updatedataset.ts +2 -2
  153. package/src/models/operations/updatedatasource.ts +2 -2
  154. package/src/models/operations/updateeval.ts +28 -28
  155. package/src/models/operations/updatetool.ts +14 -14
  156. package/packages/orq-rc/src/funcs/agentsListActions.ts +0 -169
  157. package/packages/orq-rc/src/funcs/agentsListTasks.ts +0 -183
  158. package/packages/orq-rc/src/funcs/agentsRetrieveAction.ts +0 -173
  159. package/packages/orq-rc/src/funcs/agentsRetrieveTask.ts +0 -179
  160. package/packages/orq-rc/src/mcp-server/tools/agentsListActions.ts +0 -35
  161. package/packages/orq-rc/src/mcp-server/tools/agentsListTasks.ts +0 -37
  162. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveAction.ts +0 -35
  163. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveTask.ts +0 -37
  164. package/packages/orq-rc/src/models/errors/createagent.ts +0 -67
  165. package/packages/orq-rc/src/models/errors/getagent.ts +0 -67
  166. package/packages/orq-rc/src/models/operations/getagent.ts +0 -3480
  167. package/packages/orq-rc/src/models/operations/getagenttask.ts +0 -2389
  168. package/packages/orq-rc/src/models/operations/listactions.ts +0 -427
  169. package/packages/orq-rc/src/models/operations/listagenttasks.ts +0 -2614
  170. package/packages/orq-rc/src/models/operations/retrieveaction.ts +0 -354
@@ -25,10 +25,12 @@ import { APICall, APIPromise } from "../types/async.js";
25
25
  import { Result } from "../types/fp.js";
26
26
 
27
27
  /**
28
- * Run an agent
28
+ * Run an agent with configuration
29
29
  *
30
30
  * @remarks
31
- * Executes an agent with the provided configuration using A2A message format. If the agent already exists with the same configuration, it will be reused. If the configuration differs, a new version is created. The fallback model is configured at the agent level and will be used automatically if the primary model fails during execution.
31
+ * Executes an agent using inline configuration or references an existing agent. Supports dynamic agent creation where the system automatically manages agent versioning - reusing existing agents with matching configurations or creating new versions when configurations differ. Ideal for programmatic agent execution with flexible configuration management. The agent processes messages in A2A format with support for memory context, tool execution, and automatic model fallback on failure.
32
+ *
33
+ * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
32
34
  */
33
35
  export function agentsRun(
34
36
  client: OrqCore,
@@ -28,14 +28,17 @@ import { APICall, APIPromise } from "../types/async.js";
28
28
  import { Result } from "../types/fp.js";
29
29
 
30
30
  /**
31
- * Stream agent execution events
31
+ * Stream agent execution in real-time
32
32
  *
33
33
  * @remarks
34
- * Executes an agent and streams events via Server-Sent Events (SSE). The stream will continue until the agent completes, errors, or reaches the configured timeout.
34
+ * Executes an agent and streams the interaction in real-time using Server-Sent Events (SSE). Provides live updates as the agent processes the request, including message chunks, tool calls, and execution status. Perfect for building responsive chat interfaces and monitoring agent progress. The stream continues until the agent completes its task, encounters an error, or reaches the configured timeout (default 30 minutes, configurable 1-3600 seconds).
35
+ *
36
+ * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
35
37
  */
36
38
  export function agentsStream(
37
39
  client: OrqCore,
38
- request: operations.StreamAgentRequest,
40
+ key: string,
41
+ requestBody?: operations.StreamAgentRequestBody | undefined,
39
42
  options?: RequestOptions,
40
43
  ): APIPromise<
41
44
  Result<
@@ -53,14 +56,16 @@ export function agentsStream(
53
56
  > {
54
57
  return new APIPromise($do(
55
58
  client,
56
- request,
59
+ key,
60
+ requestBody,
57
61
  options,
58
62
  ));
59
63
  }
60
64
 
61
65
  async function $do(
62
66
  client: OrqCore,
63
- request: operations.StreamAgentRequest,
67
+ key: string,
68
+ requestBody?: operations.StreamAgentRequestBody | undefined,
64
69
  options?: RequestOptions,
65
70
  ): Promise<
66
71
  [
@@ -79,8 +84,13 @@ async function $do(
79
84
  APICall,
80
85
  ]
81
86
  > {
87
+ const input: operations.StreamAgentRequest = {
88
+ key: key,
89
+ requestBody: requestBody,
90
+ };
91
+
82
92
  const parsed = safeParse(
83
- request,
93
+ input,
84
94
  (value) => operations.StreamAgentRequest$outboundSchema.parse(value),
85
95
  "Input validation failed",
86
96
  );
@@ -28,10 +28,12 @@ import { APICall, APIPromise } from "../types/async.js";
28
28
  import { Result } from "../types/fp.js";
29
29
 
30
30
  /**
31
- * Run and stream agent execution
31
+ * Run agent with streaming response
32
32
  *
33
33
  * @remarks
34
- * Creates or updates an agent with the provided configuration, then streams execution events via Server-Sent Events (SSE). If the agent already exists with the same configuration, it will be reused. If the configuration differs, a new version is created. The stream will continue until the agent completes, errors, or reaches the configured timeout.
34
+ * Dynamically configures and executes an agent while streaming the interaction in real-time via Server-Sent Events (SSE). Intelligently manages agent versioning by reusing existing agents with matching configurations or creating new versions when configurations differ. Combines the flexibility of inline configuration with real-time streaming, making it ideal for dynamic agent interactions with live feedback. The stream provides continuous updates including message chunks, tool executions, and status changes until completion or timeout.
35
+ *
36
+ * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
35
37
  */
36
38
  export function agentsStreamRun(
37
39
  client: OrqCore,
@@ -26,14 +26,15 @@ import { APICall, APIPromise } from "../types/async.js";
26
26
  import { Result } from "../types/fp.js";
27
27
 
28
28
  /**
29
- * Update an agent
29
+ * Update agent
30
30
  *
31
31
  * @remarks
32
- * Updates an existing agent's configuration. You can update various fields including the model configuration and fallback model settings.
32
+ * Modifies an existing agent's configuration with partial updates. Supports updating any aspect of the agent including model assignments (primary and fallback), instructions, tools, knowledge bases, memory stores, and execution parameters. Only the fields provided in the request body will be updated; all other fields remain unchanged. Changes take effect immediately for new agent invocations.
33
33
  */
34
34
  export function agentsUpdate(
35
35
  client: OrqCore,
36
- request: operations.UpdateAgentRequest,
36
+ agentKey: string,
37
+ requestBody?: operations.UpdateAgentUpdateAgentRequest | undefined,
37
38
  options?: RequestOptions,
38
39
  ): APIPromise<
39
40
  Result<
@@ -51,14 +52,16 @@ export function agentsUpdate(
51
52
  > {
52
53
  return new APIPromise($do(
53
54
  client,
54
- request,
55
+ agentKey,
56
+ requestBody,
55
57
  options,
56
58
  ));
57
59
  }
58
60
 
59
61
  async function $do(
60
62
  client: OrqCore,
61
- request: operations.UpdateAgentRequest,
63
+ agentKey: string,
64
+ requestBody?: operations.UpdateAgentUpdateAgentRequest | undefined,
62
65
  options?: RequestOptions,
63
66
  ): Promise<
64
67
  [
@@ -77,8 +80,13 @@ async function $do(
77
80
  APICall,
78
81
  ]
79
82
  > {
83
+ const input: operations.UpdateAgentRequest = {
84
+ agentKey: agentKey,
85
+ requestBody: requestBody,
86
+ };
87
+
80
88
  const parsed = safeParse(
81
- request,
89
+ input,
82
90
  (value) => operations.UpdateAgentRequest$outboundSchema.parse(value),
83
91
  "Input validation failed",
84
92
  );
@@ -68,7 +68,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
68
68
  export const SDK_METADATA = {
69
69
  language: "typescript",
70
70
  openapiDocVersion: "2.0",
71
- sdkVersion: "4.0.0-rc.68",
71
+ sdkVersion: "4.1.0-rc.0",
72
72
  genVersion: "2.760.2",
73
- userAgent: "speakeasy-sdk/typescript 4.0.0-rc.68 2.760.2 2.0 @orq-ai/node",
73
+ userAgent: "speakeasy-sdk/typescript 4.1.0-rc.0 2.760.2 2.0 @orq-ai/node",
74
74
  } as const;
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "4.0.0-rc.68",
22
+ currentVersion: "4.1.0-rc.0",
23
23
  },
24
24
  });
25
25
 
@@ -17,12 +17,8 @@ import { tool$agentsCreate } from "./tools/agentsCreate.js";
17
17
  import { tool$agentsDelete } from "./tools/agentsDelete.js";
18
18
  import { tool$agentsInvoke } from "./tools/agentsInvoke.js";
19
19
  import { tool$agentsList } from "./tools/agentsList.js";
20
- import { tool$agentsListActions } from "./tools/agentsListActions.js";
21
- import { tool$agentsListTasks } from "./tools/agentsListTasks.js";
22
20
  import { tool$agentsResponsesCreate } from "./tools/agentsResponsesCreate.js";
23
21
  import { tool$agentsRetrieve } from "./tools/agentsRetrieve.js";
24
- import { tool$agentsRetrieveAction } from "./tools/agentsRetrieveAction.js";
25
- import { tool$agentsRetrieveTask } from "./tools/agentsRetrieveTask.js";
26
22
  import { tool$agentsRun } from "./tools/agentsRun.js";
27
23
  import { tool$agentsStream } from "./tools/agentsStream.js";
28
24
  import { tool$agentsStreamRun } from "./tools/agentsStreamRun.js";
@@ -124,7 +120,7 @@ export function createMCPServer(deps: {
124
120
  }) {
125
121
  const server = new McpServer({
126
122
  name: "Orq",
127
- version: "4.0.0-rc.68",
123
+ version: "4.1.0-rc.0",
128
124
  });
129
125
 
130
126
  const client = new OrqCore({
@@ -175,14 +171,10 @@ export function createMCPServer(deps: {
175
171
  tool(tool$agentsRetrieve);
176
172
  tool(tool$agentsUpdate);
177
173
  tool(tool$agentsInvoke);
178
- tool(tool$agentsListTasks);
179
- tool(tool$agentsRetrieveTask);
180
174
  tool(tool$agentsList);
181
175
  tool(tool$agentsRun);
182
176
  tool(tool$agentsStreamRun);
183
177
  tool(tool$agentsStream);
184
- tool(tool$agentsListActions);
185
- tool(tool$agentsRetrieveAction);
186
178
  tool(tool$filesCreate);
187
179
  tool(tool$filesList);
188
180
  tool(tool$filesGet);
@@ -7,14 +7,14 @@ import * as operations from "../../models/operations/index.js";
7
7
  import { formatResult, ToolDefinition } from "../tools.js";
8
8
 
9
9
  const args = {
10
- request: operations.CreateAgentRequestBody$inboundSchema.optional(),
10
+ request: operations.CreateAgentRequestRequestBody$inboundSchema.optional(),
11
11
  };
12
12
 
13
13
  export const tool$agentsCreate: ToolDefinition<typeof args> = {
14
14
  name: "agents-create",
15
- description: `Create a new agent
15
+ description: `Create agent
16
16
 
17
- Creates a new AI agent with specified configuration. Agents can be configured with a primary model and an optional fallback model that will be used automatically if the primary model fails.`,
17
+ Creates a new agent with the specified configuration, including model selection, instructions, tools, and knowledge bases. Agents are intelligent assistants that can execute tasks, interact with tools, and maintain context through memory stores. The agent can be configured with a primary model and optional fallback models for automatic failover, custom instructions for behavior control, and various settings to control execution limits and tool usage.`,
18
18
  args,
19
19
  tool: async (client, args, ctx) => {
20
20
  const [result, apiCall] = await agentsCreate(
@@ -2,24 +2,24 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ import * as z from "zod/v3";
5
6
  import { agentsDelete } from "../../funcs/agentsDelete.js";
6
- import * as operations from "../../models/operations/index.js";
7
7
  import { formatResult, ToolDefinition } from "../tools.js";
8
8
 
9
9
  const args = {
10
- request: operations.DeleteAgentRequest$inboundSchema,
10
+ agentKey: z.string(),
11
11
  };
12
12
 
13
13
  export const tool$agentsDelete: ToolDefinition<typeof args> = {
14
14
  name: "agents-delete",
15
- description: `Delete an agent
15
+ description: `Delete agent
16
16
 
17
- Permanently deletes an agent and all its configuration, including primary and fallback model settings.`,
17
+ Permanently removes an agent from the workspace. This operation is irreversible and will delete all associated configuration including model assignments, tools, knowledge bases, memory stores, and cached data. Active agent sessions will be terminated, and the agent key will become available for reuse.`,
18
18
  args,
19
19
  tool: async (client, args, ctx) => {
20
20
  const [result, apiCall] = await agentsDelete(
21
21
  client,
22
- args.request,
22
+ args.agentKey,
23
23
  { fetchOptions: { signal: ctx.signal } },
24
24
  ).$inspect();
25
25
 
@@ -2,24 +2,27 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ import * as z from "zod/v3";
5
6
  import { agentsInvoke } from "../../funcs/agentsInvoke.js";
6
7
  import * as operations from "../../models/operations/index.js";
7
8
  import { formatResult, ToolDefinition } from "../tools.js";
8
9
 
9
10
  const args = {
10
- request: operations.InvokeAgentRequest$inboundSchema,
11
+ key: z.string(),
12
+ requestBody: operations.InvokeAgentRequestBody$inboundSchema.optional(),
11
13
  };
12
14
 
13
15
  export const tool$agentsInvoke: ToolDefinition<typeof args> = {
14
16
  name: "agents-invoke",
15
- description: `Invoke an agent
17
+ description: `Execute an agent task
16
18
 
17
- Executes an existing agent with the provided input. The agent uses its pre-configured primary model and will automatically fall back to its configured fallback model if the primary model fails. Fallback models are configured at the agent level, not during execution.`,
19
+ Invokes an agent to perform a task with the provided input message. The agent will process the request using its configured model and tools, maintaining context through memory stores if configured. Supports automatic model fallback on primary model failure, tool execution, knowledge base retrieval, and continuation of previous conversations. Returns a task response that can be used to track execution status and retrieve results.`,
18
20
  args,
19
21
  tool: async (client, args, ctx) => {
20
22
  const [result, apiCall] = await agentsInvoke(
21
23
  client,
22
- args.request,
24
+ args.key,
25
+ args.requestBody,
23
26
  { fetchOptions: { signal: ctx.signal } },
24
27
  ).$inspect();
25
28
 
@@ -2,24 +2,28 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ import * as z from "zod/v3";
5
6
  import { agentsList } from "../../funcs/agentsList.js";
6
- import * as operations from "../../models/operations/index.js";
7
7
  import { formatResult, ToolDefinition } from "../tools.js";
8
8
 
9
9
  const args = {
10
- request: operations.ListAgentsRequest$inboundSchema.optional(),
10
+ limit: z.number().optional(),
11
+ startingAfter: z.string().optional(),
12
+ endingBefore: z.string().optional(),
11
13
  };
12
14
 
13
15
  export const tool$agentsList: ToolDefinition<typeof args> = {
14
16
  name: "agents-list",
15
- description: `List all agents
17
+ description: `List agents
16
18
 
17
- Retrieves a list of all agents in your workspace. When no limit is provided, returns all agents without pagination. When a limit is specified, returns a paginated list. Each agent includes its configuration, primary model, and optional fallback model settings.`,
19
+ Retrieves a comprehensive list of agents configured in your workspace. Supports pagination for large datasets and returns agents sorted by creation date (newest first). Each agent in the response includes its complete configuration: model settings with fallback options, instructions, tools, knowledge bases, memory stores, and execution parameters. Use pagination parameters to efficiently navigate through large collections of agents.`,
18
20
  args,
19
21
  tool: async (client, args, ctx) => {
20
22
  const [result, apiCall] = await agentsList(
21
23
  client,
22
- args.request,
24
+ args.limit,
25
+ args.startingAfter,
26
+ args.endingBefore,
23
27
  { fetchOptions: { signal: ctx.signal } },
24
28
  ).$inspect();
25
29
 
@@ -2,24 +2,28 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ import * as z from "zod/v3";
5
6
  import { agentsResponsesCreate } from "../../funcs/agentsResponsesCreate.js";
6
7
  import * as operations from "../../models/operations/index.js";
7
8
  import { formatResult, ToolDefinition } from "../tools.js";
8
9
 
9
10
  const args = {
10
- request: operations.CreateAgentResponseRequest$inboundSchema,
11
+ agentKey: z.string(),
12
+ requestBody: operations.CreateAgentResponseRequestRequestBody$inboundSchema
13
+ .optional(),
11
14
  };
12
15
 
13
16
  export const tool$agentsResponsesCreate: ToolDefinition<typeof args> = {
14
17
  name: "agents-responses-create",
15
- description: `Create an agent response
18
+ description: `Create response
16
19
 
17
- Creates a new response representing an agent interaction. A response tracks the conversation from the initial message until the agent becomes inactive or errors. Supports both synchronous (waiting) and asynchronous (background) execution modes.`,
20
+ Initiates an agent conversation and returns a complete response. This endpoint manages the full lifecycle of an agent interaction, from receiving the initial message through all processing steps until completion. Supports synchronous execution (waits for completion) and asynchronous execution (returns immediately with task ID). The response includes all messages exchanged, tool calls made, and token usage statistics. Ideal for request-response patterns where you need the complete interaction result.`,
18
21
  args,
19
22
  tool: async (client, args, ctx) => {
20
23
  const [result, apiCall] = await agentsResponsesCreate(
21
24
  client,
22
- args.request,
25
+ args.agentKey,
26
+ args.requestBody,
23
27
  { fetchOptions: { signal: ctx.signal } },
24
28
  ).$inspect();
25
29
 
@@ -2,24 +2,24 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ import * as z from "zod/v3";
5
6
  import { agentsRetrieve } from "../../funcs/agentsRetrieve.js";
6
- import * as operations from "../../models/operations/index.js";
7
7
  import { formatResult, ToolDefinition } from "../tools.js";
8
8
 
9
9
  const args = {
10
- request: operations.GetAgentRequest$inboundSchema,
10
+ agentKey: z.string(),
11
11
  };
12
12
 
13
13
  export const tool$agentsRetrieve: ToolDefinition<typeof args> = {
14
14
  name: "agents-retrieve",
15
- description: `Get an agent
15
+ description: `Retrieve agent
16
16
 
17
- Retrieves a single agent by its unique key, including its full configuration with primary and fallback model settings.`,
17
+ Retrieves detailed information about a specific agent identified by its unique key or identifier. Returns the complete agent manifest including configuration settings, model assignments (primary and fallback), tools, knowledge bases, memory stores, instructions, and execution parameters. Use this endpoint to fetch the current state and configuration of an individual agent.`,
18
18
  args,
19
19
  tool: async (client, args, ctx) => {
20
20
  const [result, apiCall] = await agentsRetrieve(
21
21
  client,
22
- args.request,
22
+ args.agentKey,
23
23
  { fetchOptions: { signal: ctx.signal } },
24
24
  ).$inspect();
25
25
 
@@ -12,9 +12,9 @@ const args = {
12
12
 
13
13
  export const tool$agentsRun: ToolDefinition<typeof args> = {
14
14
  name: "agents-run",
15
- description: `Run an agent
15
+ description: `Run an agent with configuration
16
16
 
17
- Executes an agent with the provided configuration using A2A message format. If the agent already exists with the same configuration, it will be reused. If the configuration differs, a new version is created. The fallback model is configured at the agent level and will be used automatically if the primary model fails during execution.`,
17
+ Executes an agent using inline configuration or references an existing agent. Supports dynamic agent creation where the system automatically manages agent versioning - reusing existing agents with matching configurations or creating new versions when configurations differ. Ideal for programmatic agent execution with flexible configuration management. The agent processes messages in A2A format with support for memory context, tool execution, and automatic model fallback on failure.`,
18
18
  args,
19
19
  tool: async (client, args, ctx) => {
20
20
  const [result, apiCall] = await agentsRun(
@@ -2,24 +2,27 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ import * as z from "zod/v3";
5
6
  import { agentsStream } from "../../funcs/agentsStream.js";
6
7
  import * as operations from "../../models/operations/index.js";
7
8
  import { formatResult, ToolDefinition } from "../tools.js";
8
9
 
9
10
  const args = {
10
- request: operations.StreamAgentRequest$inboundSchema,
11
+ key: z.string(),
12
+ requestBody: operations.StreamAgentRequestBody$inboundSchema.optional(),
11
13
  };
12
14
 
13
15
  export const tool$agentsStream: ToolDefinition<typeof args> = {
14
16
  name: "agents-stream",
15
- description: `Stream agent execution events
17
+ description: `Stream agent execution in real-time
16
18
 
17
- Executes an agent and streams events via Server-Sent Events (SSE). The stream will continue until the agent completes, errors, or reaches the configured timeout.`,
19
+ Executes an agent and streams the interaction in real-time using Server-Sent Events (SSE). Provides live updates as the agent processes the request, including message chunks, tool calls, and execution status. Perfect for building responsive chat interfaces and monitoring agent progress. The stream continues until the agent completes its task, encounters an error, or reaches the configured timeout (default 30 minutes, configurable 1-3600 seconds).`,
18
20
  args,
19
21
  tool: async (client, args, ctx) => {
20
22
  const [result, apiCall] = await agentsStream(
21
23
  client,
22
- args.request,
24
+ args.key,
25
+ args.requestBody,
23
26
  { fetchOptions: { signal: ctx.signal } },
24
27
  ).$inspect();
25
28
 
@@ -12,9 +12,9 @@ const args = {
12
12
 
13
13
  export const tool$agentsStreamRun: ToolDefinition<typeof args> = {
14
14
  name: "agents-stream-run",
15
- description: `Run and stream agent execution
15
+ description: `Run agent with streaming response
16
16
 
17
- Creates or updates an agent with the provided configuration, then streams execution events via Server-Sent Events (SSE). If the agent already exists with the same configuration, it will be reused. If the configuration differs, a new version is created. The stream will continue until the agent completes, errors, or reaches the configured timeout.`,
17
+ Dynamically configures and executes an agent while streaming the interaction in real-time via Server-Sent Events (SSE). Intelligently manages agent versioning by reusing existing agents with matching configurations or creating new versions when configurations differ. Combines the flexibility of inline configuration with real-time streaming, making it ideal for dynamic agent interactions with live feedback. The stream provides continuous updates including message chunks, tool executions, and status changes until completion or timeout.`,
18
18
  args,
19
19
  tool: async (client, args, ctx) => {
20
20
  const [result, apiCall] = await agentsStreamRun(
@@ -2,24 +2,28 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ import * as z from "zod/v3";
5
6
  import { agentsUpdate } from "../../funcs/agentsUpdate.js";
6
7
  import * as operations from "../../models/operations/index.js";
7
8
  import { formatResult, ToolDefinition } from "../tools.js";
8
9
 
9
10
  const args = {
10
- request: operations.UpdateAgentRequest$inboundSchema,
11
+ agentKey: z.string(),
12
+ requestBody: operations.UpdateAgentUpdateAgentRequest$inboundSchema
13
+ .optional(),
11
14
  };
12
15
 
13
16
  export const tool$agentsUpdate: ToolDefinition<typeof args> = {
14
17
  name: "agents-update",
15
- description: `Update an agent
18
+ description: `Update agent
16
19
 
17
- Updates an existing agent's configuration. You can update various fields including the model configuration and fallback model settings.`,
20
+ Modifies an existing agent's configuration with partial updates. Supports updating any aspect of the agent including model assignments (primary and fallback), instructions, tools, knowledge bases, memory stores, and execution parameters. Only the fields provided in the request body will be updated; all other fields remain unchanged. Changes take effect immediately for new agent invocations.`,
18
21
  args,
19
22
  tool: async (client, args, ctx) => {
20
23
  const [result, apiCall] = await agentsUpdate(
21
24
  client,
22
- args.request,
25
+ args.agentKey,
26
+ args.requestBody,
23
27
  { fetchOptions: { signal: ctx.signal } },
24
28
  ).$inspect();
25
29
 
@@ -0,0 +1,67 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { OrqError } from "./orqerror.js";
7
+
8
+ /**
9
+ * Conflict - An agent with the specified key already exists in this workspace. Each agent must have a unique key within a workspace to ensure proper identification and management.
10
+ */
11
+ export type CreateAgentRequestResponseBodyData = {
12
+ message: string;
13
+ };
14
+
15
+ /**
16
+ * Conflict - An agent with the specified key already exists in this workspace. Each agent must have a unique key within a workspace to ensure proper identification and management.
17
+ */
18
+ export class CreateAgentRequestResponseBody extends OrqError {
19
+ /** The original data that was passed to this error instance. */
20
+ data$: CreateAgentRequestResponseBodyData;
21
+
22
+ constructor(
23
+ err: CreateAgentRequestResponseBodyData,
24
+ httpMeta: { response: Response; request: Request; body: string },
25
+ ) {
26
+ const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
27
+ super(message, httpMeta);
28
+ this.data$ = err;
29
+
30
+ this.name = "CreateAgentRequestResponseBody";
31
+ }
32
+ }
33
+
34
+ /** @internal */
35
+ export const CreateAgentRequestResponseBody$inboundSchema: z.ZodType<
36
+ CreateAgentRequestResponseBody,
37
+ z.ZodTypeDef,
38
+ unknown
39
+ > = z.object({
40
+ message: z.string(),
41
+ request$: z.instanceof(Request),
42
+ response$: z.instanceof(Response),
43
+ body$: z.string(),
44
+ })
45
+ .transform((v) => {
46
+ return new CreateAgentRequestResponseBody(v, {
47
+ request: v.request$,
48
+ response: v.response$,
49
+ body: v.body$,
50
+ });
51
+ });
52
+
53
+ /** @internal */
54
+ export type CreateAgentRequestResponseBody$Outbound = {
55
+ message: string;
56
+ };
57
+
58
+ /** @internal */
59
+ export const CreateAgentRequestResponseBody$outboundSchema: z.ZodType<
60
+ CreateAgentRequestResponseBody$Outbound,
61
+ z.ZodTypeDef,
62
+ CreateAgentRequestResponseBody
63
+ > = z.instanceof(CreateAgentRequestResponseBody)
64
+ .transform(v => v.data$)
65
+ .pipe(z.object({
66
+ message: z.string(),
67
+ }));
@@ -6,14 +6,14 @@ import * as z from "zod/v3";
6
6
  import { OrqError } from "./orqerror.js";
7
7
 
8
8
  /**
9
- * Agent not found
9
+ * Agent not found. The specified agent key does not exist in the workspace or has already been deleted.
10
10
  */
11
11
  export type DeleteAgentResponseBodyData = {
12
12
  message: string;
13
13
  };
14
14
 
15
15
  /**
16
- * Agent not found
16
+ * Agent not found. The specified agent key does not exist in the workspace or has already been deleted.
17
17
  */
18
18
  export class DeleteAgentResponseBody extends OrqError {
19
19
  /** The original data that was passed to this error instance. */
@@ -3,19 +3,18 @@
3
3
  */
4
4
 
5
5
  export * from "./apierror.js";
6
- export * from "./createagent.js";
6
+ export * from "./createagentrequest.js";
7
7
  export * from "./createeval.js";
8
8
  export * from "./deleteagent.js";
9
9
  export * from "./deletecontact.js";
10
10
  export * from "./deleteeval.js";
11
- export * from "./getagent.js";
12
11
  export * from "./getevals.js";
13
12
  export * from "./getpromptversion.js";
14
13
  export * from "./honoapierror.js";
15
14
  export * from "./httpclienterrors.js";
16
- export * from "./listagenttasks.js";
17
15
  export * from "./orqerror.js";
18
16
  export * from "./responsevalidationerror.js";
17
+ export * from "./retrieveagentrequest.js";
19
18
  export * from "./retrievecontact.js";
20
19
  export * from "./sdkvalidationerror.js";
21
20
  export * from "./streamagent.js";