@orq-ai/node 3.14.43 → 3.14.45

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 (154) hide show
  1. package/bin/mcp-server.js +209 -209
  2. package/bin/mcp-server.js.map +35 -35
  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 +10 -10
  16. package/models/operations/duplicatetool.js +10 -10
  17. package/models/operations/fileget.js +2 -2
  18. package/models/operations/filelist.js +2 -2
  19. package/models/operations/fileupload.js +2 -2
  20. package/models/operations/getalltools.js +10 -10
  21. package/models/operations/getbudget.js +2 -2
  22. package/models/operations/getevals.js +28 -28
  23. package/models/operations/listbudgets.js +2 -2
  24. package/models/operations/listcontacts.js +2 -2
  25. package/models/operations/listdatasetdatapoints.js +8 -8
  26. package/models/operations/listdatasets.js +2 -2
  27. package/models/operations/listdatasources.js +2 -2
  28. package/models/operations/retrievecontact.js +2 -2
  29. package/models/operations/retrievedatapoint.js +8 -8
  30. package/models/operations/retrievedataset.js +2 -2
  31. package/models/operations/retrievedatasource.js +2 -2
  32. package/models/operations/retrievetool.js +10 -10
  33. package/models/operations/updatebudget.js +2 -2
  34. package/models/operations/updatecontact.js +2 -2
  35. package/models/operations/updatedatapoint.js +8 -8
  36. package/models/operations/updatedataset.js +2 -2
  37. package/models/operations/updatedatasource.js +2 -2
  38. package/models/operations/updateeval.js +28 -28
  39. package/models/operations/updatetool.js +10 -10
  40. package/package.json +1 -1
  41. package/packages/orq-rc/README.md +21 -31
  42. package/packages/orq-rc/docs/sdks/agents/README.md +195 -235
  43. package/packages/orq-rc/docs/sdks/chunking/README.md +2 -0
  44. package/packages/orq-rc/docs/sdks/memorystores/README.md +3 -4
  45. package/packages/orq-rc/docs/sdks/tools/README.md +1 -152
  46. package/packages/orq-rc/examples/package-lock.json +1 -1
  47. package/packages/orq-rc/jsr.json +1 -1
  48. package/packages/orq-rc/package-lock.json +2 -2
  49. package/packages/orq-rc/package.json +1 -1
  50. package/packages/orq-rc/src/funcs/agentsCreate.ts +1 -1
  51. package/packages/orq-rc/src/funcs/agentsInvoke.ts +4 -4
  52. package/packages/orq-rc/src/funcs/agentsListTasks.ts +4 -4
  53. package/packages/orq-rc/src/funcs/agentsRetrieveTask.ts +8 -8
  54. package/packages/orq-rc/src/funcs/agentsRun.ts +4 -4
  55. package/packages/orq-rc/src/funcs/agentsStream.ts +1 -0
  56. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +1 -0
  57. package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +2 -11
  58. package/packages/orq-rc/src/lib/config.ts +2 -2
  59. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  60. package/packages/orq-rc/src/mcp-server/server.ts +3 -9
  61. package/packages/orq-rc/src/models/errors/index.ts +0 -3
  62. package/packages/orq-rc/src/models/operations/createagent.ts +35 -17
  63. package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
  64. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  65. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  66. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +8 -8
  67. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  68. package/packages/orq-rc/src/models/operations/createeval.ts +368 -294
  69. package/packages/orq-rc/src/models/operations/createknowledge.ts +33 -47
  70. package/packages/orq-rc/src/models/operations/createtool.ts +198 -161
  71. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +17 -24
  72. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  73. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  74. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  75. package/packages/orq-rc/src/models/operations/getagent.ts +9 -0
  76. package/packages/orq-rc/src/models/operations/getagenttask.ts +1873 -428
  77. package/packages/orq-rc/src/models/operations/getalltools.ts +284 -231
  78. package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
  79. package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
  80. package/packages/orq-rc/src/models/operations/index.ts +0 -3
  81. package/packages/orq-rc/src/models/operations/invokeagent.ts +319 -299
  82. package/packages/orq-rc/src/models/operations/listagents.ts +9 -0
  83. package/packages/orq-rc/src/models/operations/listagenttasks.ts +2029 -540
  84. package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
  85. package/packages/orq-rc/src/models/operations/listchunks.ts +14 -14
  86. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  87. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +8 -8
  88. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  89. package/packages/orq-rc/src/models/operations/listdatasources.ts +15 -22
  90. package/packages/orq-rc/src/models/operations/parse.ts +16 -0
  91. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  92. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +8 -8
  93. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  94. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  95. package/packages/orq-rc/src/models/operations/retrievetool.ts +168 -132
  96. package/packages/orq-rc/src/models/operations/runagent.ts +264 -220
  97. package/packages/orq-rc/src/models/operations/streamagent.ts +7635 -414
  98. package/packages/orq-rc/src/models/operations/streamrunagent.ts +10745 -3582
  99. package/packages/orq-rc/src/models/operations/updateagent.ts +56 -31
  100. package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
  101. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  102. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +8 -8
  103. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  104. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  105. package/packages/orq-rc/src/models/operations/updateeval.ts +28 -28
  106. package/packages/orq-rc/src/models/operations/updatetool.ts +138 -104
  107. package/packages/orq-rc/src/sdk/agents.ts +36 -54
  108. package/packages/orq-rc/src/sdk/tools.ts +0 -36
  109. package/src/lib/config.ts +2 -2
  110. package/src/mcp-server/mcp-server.ts +1 -1
  111. package/src/mcp-server/server.ts +1 -1
  112. package/src/models/operations/createbudget.ts +2 -2
  113. package/src/models/operations/createcontact.ts +2 -2
  114. package/src/models/operations/createdataset.ts +2 -2
  115. package/src/models/operations/createdatasetitem.ts +8 -8
  116. package/src/models/operations/createdatasource.ts +2 -2
  117. package/src/models/operations/createeval.ts +28 -28
  118. package/src/models/operations/createtool.ts +10 -10
  119. package/src/models/operations/duplicatetool.ts +10 -10
  120. package/src/models/operations/fileget.ts +2 -2
  121. package/src/models/operations/filelist.ts +2 -2
  122. package/src/models/operations/fileupload.ts +2 -2
  123. package/src/models/operations/getalltools.ts +10 -10
  124. package/src/models/operations/getbudget.ts +2 -2
  125. package/src/models/operations/getevals.ts +28 -28
  126. package/src/models/operations/listbudgets.ts +2 -2
  127. package/src/models/operations/listcontacts.ts +2 -2
  128. package/src/models/operations/listdatasetdatapoints.ts +8 -8
  129. package/src/models/operations/listdatasets.ts +2 -2
  130. package/src/models/operations/listdatasources.ts +2 -2
  131. package/src/models/operations/retrievecontact.ts +2 -2
  132. package/src/models/operations/retrievedatapoint.ts +8 -8
  133. package/src/models/operations/retrievedataset.ts +2 -2
  134. package/src/models/operations/retrievedatasource.ts +2 -2
  135. package/src/models/operations/retrievetool.ts +10 -10
  136. package/src/models/operations/updatebudget.ts +2 -2
  137. package/src/models/operations/updatecontact.ts +2 -2
  138. package/src/models/operations/updatedatapoint.ts +8 -8
  139. package/src/models/operations/updatedataset.ts +2 -2
  140. package/src/models/operations/updatedatasource.ts +2 -2
  141. package/src/models/operations/updateeval.ts +28 -28
  142. package/src/models/operations/updatetool.ts +10 -10
  143. package/packages/orq-rc/src/funcs/agentsDuplicate.ts +0 -179
  144. package/packages/orq-rc/src/funcs/toolsDuplicate.ts +0 -176
  145. package/packages/orq-rc/src/funcs/toolsSync.ts +0 -176
  146. package/packages/orq-rc/src/mcp-server/tools/agentsDuplicate.ts +0 -37
  147. package/packages/orq-rc/src/mcp-server/tools/toolsDuplicate.ts +0 -37
  148. package/packages/orq-rc/src/mcp-server/tools/toolsSync.ts +0 -37
  149. package/packages/orq-rc/src/models/errors/duplicateagent.ts +0 -128
  150. package/packages/orq-rc/src/models/errors/duplicatetool.ts +0 -78
  151. package/packages/orq-rc/src/models/errors/getagenttask.ts +0 -67
  152. package/packages/orq-rc/src/models/operations/duplicateagent.ts +0 -3598
  153. package/packages/orq-rc/src/models/operations/duplicatetool.ts +0 -2395
  154. package/packages/orq-rc/src/models/operations/syncmcptool.ts +0 -2603
