@orq-ai/node 3.13.9 → 3.13.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +107 -93
- package/bin/mcp-server.js +43652 -40649
- package/bin/mcp-server.js.map +117 -98
- package/docs/sdks/agents/README.md +566 -0
- package/examples/package-lock.json +1 -1
- package/funcs/agentsCreate.d.ts +18 -0
- package/funcs/agentsCreate.d.ts.map +1 -0
- package/funcs/agentsCreate.js +120 -0
- package/funcs/agentsCreate.js.map +1 -0
- package/funcs/agentsDelete.d.ts +18 -0
- package/funcs/agentsDelete.d.ts.map +1 -0
- package/funcs/agentsDelete.js +124 -0
- package/funcs/agentsDelete.js.map +1 -0
- package/funcs/agentsInvoke.d.ts +17 -0
- package/funcs/agentsInvoke.d.ts.map +1 -0
- package/funcs/agentsInvoke.js +120 -0
- package/funcs/agentsInvoke.js.map +1 -0
- package/funcs/agentsStream.d.ts +19 -0
- package/funcs/agentsStream.d.ts.map +1 -0
- package/funcs/agentsStream.js +134 -0
- package/funcs/agentsStream.js.map +1 -0
- package/funcs/agentsUpdate.d.ts +18 -0
- package/funcs/agentsUpdate.d.ts.map +1 -0
- package/funcs/agentsUpdate.js +124 -0
- package/funcs/agentsUpdate.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/lib/config.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/mcp-server.js.map +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +11 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/agentsCreate.d.ts +8 -0
- package/mcp-server/tools/agentsCreate.d.ts.map +1 -0
- package/mcp-server/tools/agentsCreate.js +64 -0
- package/mcp-server/tools/agentsCreate.js.map +1 -0
- package/mcp-server/tools/agentsDelete.d.ts +8 -0
- package/mcp-server/tools/agentsDelete.d.ts.map +1 -0
- package/mcp-server/tools/agentsDelete.js +63 -0
- package/mcp-server/tools/agentsDelete.js.map +1 -0
- package/mcp-server/tools/agentsInvoke.d.ts +8 -0
- package/mcp-server/tools/agentsInvoke.d.ts.map +1 -0
- package/mcp-server/tools/agentsInvoke.js +64 -0
- package/mcp-server/tools/agentsInvoke.js.map +1 -0
- package/mcp-server/tools/agentsStream.d.ts +8 -0
- package/mcp-server/tools/agentsStream.d.ts.map +1 -0
- package/mcp-server/tools/agentsStream.js +64 -0
- package/mcp-server/tools/agentsStream.js.map +1 -0
- package/mcp-server/tools/agentsUpdate.d.ts +8 -0
- package/mcp-server/tools/agentsUpdate.d.ts.map +1 -0
- package/mcp-server/tools/agentsUpdate.js +64 -0
- package/mcp-server/tools/agentsUpdate.js.map +1 -0
- package/models/errors/createagent.d.ts +41 -0
- package/models/errors/createagent.d.ts.map +1 -0
- package/models/errors/createagent.js +85 -0
- package/models/errors/createagent.js.map +1 -0
- package/models/errors/deleteagent.d.ts +41 -0
- package/models/errors/deleteagent.d.ts.map +1 -0
- package/models/errors/deleteagent.js +85 -0
- package/models/errors/deleteagent.js.map +1 -0
- package/models/errors/index.d.ts +4 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +4 -0
- package/models/errors/index.js.map +1 -1
- package/models/errors/streamagent.d.ts +41 -0
- package/models/errors/streamagent.d.ts.map +1 -0
- package/models/errors/streamagent.js +85 -0
- package/models/errors/streamagent.js.map +1 -0
- package/models/errors/updateagent.d.ts +41 -0
- package/models/errors/updateagent.d.ts.map +1 -0
- package/models/errors/updateagent.js +85 -0
- package/models/errors/updateagent.js.map +1 -0
- package/models/operations/createagent.d.ts +1504 -0
- package/models/operations/createagent.d.ts.map +1 -0
- package/models/operations/createagent.js +1530 -0
- package/models/operations/createagent.js.map +1 -0
- package/models/operations/createbudget.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +2 -2
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.js +28 -28
- package/models/operations/createtool.d.ts +20 -20
- package/models/operations/createtool.d.ts.map +1 -1
- package/models/operations/createtool.js +34 -34
- package/models/operations/createtool.js.map +1 -1
- package/models/operations/deleteagent.d.ts +32 -0
- package/models/operations/deleteagent.d.ts.map +1 -0
- package/models/operations/deleteagent.js +78 -0
- package/models/operations/deleteagent.js.map +1 -0
- package/models/operations/duplicatetool.d.ts +10 -10
- package/models/operations/duplicatetool.d.ts.map +1 -1
- package/models/operations/duplicatetool.js +20 -20
- package/models/operations/duplicatetool.js.map +1 -1
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getagent.d.ts +44 -175
- package/models/operations/getagent.d.ts.map +1 -1
- package/models/operations/getagent.js +51 -184
- package/models/operations/getagent.js.map +1 -1
- package/models/operations/getalltools.d.ts +10 -10
- package/models/operations/getalltools.d.ts.map +1 -1
- package/models/operations/getalltools.js +20 -20
- package/models/operations/getalltools.js.map +1 -1
- package/models/operations/getbudget.js +2 -2
- package/models/operations/getevals.js +28 -28
- package/models/operations/index.d.ts +5 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +5 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/invokeagent.d.ts +912 -0
- package/models/operations/invokeagent.d.ts.map +1 -0
- package/models/operations/invokeagent.js +824 -0
- package/models/operations/invokeagent.js.map +1 -0
- package/models/operations/listagents.d.ts +6 -137
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js +3 -139
- package/models/operations/listagents.js.map +1 -1
- package/models/operations/listagenttasks.d.ts +5 -0
- package/models/operations/listagenttasks.d.ts.map +1 -1
- package/models/operations/listagenttasks.js +2 -0
- package/models/operations/listagenttasks.js.map +1 -1
- package/models/operations/listbudgets.js +2 -2
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.js +2 -2
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/retrievecontact.js +2 -2
- package/models/operations/retrievedatapoint.js +2 -2
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/retrievetool.d.ts +10 -10
- package/models/operations/retrievetool.d.ts.map +1 -1
- package/models/operations/retrievetool.js +20 -20
- package/models/operations/retrievetool.js.map +1 -1
- package/models/operations/runagent.d.ts +640 -721
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +817 -928
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/streamagent.d.ts +676 -0
- package/models/operations/streamagent.d.ts.map +1 -0
- package/models/operations/streamagent.js +670 -0
- package/models/operations/streamagent.js.map +1 -0
- package/models/operations/streamrunagent.d.ts +567 -648
- package/models/operations/streamrunagent.d.ts.map +1 -1
- package/models/operations/streamrunagent.js +721 -835
- package/models/operations/streamrunagent.js.map +1 -1
- package/models/operations/updateagent.d.ts +1515 -0
- package/models/operations/updateagent.d.ts.map +1 -0
- package/models/operations/updateagent.js +1576 -0
- package/models/operations/updateagent.js.map +1 -0
- package/models/operations/updatebudget.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updatedatapoint.js +2 -2
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.js +28 -28
- package/models/operations/updatetool.d.ts +18 -18
- package/models/operations/updatetool.d.ts.map +1 -1
- package/models/operations/updatetool.js +36 -36
- package/models/operations/updatetool.js.map +1 -1
- package/package.json +1 -1
- package/packages/orq-rc/README.md +103 -94
- package/packages/orq-rc/docs/sdks/agents/README.md +297 -0
- package/packages/orq-rc/examples/package-lock.json +1 -1
- package/packages/orq-rc/jsr.json +1 -1
- package/packages/orq-rc/package-lock.json +2 -2
- package/packages/orq-rc/package.json +1 -1
- package/packages/orq-rc/src/funcs/agentsCreate.ts +172 -0
- package/packages/orq-rc/src/funcs/agentsDelete.ts +176 -0
- package/packages/orq-rc/src/funcs/agentsUpdate.ts +176 -0
- package/packages/orq-rc/src/lib/config.ts +2 -2
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
- package/packages/orq-rc/src/mcp-server/server.ts +7 -1
- package/packages/orq-rc/src/mcp-server/tools/agentsCreate.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsDelete.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsUpdate.ts +37 -0
- package/packages/orq-rc/src/models/errors/createagent.ts +80 -0
- package/packages/orq-rc/src/models/errors/deleteagent.ts +80 -0
- package/packages/orq-rc/src/models/errors/index.ts +3 -0
- package/packages/orq-rc/src/models/errors/updateagent.ts +80 -0
- package/packages/orq-rc/src/models/operations/createagent.ts +3027 -0
- package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +8 -8
- package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/createeval.ts +28 -28
- package/packages/orq-rc/src/models/operations/createtool.ts +50 -50
- package/packages/orq-rc/src/models/operations/deleteagent.ts +78 -0
- package/packages/orq-rc/src/models/operations/duplicatetool.ts +30 -30
- package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
- package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
- package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
- package/packages/orq-rc/src/models/operations/getagent.ts +87 -387
- package/packages/orq-rc/src/models/operations/getalltools.ts +33 -33
- package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
- package/packages/orq-rc/src/models/operations/index.ts +3 -0
- package/packages/orq-rc/src/models/operations/invokeagent.ts +12 -4
- package/packages/orq-rc/src/models/operations/listagents.ts +8 -321
- package/packages/orq-rc/src/models/operations/listagenttasks.ts +7 -0
- package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +8 -8
- package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +8 -8
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievetool.ts +30 -30
- package/packages/orq-rc/src/models/operations/runagent.ts +1003 -1113
- package/packages/orq-rc/src/models/operations/streamagent.ts +4 -2
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +1276 -1427
- package/packages/orq-rc/src/models/operations/updateagent.ts +3239 -0
- package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +8 -8
- package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/updateeval.ts +28 -28
- package/packages/orq-rc/src/models/operations/updatetool.ts +56 -56
- package/packages/orq-rc/src/sdk/agents.ts +54 -0
- package/sdk/agents.d.ts +35 -0
- package/sdk/agents.d.ts.map +1 -1
- package/sdk/agents.js +50 -0
- package/sdk/agents.js.map +1 -1
- package/src/funcs/agentsCreate.ts +172 -0
- package/src/funcs/agentsDelete.ts +176 -0
- package/src/funcs/agentsInvoke.ts +167 -0
- package/src/funcs/agentsStream.ts +191 -0
- package/src/funcs/agentsUpdate.ts +176 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +11 -1
- package/src/mcp-server/tools/agentsCreate.ts +37 -0
- package/src/mcp-server/tools/agentsDelete.ts +35 -0
- package/src/mcp-server/tools/agentsInvoke.ts +37 -0
- package/src/mcp-server/tools/agentsStream.ts +37 -0
- package/src/mcp-server/tools/agentsUpdate.ts +37 -0
- package/src/models/errors/createagent.ts +80 -0
- package/src/models/errors/deleteagent.ts +80 -0
- package/src/models/errors/index.ts +4 -0
- package/src/models/errors/streamagent.ts +80 -0
- package/src/models/errors/updateagent.ts +80 -0
- package/src/models/operations/createagent.ts +3021 -0
- package/src/models/operations/createbudget.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +2 -2
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +28 -28
- package/src/models/operations/createtool.ts +54 -54
- package/src/models/operations/deleteagent.ts +78 -0
- package/src/models/operations/duplicatetool.ts +30 -30
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/getagent.ts +87 -387
- package/src/models/operations/getalltools.ts +30 -30
- package/src/models/operations/getbudget.ts +2 -2
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/index.ts +5 -0
- package/src/models/operations/invokeagent.ts +1569 -0
- package/src/models/operations/listagents.ts +8 -321
- package/src/models/operations/listagenttasks.ts +7 -0
- package/src/models/operations/listbudgets.ts +2 -2
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/retrievecontact.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +2 -2
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/retrievetool.ts +30 -30
- package/src/models/operations/runagent.ts +1441 -1488
- package/src/models/operations/streamagent.ts +1367 -0
- package/src/models/operations/streamrunagent.ts +1542 -1657
- package/src/models/operations/updateagent.ts +3227 -0
- package/src/models/operations/updatebudget.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +2 -2
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +28 -28
- package/src/models/operations/updatetool.ts +60 -60
- package/src/sdk/agents.ts +90 -0
|
@@ -6,11 +6,16 @@
|
|
|
6
6
|
### Available Operations
|
|
7
7
|
|
|
8
8
|
* [retrieveTask](#retrievetask) - Retrieve a specific agent task
|
|
9
|
+
* [create](#create) - Create a new agent
|
|
9
10
|
* [list](#list) - List all agents
|
|
11
|
+
* [delete](#delete) - Delete an agent
|
|
10
12
|
* [retrieve](#retrieve) - Get an agent
|
|
13
|
+
* [update](#update) - Update an agent
|
|
14
|
+
* [invoke](#invoke) - Invoke an agent
|
|
11
15
|
* [listTasks](#listtasks) - List all tasks for an agent
|
|
12
16
|
* [run](#run) - Run an agent
|
|
13
17
|
* [streamRun](#streamrun) - Run and stream agent execution
|
|
18
|
+
* [stream](#stream) - Stream agent execution events
|
|
14
19
|
* [listActions](#listactions) - List all actions
|
|
15
20
|
* [retrieveAction](#retrieveaction) - Retrieve an action executed by an agent task.
|
|
16
21
|
|
|
@@ -90,6 +95,116 @@ run();
|
|
|
90
95
|
| errors.GetAgentTaskResponseBody | 404 | application/json |
|
|
91
96
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
92
97
|
|
|
98
|
+
## create
|
|
99
|
+
|
|
100
|
+
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.
|
|
101
|
+
|
|
102
|
+
### Example Usage
|
|
103
|
+
|
|
104
|
+
<!-- UsageSnippet language="typescript" operationID="CreateAgent" method="post" path="/v2/agents/" -->
|
|
105
|
+
```typescript
|
|
106
|
+
import { Orq } from "@orq-ai/node";
|
|
107
|
+
|
|
108
|
+
const orq = new Orq({
|
|
109
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
async function run() {
|
|
113
|
+
const result = await orq.agents.create({
|
|
114
|
+
path: "Default",
|
|
115
|
+
key: "<key>",
|
|
116
|
+
role: "<value>",
|
|
117
|
+
description: "neatly unless refine aside platter alarmed shampoo shakily yippee",
|
|
118
|
+
instructions: "<value>",
|
|
119
|
+
model: "Camaro",
|
|
120
|
+
settings: {
|
|
121
|
+
tools: [
|
|
122
|
+
{
|
|
123
|
+
type: "http",
|
|
124
|
+
requiresApproval: false,
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
},
|
|
128
|
+
knowledgeBases: [
|
|
129
|
+
{
|
|
130
|
+
knowledgeId: "customer-knowledge-base",
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
console.log(result);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
run();
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Standalone function
|
|
142
|
+
|
|
143
|
+
The standalone function version of this method:
|
|
144
|
+
|
|
145
|
+
```typescript
|
|
146
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
147
|
+
import { agentsCreate } from "@orq-ai/node/funcs/agentsCreate.js";
|
|
148
|
+
|
|
149
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
150
|
+
// You can create one instance of it to use across an application.
|
|
151
|
+
const orq = new OrqCore({
|
|
152
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
async function run() {
|
|
156
|
+
const res = await agentsCreate(orq, {
|
|
157
|
+
path: "Default",
|
|
158
|
+
key: "<key>",
|
|
159
|
+
role: "<value>",
|
|
160
|
+
description: "neatly unless refine aside platter alarmed shampoo shakily yippee",
|
|
161
|
+
instructions: "<value>",
|
|
162
|
+
model: "Camaro",
|
|
163
|
+
settings: {
|
|
164
|
+
tools: [
|
|
165
|
+
{
|
|
166
|
+
type: "http",
|
|
167
|
+
requiresApproval: false,
|
|
168
|
+
},
|
|
169
|
+
],
|
|
170
|
+
},
|
|
171
|
+
knowledgeBases: [
|
|
172
|
+
{
|
|
173
|
+
knowledgeId: "customer-knowledge-base",
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
});
|
|
177
|
+
if (res.ok) {
|
|
178
|
+
const { value: result } = res;
|
|
179
|
+
console.log(result);
|
|
180
|
+
} else {
|
|
181
|
+
console.log("agentsCreate failed:", res.error);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
run();
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Parameters
|
|
189
|
+
|
|
190
|
+
| Parameter | Type | Required | Description |
|
|
191
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
192
|
+
| `request` | [operations.CreateAgentRequestBody](../../models/operations/createagentrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
193
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
194
|
+
| `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. |
|
|
195
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
196
|
+
|
|
197
|
+
### Response
|
|
198
|
+
|
|
199
|
+
**Promise\<[operations.CreateAgentResponseBody](../../models/operations/createagentresponsebody.md)\>**
|
|
200
|
+
|
|
201
|
+
### Errors
|
|
202
|
+
|
|
203
|
+
| Error Type | Status Code | Content Type |
|
|
204
|
+
| ------------------------------ | ------------------------------ | ------------------------------ |
|
|
205
|
+
| errors.CreateAgentResponseBody | 409 | application/json |
|
|
206
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
207
|
+
|
|
93
208
|
## list
|
|
94
209
|
|
|
95
210
|
Retrieves a paginated list of all agents in your workspace. Each agent includes its configuration, primary model, and optional fallback model settings.
|
|
@@ -159,6 +274,80 @@ run();
|
|
|
159
274
|
| --------------- | --------------- | --------------- |
|
|
160
275
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
161
276
|
|
|
277
|
+
## delete
|
|
278
|
+
|
|
279
|
+
Permanently deletes an agent and all its configuration, including primary and fallback model settings.
|
|
280
|
+
|
|
281
|
+
### Example Usage
|
|
282
|
+
|
|
283
|
+
<!-- UsageSnippet language="typescript" operationID="DeleteAgent" method="delete" path="/v2/agents/{agent_key}" -->
|
|
284
|
+
```typescript
|
|
285
|
+
import { Orq } from "@orq-ai/node";
|
|
286
|
+
|
|
287
|
+
const orq = new Orq({
|
|
288
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
async function run() {
|
|
292
|
+
await orq.agents.delete({
|
|
293
|
+
agentKey: "<value>",
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
run();
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
### Standalone function
|
|
303
|
+
|
|
304
|
+
The standalone function version of this method:
|
|
305
|
+
|
|
306
|
+
```typescript
|
|
307
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
308
|
+
import { agentsDelete } from "@orq-ai/node/funcs/agentsDelete.js";
|
|
309
|
+
|
|
310
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
311
|
+
// You can create one instance of it to use across an application.
|
|
312
|
+
const orq = new OrqCore({
|
|
313
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
async function run() {
|
|
317
|
+
const res = await agentsDelete(orq, {
|
|
318
|
+
agentKey: "<value>",
|
|
319
|
+
});
|
|
320
|
+
if (res.ok) {
|
|
321
|
+
const { value: result } = res;
|
|
322
|
+
|
|
323
|
+
} else {
|
|
324
|
+
console.log("agentsDelete failed:", res.error);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
run();
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### Parameters
|
|
332
|
+
|
|
333
|
+
| Parameter | Type | Required | Description |
|
|
334
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
335
|
+
| `request` | [operations.DeleteAgentRequest](../../models/operations/deleteagentrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
336
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
337
|
+
| `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. |
|
|
338
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
339
|
+
|
|
340
|
+
### Response
|
|
341
|
+
|
|
342
|
+
**Promise\<void\>**
|
|
343
|
+
|
|
344
|
+
### Errors
|
|
345
|
+
|
|
346
|
+
| Error Type | Status Code | Content Type |
|
|
347
|
+
| ------------------------------ | ------------------------------ | ------------------------------ |
|
|
348
|
+
| errors.DeleteAgentResponseBody | 404 | application/json |
|
|
349
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
350
|
+
|
|
162
351
|
## retrieve
|
|
163
352
|
|
|
164
353
|
Retrieves a single agent by its unique key, including its full configuration with primary and fallback model settings.
|
|
@@ -233,6 +422,227 @@ run();
|
|
|
233
422
|
| errors.GetAgentResponseBody | 404 | application/json |
|
|
234
423
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
235
424
|
|
|
425
|
+
## update
|
|
426
|
+
|
|
427
|
+
Updates an existing agent's configuration. You can update various fields including the model configuration and fallback model settings.
|
|
428
|
+
|
|
429
|
+
### Example Usage
|
|
430
|
+
|
|
431
|
+
<!-- UsageSnippet language="typescript" operationID="UpdateAgent" method="patch" path="/v2/agents/{agent_key}" -->
|
|
432
|
+
```typescript
|
|
433
|
+
import { Orq } from "@orq-ai/node";
|
|
434
|
+
|
|
435
|
+
const orq = new Orq({
|
|
436
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
437
|
+
});
|
|
438
|
+
|
|
439
|
+
async function run() {
|
|
440
|
+
const result = await orq.agents.update({
|
|
441
|
+
agentKey: "<value>",
|
|
442
|
+
requestBody: {
|
|
443
|
+
path: "Default",
|
|
444
|
+
knowledgeBases: [
|
|
445
|
+
{
|
|
446
|
+
knowledgeId: "customer-knowledge-base",
|
|
447
|
+
},
|
|
448
|
+
],
|
|
449
|
+
},
|
|
450
|
+
});
|
|
451
|
+
|
|
452
|
+
console.log(result);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
run();
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
### Standalone function
|
|
459
|
+
|
|
460
|
+
The standalone function version of this method:
|
|
461
|
+
|
|
462
|
+
```typescript
|
|
463
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
464
|
+
import { agentsUpdate } from "@orq-ai/node/funcs/agentsUpdate.js";
|
|
465
|
+
|
|
466
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
467
|
+
// You can create one instance of it to use across an application.
|
|
468
|
+
const orq = new OrqCore({
|
|
469
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
470
|
+
});
|
|
471
|
+
|
|
472
|
+
async function run() {
|
|
473
|
+
const res = await agentsUpdate(orq, {
|
|
474
|
+
agentKey: "<value>",
|
|
475
|
+
requestBody: {
|
|
476
|
+
path: "Default",
|
|
477
|
+
knowledgeBases: [
|
|
478
|
+
{
|
|
479
|
+
knowledgeId: "customer-knowledge-base",
|
|
480
|
+
},
|
|
481
|
+
],
|
|
482
|
+
},
|
|
483
|
+
});
|
|
484
|
+
if (res.ok) {
|
|
485
|
+
const { value: result } = res;
|
|
486
|
+
console.log(result);
|
|
487
|
+
} else {
|
|
488
|
+
console.log("agentsUpdate failed:", res.error);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
run();
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
### Parameters
|
|
496
|
+
|
|
497
|
+
| Parameter | Type | Required | Description |
|
|
498
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
499
|
+
| `request` | [operations.UpdateAgentRequest](../../models/operations/updateagentrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
500
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
501
|
+
| `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. |
|
|
502
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
503
|
+
|
|
504
|
+
### Response
|
|
505
|
+
|
|
506
|
+
**Promise\<[operations.UpdateAgentResponseBody](../../models/operations/updateagentresponsebody.md)\>**
|
|
507
|
+
|
|
508
|
+
### Errors
|
|
509
|
+
|
|
510
|
+
| Error Type | Status Code | Content Type |
|
|
511
|
+
| ------------------------------ | ------------------------------ | ------------------------------ |
|
|
512
|
+
| errors.UpdateAgentResponseBody | 404 | application/json |
|
|
513
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
514
|
+
|
|
515
|
+
## invoke
|
|
516
|
+
|
|
517
|
+
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.
|
|
518
|
+
|
|
519
|
+
### Example Usage
|
|
520
|
+
|
|
521
|
+
<!-- UsageSnippet language="typescript" operationID="InvokeAgent" method="post" path="/v2/agents/{key}/task" -->
|
|
522
|
+
```typescript
|
|
523
|
+
import { Orq } from "@orq-ai/node";
|
|
524
|
+
|
|
525
|
+
const orq = new Orq({
|
|
526
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
527
|
+
});
|
|
528
|
+
|
|
529
|
+
async function run() {
|
|
530
|
+
const result = await orq.agents.invoke({
|
|
531
|
+
key: "<key>",
|
|
532
|
+
requestBody: {
|
|
533
|
+
message: {
|
|
534
|
+
role: "user",
|
|
535
|
+
parts: [],
|
|
536
|
+
},
|
|
537
|
+
contact: {
|
|
538
|
+
id: "contact_01ARZ3NDEKTSV4RRFFQ69G5FAV",
|
|
539
|
+
displayName: "Jane Doe",
|
|
540
|
+
email: "jane.doe@example.com",
|
|
541
|
+
metadata: [
|
|
542
|
+
{
|
|
543
|
+
"department": "Engineering",
|
|
544
|
+
"role": "Senior Developer",
|
|
545
|
+
},
|
|
546
|
+
],
|
|
547
|
+
logoUrl: "https://example.com/avatars/jane-doe.jpg",
|
|
548
|
+
tags: [
|
|
549
|
+
"hr",
|
|
550
|
+
"engineering",
|
|
551
|
+
],
|
|
552
|
+
},
|
|
553
|
+
thread: {
|
|
554
|
+
id: "thread_01ARZ3NDEKTSV4RRFFQ69G5FAV",
|
|
555
|
+
tags: [
|
|
556
|
+
"customer-support",
|
|
557
|
+
"priority-high",
|
|
558
|
+
],
|
|
559
|
+
},
|
|
560
|
+
},
|
|
561
|
+
});
|
|
562
|
+
|
|
563
|
+
console.log(result);
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
run();
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
### Standalone function
|
|
570
|
+
|
|
571
|
+
The standalone function version of this method:
|
|
572
|
+
|
|
573
|
+
```typescript
|
|
574
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
575
|
+
import { agentsInvoke } from "@orq-ai/node/funcs/agentsInvoke.js";
|
|
576
|
+
|
|
577
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
578
|
+
// You can create one instance of it to use across an application.
|
|
579
|
+
const orq = new OrqCore({
|
|
580
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
581
|
+
});
|
|
582
|
+
|
|
583
|
+
async function run() {
|
|
584
|
+
const res = await agentsInvoke(orq, {
|
|
585
|
+
key: "<key>",
|
|
586
|
+
requestBody: {
|
|
587
|
+
message: {
|
|
588
|
+
role: "user",
|
|
589
|
+
parts: [],
|
|
590
|
+
},
|
|
591
|
+
contact: {
|
|
592
|
+
id: "contact_01ARZ3NDEKTSV4RRFFQ69G5FAV",
|
|
593
|
+
displayName: "Jane Doe",
|
|
594
|
+
email: "jane.doe@example.com",
|
|
595
|
+
metadata: [
|
|
596
|
+
{
|
|
597
|
+
"department": "Engineering",
|
|
598
|
+
"role": "Senior Developer",
|
|
599
|
+
},
|
|
600
|
+
],
|
|
601
|
+
logoUrl: "https://example.com/avatars/jane-doe.jpg",
|
|
602
|
+
tags: [
|
|
603
|
+
"hr",
|
|
604
|
+
"engineering",
|
|
605
|
+
],
|
|
606
|
+
},
|
|
607
|
+
thread: {
|
|
608
|
+
id: "thread_01ARZ3NDEKTSV4RRFFQ69G5FAV",
|
|
609
|
+
tags: [
|
|
610
|
+
"customer-support",
|
|
611
|
+
"priority-high",
|
|
612
|
+
],
|
|
613
|
+
},
|
|
614
|
+
},
|
|
615
|
+
});
|
|
616
|
+
if (res.ok) {
|
|
617
|
+
const { value: result } = res;
|
|
618
|
+
console.log(result);
|
|
619
|
+
} else {
|
|
620
|
+
console.log("agentsInvoke failed:", res.error);
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
run();
|
|
625
|
+
```
|
|
626
|
+
|
|
627
|
+
### Parameters
|
|
628
|
+
|
|
629
|
+
| Parameter | Type | Required | Description |
|
|
630
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
631
|
+
| `request` | [operations.InvokeAgentRequest](../../models/operations/invokeagentrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
632
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
633
|
+
| `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. |
|
|
634
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
635
|
+
|
|
636
|
+
### Response
|
|
637
|
+
|
|
638
|
+
**Promise\<[operations.InvokeAgentResponseBody](../../models/operations/invokeagentresponsebody.md)\>**
|
|
639
|
+
|
|
640
|
+
### Errors
|
|
641
|
+
|
|
642
|
+
| Error Type | Status Code | Content Type |
|
|
643
|
+
| --------------- | --------------- | --------------- |
|
|
644
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
645
|
+
|
|
236
646
|
## listTasks
|
|
237
647
|
|
|
238
648
|
Retrieves a paginated list of all tasks associated with a specific agent, optionally filtered by status.
|
|
@@ -360,6 +770,11 @@ async function run() {
|
|
|
360
770
|
],
|
|
361
771
|
},
|
|
362
772
|
path: "Default",
|
|
773
|
+
knowledgeBases: [
|
|
774
|
+
{
|
|
775
|
+
knowledgeId: "customer-knowledge-base",
|
|
776
|
+
},
|
|
777
|
+
],
|
|
363
778
|
settings: {
|
|
364
779
|
tools: [
|
|
365
780
|
{
|
|
@@ -429,6 +844,11 @@ async function run() {
|
|
|
429
844
|
],
|
|
430
845
|
},
|
|
431
846
|
path: "Default",
|
|
847
|
+
knowledgeBases: [
|
|
848
|
+
{
|
|
849
|
+
knowledgeId: "customer-knowledge-base",
|
|
850
|
+
},
|
|
851
|
+
],
|
|
432
852
|
settings: {
|
|
433
853
|
tools: [
|
|
434
854
|
{
|
|
@@ -523,6 +943,11 @@ async function run() {
|
|
|
523
943
|
],
|
|
524
944
|
},
|
|
525
945
|
path: "Default",
|
|
946
|
+
knowledgeBases: [
|
|
947
|
+
{
|
|
948
|
+
knowledgeId: "customer-knowledge-base",
|
|
949
|
+
},
|
|
950
|
+
],
|
|
526
951
|
settings: {
|
|
527
952
|
tools: [
|
|
528
953
|
{
|
|
@@ -596,6 +1021,11 @@ async function run() {
|
|
|
596
1021
|
],
|
|
597
1022
|
},
|
|
598
1023
|
path: "Default",
|
|
1024
|
+
knowledgeBases: [
|
|
1025
|
+
{
|
|
1026
|
+
knowledgeId: "customer-knowledge-base",
|
|
1027
|
+
},
|
|
1028
|
+
],
|
|
599
1029
|
settings: {
|
|
600
1030
|
tools: [
|
|
601
1031
|
{
|
|
@@ -638,6 +1068,142 @@ run();
|
|
|
638
1068
|
| errors.StreamRunAgentResponseBody | 404 | application/json |
|
|
639
1069
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
640
1070
|
|
|
1071
|
+
## stream
|
|
1072
|
+
|
|
1073
|
+
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.
|
|
1074
|
+
|
|
1075
|
+
### Example Usage
|
|
1076
|
+
|
|
1077
|
+
<!-- UsageSnippet language="typescript" operationID="StreamAgent" method="post" path="/v2/agents/{key}/stream-task" -->
|
|
1078
|
+
```typescript
|
|
1079
|
+
import { Orq } from "@orq-ai/node";
|
|
1080
|
+
|
|
1081
|
+
const orq = new Orq({
|
|
1082
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
1083
|
+
});
|
|
1084
|
+
|
|
1085
|
+
async function run() {
|
|
1086
|
+
const result = await orq.agents.stream({
|
|
1087
|
+
key: "<key>",
|
|
1088
|
+
requestBody: {
|
|
1089
|
+
message: {
|
|
1090
|
+
role: "user",
|
|
1091
|
+
parts: [],
|
|
1092
|
+
},
|
|
1093
|
+
contact: {
|
|
1094
|
+
id: "contact_01ARZ3NDEKTSV4RRFFQ69G5FAV",
|
|
1095
|
+
displayName: "Jane Doe",
|
|
1096
|
+
email: "jane.doe@example.com",
|
|
1097
|
+
metadata: [
|
|
1098
|
+
{
|
|
1099
|
+
"department": "Engineering",
|
|
1100
|
+
"role": "Senior Developer",
|
|
1101
|
+
},
|
|
1102
|
+
],
|
|
1103
|
+
logoUrl: "https://example.com/avatars/jane-doe.jpg",
|
|
1104
|
+
tags: [
|
|
1105
|
+
"hr",
|
|
1106
|
+
"engineering",
|
|
1107
|
+
],
|
|
1108
|
+
},
|
|
1109
|
+
thread: {
|
|
1110
|
+
id: "thread_01ARZ3NDEKTSV4RRFFQ69G5FAV",
|
|
1111
|
+
tags: [
|
|
1112
|
+
"customer-support",
|
|
1113
|
+
"priority-high",
|
|
1114
|
+
],
|
|
1115
|
+
},
|
|
1116
|
+
},
|
|
1117
|
+
});
|
|
1118
|
+
|
|
1119
|
+
for await (const event of result) {
|
|
1120
|
+
console.log(event);
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
run();
|
|
1125
|
+
```
|
|
1126
|
+
|
|
1127
|
+
### Standalone function
|
|
1128
|
+
|
|
1129
|
+
The standalone function version of this method:
|
|
1130
|
+
|
|
1131
|
+
```typescript
|
|
1132
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
1133
|
+
import { agentsStream } from "@orq-ai/node/funcs/agentsStream.js";
|
|
1134
|
+
|
|
1135
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
1136
|
+
// You can create one instance of it to use across an application.
|
|
1137
|
+
const orq = new OrqCore({
|
|
1138
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
1139
|
+
});
|
|
1140
|
+
|
|
1141
|
+
async function run() {
|
|
1142
|
+
const res = await agentsStream(orq, {
|
|
1143
|
+
key: "<key>",
|
|
1144
|
+
requestBody: {
|
|
1145
|
+
message: {
|
|
1146
|
+
role: "user",
|
|
1147
|
+
parts: [],
|
|
1148
|
+
},
|
|
1149
|
+
contact: {
|
|
1150
|
+
id: "contact_01ARZ3NDEKTSV4RRFFQ69G5FAV",
|
|
1151
|
+
displayName: "Jane Doe",
|
|
1152
|
+
email: "jane.doe@example.com",
|
|
1153
|
+
metadata: [
|
|
1154
|
+
{
|
|
1155
|
+
"department": "Engineering",
|
|
1156
|
+
"role": "Senior Developer",
|
|
1157
|
+
},
|
|
1158
|
+
],
|
|
1159
|
+
logoUrl: "https://example.com/avatars/jane-doe.jpg",
|
|
1160
|
+
tags: [
|
|
1161
|
+
"hr",
|
|
1162
|
+
"engineering",
|
|
1163
|
+
],
|
|
1164
|
+
},
|
|
1165
|
+
thread: {
|
|
1166
|
+
id: "thread_01ARZ3NDEKTSV4RRFFQ69G5FAV",
|
|
1167
|
+
tags: [
|
|
1168
|
+
"customer-support",
|
|
1169
|
+
"priority-high",
|
|
1170
|
+
],
|
|
1171
|
+
},
|
|
1172
|
+
},
|
|
1173
|
+
});
|
|
1174
|
+
if (res.ok) {
|
|
1175
|
+
const { value: result } = res;
|
|
1176
|
+
for await (const event of result) {
|
|
1177
|
+
console.log(event);
|
|
1178
|
+
}
|
|
1179
|
+
} else {
|
|
1180
|
+
console.log("agentsStream failed:", res.error);
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
run();
|
|
1185
|
+
```
|
|
1186
|
+
|
|
1187
|
+
### Parameters
|
|
1188
|
+
|
|
1189
|
+
| Parameter | Type | Required | Description |
|
|
1190
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1191
|
+
| `request` | [operations.StreamAgentRequest](../../models/operations/streamagentrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1192
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1193
|
+
| `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. |
|
|
1194
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1195
|
+
|
|
1196
|
+
### Response
|
|
1197
|
+
|
|
1198
|
+
**Promise\<[EventStream<operations.StreamAgentResponseBody>](../../models/.md)\>**
|
|
1199
|
+
|
|
1200
|
+
### Errors
|
|
1201
|
+
|
|
1202
|
+
| Error Type | Status Code | Content Type |
|
|
1203
|
+
| ------------------------------ | ------------------------------ | ------------------------------ |
|
|
1204
|
+
| errors.StreamAgentResponseBody | 404 | application/json |
|
|
1205
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
1206
|
+
|
|
641
1207
|
## listActions
|
|
642
1208
|
|
|
643
1209
|
List all actions
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { OrqCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
4
|
+
import * as errors from "../models/errors/index.js";
|
|
5
|
+
import { OrqError } from "../models/errors/orqerror.js";
|
|
6
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { APIPromise } from "../types/async.js";
|
|
10
|
+
import { Result } from "../types/fp.js";
|
|
11
|
+
/**
|
|
12
|
+
* Create a new agent
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* 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.
|
|
16
|
+
*/
|
|
17
|
+
export declare function agentsCreate(client: OrqCore, request?: operations.CreateAgentRequestBody | undefined, options?: RequestOptions): APIPromise<Result<operations.CreateAgentResponseBody, errors.CreateAgentResponseBody | OrqError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
|
+
//# sourceMappingURL=agentsCreate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentsCreate.d.ts","sourceRoot":"","sources":["../src/funcs/agentsCreate.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAKrC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,OAAO,EACf,OAAO,CAAC,EAAE,UAAU,CAAC,sBAAsB,GAAG,SAAS,EACvD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,uBAAuB,EAChC,MAAM,CAAC,uBAAuB,GAC9B,QAAQ,GACR,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|