@@ -5,104 +5,27 @@
5
5
 
6
6
  ### Available Operations
7
7
 
8
- * [retrieveTask](#retrievetask) - Retrieve a specific agent task
9
8
  * [create](#create) - Create a new agent
10
- * [list](#list) - List all agents
11
9
  * [delete](#delete) - Delete an agent
12
10
  * [retrieve](#retrieve) - Get an agent
13
11
  * [update](#update) - Update an agent
14
- * [duplicate](#duplicate) - Duplicate an existing agent
15
12
  * [invoke](#invoke) - Invoke an agent
16
13
  * [listTasks](#listtasks) - List all tasks for an agent
14
+ * [retrieveTask](#retrievetask) - Retrieve a specific agent task
15
+ * [list](#list) - List all agents
17
16
  * [run](#run) - Run an agent
18
17
  * [streamRun](#streamrun) - Run and stream agent execution
19
18
  * [stream](#stream) - Stream agent execution events
20
19
  * [listActions](#listactions) - List all actions
21
20
  * [retrieveAction](#retrieveaction) - Retrieve an action executed by an agent task.
22
21
 
23
- ## retrieveTask
24
-
25
- Retrieves detailed information about a specific task for a given agent, including execution status and results.
26
-
27
- ### Example Usage
28
-
29
- <!-- UsageSnippet language="typescript" operationID="GetAgentTask" method="get" path="/v2/agents/{agent_key}/tasks/{task_id}" -->
30
- ```typescript
31
- import { Orq } from "@orq-ai/node";
32
-
33
- const orq = new Orq({
34
- apiKey: process.env["ORQ_API_KEY"] ?? "",
35
- });
36
-
37
- async function run() {
38
- const result = await orq.agents.retrieveTask({
39
- agentKey: "<value>",
40
- taskId: "<id>",
41
- });
42
-
43
- console.log(result);
44
- }
45
-
46
- run();
47
- ```
48
-
49
- ### Standalone function
50
-
51
- The standalone function version of this method:
52
-
53
- ```typescript
54
- import { OrqCore } from "@orq-ai/node/core.js";
55
- import { agentsRetrieveTask } from "@orq-ai/node/funcs/agentsRetrieveTask.js";
56
-
57
- // Use `OrqCore` for best tree-shaking performance.
58
- // You can create one instance of it to use across an application.
59
- const orq = new OrqCore({
60
- apiKey: process.env["ORQ_API_KEY"] ?? "",
61
- });
62
-
63
- async function run() {
64
- const res = await agentsRetrieveTask(orq, {
65
- agentKey: "<value>",
66
- taskId: "<id>",
67
- });
68
- if (res.ok) {
69
- const { value: result } = res;
70
- console.log(result);
71
- } else {
72
- console.log("agentsRetrieveTask failed:", res.error);
73
- }
74
- }
75
-
76
- run();
77
- ```
78
-
79
- ### Parameters
80
-
81
- | Parameter | Type | Required | Description |
82
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
83
- | `request` | [operations.GetAgentTaskRequest](../../models/operations/getagenttaskrequest.md) | :heavy_check_mark: | The request object to use for the request. |
84
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
85
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
86
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
87
-
88
- ### Response
89
-
90
- **Promise\<[operations.GetAgentTaskResponseBody](../../models/operations/getagenttaskresponsebody.md)\>**
91
-
92
- ### Errors
93
-
94
- | Error Type | Status Code | Content Type |
95
- | ------------------------------- | ------------------------------- | ------------------------------- |
96
- | errors.GetAgentTaskResponseBody | 404 | application/json |
97
- | errors.APIError | 4XX, 5XX | \*/\* |
98
-
99
22
  ## create
100
23
 
101
24
  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.
102
25
 
103
26
  ### Example Usage
104
27
 
105
- <!-- UsageSnippet language="typescript" operationID="CreateAgent" method="post" path="/v2/agents/" -->
28
+ <!-- UsageSnippet language="typescript" operationID="CreateAgent" method="post" path="/v2/agents" -->
106
29
  ```typescript
107
30
  import { Orq } from "@orq-ai/node";
108
31
 
@@ -113,13 +36,21 @@ const orq = new Orq({
113
36
  async function run() {
114
37
  const result = await orq.agents.create({
115
38
  key: "<key>",
116
- displayName: "Orion98",
117
39
  role: "<value>",
118
40
  description: "neatly unless refine aside platter alarmed shampoo shakily yippee",
119
41
  instructions: "<value>",
120
42
  path: "Default",
121
43
  model: "Camaro",
122
- settings: {},
44
+ settings: {
45
+ tools: [
46
+ {
47
+ type: "mcp",
48
+ id: "01KA84ND5J0SWQMA2Q8HY5WZZZ",
49
+ toolId: "01KXYZ123456789",
50
+ requiresApproval: false,
51
+ },
52
+ ],
53
+ },
123
54
  knowledgeBases: [
124
55
  {
125
56
  knowledgeId: "customer-knowledge-base",
@@ -150,13 +81,21 @@ const orq = new OrqCore({
150
81
  async function run() {
151
82
  const res = await agentsCreate(orq, {
152
83
  key: "<key>",
153
- displayName: "Orion98",
154
84
  role: "<value>",
155
85
  description: "neatly unless refine aside platter alarmed shampoo shakily yippee",
156
86
  instructions: "<value>",
157
87
  path: "Default",
158
88
  model: "Camaro",
159
- settings: {},
89
+ settings: {
90
+ tools: [
91
+ {
92
+ type: "mcp",
93
+ id: "01KA84ND5J0SWQMA2Q8HY5WZZZ",
94
+ toolId: "01KXYZ123456789",
95
+ requiresApproval: false,
96
+ },
97
+ ],
98
+ },
160
99
  knowledgeBases: [
161
100
  {
162
101
  knowledgeId: "customer-knowledge-base",
@@ -194,79 +133,6 @@ run();
194
133
  | errors.CreateAgentResponseBody | 409 | application/json |
195
134
  | errors.APIError | 4XX, 5XX | \*/\* |
196
135
 
197
- ## list
198
-
199
- 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.
200
-
201
- ### Example Usage
202
-
203
- <!-- UsageSnippet language="typescript" operationID="ListAgents" method="get" path="/v2/agents/" -->
204
- ```typescript
205
- import { Orq } from "@orq-ai/node";
206
-
207
- const orq = new Orq({
208
- apiKey: process.env["ORQ_API_KEY"] ?? "",
209
- });
210
-
211
- async function run() {
212
- const result = await orq.agents.list({
213
- limit: 10,
214
- });
215
-
216
- console.log(result);
217
- }
218
-
219
- run();
220
- ```
221
-
222
- ### Standalone function
223
-
224
- The standalone function version of this method:
225
-
226
- ```typescript
227
- import { OrqCore } from "@orq-ai/node/core.js";
228
- import { agentsList } from "@orq-ai/node/funcs/agentsList.js";
229
-
230
- // Use `OrqCore` for best tree-shaking performance.
231
- // You can create one instance of it to use across an application.
232
- const orq = new OrqCore({
233
- apiKey: process.env["ORQ_API_KEY"] ?? "",
234
- });
235
-
236
- async function run() {
237
- const res = await agentsList(orq, {
238
- limit: 10,
239
- });
240
- if (res.ok) {
241
- const { value: result } = res;
242
- console.log(result);
243
- } else {
244
- console.log("agentsList failed:", res.error);
245
- }
246
- }
247
-
248
- run();
249
- ```
250
-
251
- ### Parameters
252
-
253
- | Parameter | Type | Required | Description |
254
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
255
- | `request` | [operations.ListAgentsRequest](../../models/operations/listagentsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
256
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
257
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
258
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
259
-
260
- ### Response
261
-
262
- **Promise\<[operations.ListAgentsResponseBody](../../models/operations/listagentsresponsebody.md)\>**
263
-
264
- ### Errors
265
-
266
- | Error Type | Status Code | Content Type |
267
- | --------------- | --------------- | --------------- |
268
- | errors.APIError | 4XX, 5XX | \*/\* |
269
-
270
136
  ## delete
271
137
 
272
138
  Permanently deletes an agent and all its configuration, including primary and fallback model settings.
@@ -434,6 +300,16 @@ async function run() {
434
300
  agentKey: "<value>",
435
301
  requestBody: {
436
302
  model: "El Camino",
303
+ settings: {
304
+ tools: [
305
+ {
306
+ type: "mcp",
307
+ id: "01KA84ND5J0SWQMA2Q8HY5WZZZ",
308
+ toolId: "01KXYZ123456789",
309
+ requiresApproval: false,
310
+ },
311
+ ],
312
+ },
437
313
  path: "Default",
438
314
  knowledgeBases: [
439
315
  {
@@ -468,6 +344,16 @@ async function run() {
468
344
  agentKey: "<value>",
469
345
  requestBody: {
470
346
  model: "El Camino",
347
+ settings: {
348
+ tools: [
349
+ {
350
+ type: "mcp",
351
+ id: "01KA84ND5J0SWQMA2Q8HY5WZZZ",
352
+ toolId: "01KXYZ123456789",
353
+ requiresApproval: false,
354
+ },
355
+ ],
356
+ },
471
357
  path: "Default",
472
358
  knowledgeBases: [
473
359
  {
@@ -507,81 +393,6 @@ run();
507
393
  | errors.UpdateAgentResponseBody | 404 | application/json |
508
394
  | errors.APIError | 4XX, 5XX | \*/\* |
509
395
 
510
- ## duplicate
511
-
512
- Creates a copy of an existing agent with a new unique key. The duplicated agent will have all the same configuration as the original, including model settings, instructions, tools, and knowledge bases.
513
-
514
- ### Example Usage
515
-
516
- <!-- UsageSnippet language="typescript" operationID="DuplicateAgent" method="post" path="/v2/agents/{id}/duplicate" -->
517
- ```typescript
518
- import { Orq } from "@orq-ai/node";
519
-
520
- const orq = new Orq({
521
- apiKey: process.env["ORQ_API_KEY"] ?? "",
522
- });
523
-
524
- async function run() {
525
- const result = await orq.agents.duplicate({
526
- id: "<id>",
527
- });
528
-
529
- console.log(result);
530
- }
531
-
532
- run();
533
- ```
534
-
535
- ### Standalone function
536
-
537
- The standalone function version of this method:
538
-
539
- ```typescript
540
- import { OrqCore } from "@orq-ai/node/core.js";
541
- import { agentsDuplicate } from "@orq-ai/node/funcs/agentsDuplicate.js";
542
-
543
- // Use `OrqCore` for best tree-shaking performance.
544
- // You can create one instance of it to use across an application.
545
- const orq = new OrqCore({
546
- apiKey: process.env["ORQ_API_KEY"] ?? "",
547
- });
548
-
549
- async function run() {
550
- const res = await agentsDuplicate(orq, {
551
- id: "<id>",
552
- });
553
- if (res.ok) {
554
- const { value: result } = res;
555
- console.log(result);
556
- } else {
557
- console.log("agentsDuplicate failed:", res.error);
558
- }
559
- }
560
-
561
- run();
562
- ```
563
-
564
- ### Parameters
565
-
566
- | Parameter | Type | Required | Description |
567
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
568
- | `request` | [operations.DuplicateAgentRequest](../../models/operations/duplicateagentrequest.md) | :heavy_check_mark: | The request object to use for the request. |
569
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
570
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
571
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
572
-
573
- ### Response
574
-
575
- **Promise\<[operations.DuplicateAgentResponseBody](../../models/operations/duplicateagentresponsebody.md)\>**
576
-
577
- ### Errors
578
-
579
- | Error Type | Status Code | Content Type |
580
- | --------------------------------------- | --------------------------------------- | --------------------------------------- |
581
- | errors.DuplicateAgentResponseBody | 404 | application/json |
582
- | errors.DuplicateAgentAgentsResponseBody | 409 | application/json |
583
- | errors.APIError | 4XX, 5XX | \*/\* |
584
-
585
396
  ## invoke
586
397
 
587
398
  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.
@@ -705,7 +516,7 @@ run();
705
516
 
706
517
  ### Response
707
518
 
708
- **Promise\<[operations.InvokeAgentResponseBody](../../models/operations/invokeagentresponsebody.md)\>**
519
+ **Promise\<[operations.InvokeAgentA2ATaskResponse](../../models/operations/invokeagenta2ataskresponse.md)\>**
709
520
 
710
521
  ### Errors
711
522
 
@@ -778,7 +589,7 @@ run();
778
589
 
779
590
  ### Response
780
591
 
781
- **Promise\<[operations.ListAgentTasksResponseBody](../../models/operations/listagenttasksresponsebody.md)\>**
592
+ **Promise\<[operations.ListAgentTasksAgentTasksListResponse](../../models/operations/listagenttasksagenttaskslistresponse.md)\>**
782
593
 
783
594
  ### Errors
784
595
 
@@ -787,6 +598,155 @@ run();
787
598
  | errors.ListAgentTasksResponseBody | 404 | application/json |
788
599
  | errors.APIError | 4XX, 5XX | \*/\* |
789
600
 
601
+ ## retrieveTask
602
+
603
+ Retrieves detailed information about a specific task for a given agent, including execution status and results.
604
+
605
+ ### Example Usage
606
+
607
+ <!-- UsageSnippet language="typescript" operationID="GetAgentTask" method="get" path="/v2/agents/{agent_key}/tasks/{task_id}" -->
608
+ ```typescript
609
+ import { Orq } from "@orq-ai/node";
610
+
611
+ const orq = new Orq({
612
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
613
+ });
614
+
615
+ async function run() {
616
+ const result = await orq.agents.retrieveTask({
617
+ agentKey: "<value>",
618
+ taskId: "<id>",
619
+ });
620
+
621
+ console.log(result);
622
+ }
623
+
624
+ run();
625
+ ```
626
+
627
+ ### Standalone function
628
+
629
+ The standalone function version of this method:
630
+
631
+ ```typescript
632
+ import { OrqCore } from "@orq-ai/node/core.js";
633
+ import { agentsRetrieveTask } from "@orq-ai/node/funcs/agentsRetrieveTask.js";
634
+
635
+ // Use `OrqCore` for best tree-shaking performance.
636
+ // You can create one instance of it to use across an application.
637
+ const orq = new OrqCore({
638
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
639
+ });
640
+
641
+ async function run() {
642
+ const res = await agentsRetrieveTask(orq, {
643
+ agentKey: "<value>",
644
+ taskId: "<id>",
645
+ });
646
+ if (res.ok) {
647
+ const { value: result } = res;
648
+ console.log(result);
649
+ } else {
650
+ console.log("agentsRetrieveTask failed:", res.error);
651
+ }
652
+ }
653
+
654
+ run();
655
+ ```
656
+
657
+ ### Parameters
658
+
659
+ | Parameter | Type | Required | Description |
660
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
661
+ | `request` | [operations.GetAgentTaskRequest](../../models/operations/getagenttaskrequest.md) | :heavy_check_mark: | The request object to use for the request. |
662
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
663
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
664
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
665
+
666
+ ### Response
667
+
668
+ **Promise\<[operations.GetAgentTaskExtendedTaskResponse](../../models/operations/getagenttaskextendedtaskresponse.md)\>**
669
+
670
+ ### Errors
671
+
672
+ | Error Type | Status Code | Content Type |
673
+ | ------------------- | ------------------- | ------------------- |
674
+ | errors.HonoApiError | 404 | application/json |
675
+ | errors.APIError | 4XX, 5XX | \*/\* |
676
+
677
+ ## list
678
+
679
+ 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.
680
+
681
+ ### Example Usage
682
+
683
+ <!-- UsageSnippet language="typescript" operationID="ListAgents" method="get" path="/v2/agents/" -->
684
+ ```typescript
685
+ import { Orq } from "@orq-ai/node";
686
+
687
+ const orq = new Orq({
688
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
689
+ });
690
+
691
+ async function run() {
692
+ const result = await orq.agents.list({
693
+ limit: 10,
694
+ });
695
+
696
+ console.log(result);
697
+ }
698
+
699
+ run();
700
+ ```
701
+
702
+ ### Standalone function
703
+
704
+ The standalone function version of this method:
705
+
706
+ ```typescript
707
+ import { OrqCore } from "@orq-ai/node/core.js";
708
+ import { agentsList } from "@orq-ai/node/funcs/agentsList.js";
709
+
710
+ // Use `OrqCore` for best tree-shaking performance.
711
+ // You can create one instance of it to use across an application.
712
+ const orq = new OrqCore({
713
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
714
+ });
715
+
716
+ async function run() {
717
+ const res = await agentsList(orq, {
718
+ limit: 10,
719
+ });
720
+ if (res.ok) {
721
+ const { value: result } = res;
722
+ console.log(result);
723
+ } else {
724
+ console.log("agentsList failed:", res.error);
725
+ }
726
+ }
727
+
728
+ run();
729
+ ```
730
+
731
+ ### Parameters
732
+
733
+ | Parameter | Type | Required | Description |
734
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
735
+ | `request` | [operations.ListAgentsRequest](../../models/operations/listagentsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
736
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
737
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
738
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
739
+
740
+ ### Response
741
+
742
+ **Promise\<[operations.ListAgentsResponseBody](../../models/operations/listagentsresponsebody.md)\>**
743
+
744
+ ### Errors
745
+
746
+ | Error Type | Status Code | Content Type |
747
+ | --------------- | --------------- | --------------- |
748
+ | errors.APIError | 4XX, 5XX | \*/\* |
749
+
790
750
  ## run
791
751
 
792
752
  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.
@@ -940,7 +900,7 @@ run();
940
900
 
941
901
  ### Response
942
902
 
943
- **Promise\<[operations.RunAgentResponseBody](../../models/operations/runagentresponsebody.md)\>**
903
+ **Promise\<[operations.RunAgentA2ATaskResponse](../../models/operations/runagenta2ataskresponse.md)\>**
944
904
 
945
905
  ### Errors
946
906
 
@@ -29,6 +29,7 @@ async function run() {
29
29
  chunkSize: 256,
30
30
  threshold: 0.8,
31
31
  embeddingModel: "openai/text-embedding-3-small",
32
+ dimensions: 512,
32
33
  mode: "window",
33
34
  similarityWindow: 1,
34
35
  });
@@ -61,6 +62,7 @@ async function run() {
61
62
  chunkSize: 256,
62
63
  threshold: 0.8,
63
64
  embeddingModel: "openai/text-embedding-3-small",
65
+ dimensions: 512,
64
66
  mode: "window",
65
67
  similarityWindow: 1,
66
68
  });
@@ -170,10 +170,9 @@ run();
170
170
 
171
171
  ### Errors
172
172
 
173
- | Error Type | Status Code | Content Type |
174
- | ------------------- | ------------------- | ------------------- |
175
- | errors.HonoApiError | 400 | application/json |
176
- | errors.APIError | 4XX, 5XX | \*/\* |
173
+ | Error Type | Status Code | Content Type |
174
+ | --------------- | --------------- | --------------- |
175
+ | errors.APIError | 4XX, 5XX | \*/\* |
177
176
 
178
177
  ## retrieve
179
178