@orq-ai/node 4.0.4 → 4.0.6
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/bin/mcp-server.js +213 -213
- package/bin/mcp-server.js.map +36 -36
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- 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 +8 -8
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.js +28 -28
- package/models/operations/createtool.js +12 -12
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getalltools.js +12 -12
- package/models/operations/getbudget.js +2 -2
- package/models/operations/getevals.js +28 -28
- package/models/operations/listbudgets.js +2 -2
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.js +8 -8
- 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 +8 -8
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/retrievetool.js +12 -12
- package/models/operations/runagent.js +2 -2
- package/models/operations/streamrunagent.js +2 -2
- package/models/operations/updatebudget.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updatedatapoint.js +8 -8
- 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.js +14 -14
- package/package.json +1 -1
- package/packages/orq-rc/README.md +38 -47
- package/packages/orq-rc/docs/sdks/agents/README.md +230 -529
- package/packages/orq-rc/docs/sdks/responses/README.md +60 -65
- 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 +16 -14
- package/packages/orq-rc/src/funcs/agentsDelete.ts +10 -6
- package/packages/orq-rc/src/funcs/agentsInvoke.ts +16 -6
- package/packages/orq-rc/src/funcs/agentsList.ts +18 -6
- package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +23 -12
- package/packages/orq-rc/src/funcs/agentsRetrieve.ts +21 -16
- package/packages/orq-rc/src/funcs/agentsRun.ts +4 -2
- package/packages/orq-rc/src/funcs/agentsStream.ts +16 -6
- package/packages/orq-rc/src/funcs/agentsStreamRun.ts +4 -2
- package/packages/orq-rc/src/funcs/agentsUpdate.ts +14 -6
- 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 +1 -9
- package/packages/orq-rc/src/mcp-server/tools/agentsCreate.ts +3 -3
- package/packages/orq-rc/src/mcp-server/tools/agentsDelete.ts +5 -5
- package/packages/orq-rc/src/mcp-server/tools/agentsInvoke.ts +7 -4
- package/packages/orq-rc/src/mcp-server/tools/agentsList.ts +9 -5
- package/packages/orq-rc/src/mcp-server/tools/agentsResponsesCreate.ts +8 -4
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieve.ts +5 -5
- package/packages/orq-rc/src/mcp-server/tools/agentsRun.ts +2 -2
- package/packages/orq-rc/src/mcp-server/tools/agentsStream.ts +7 -4
- package/packages/orq-rc/src/mcp-server/tools/agentsStreamRun.ts +2 -2
- package/packages/orq-rc/src/mcp-server/tools/agentsUpdate.ts +8 -4
- package/packages/orq-rc/src/models/errors/createagentrequest.ts +67 -0
- package/packages/orq-rc/src/models/errors/deleteagent.ts +2 -2
- package/packages/orq-rc/src/models/errors/index.ts +2 -3
- package/packages/orq-rc/src/models/errors/{listagenttasks.ts → retrieveagentrequest.ts} +15 -15
- package/packages/orq-rc/src/models/errors/updateagent.ts +2 -2
- package/packages/orq-rc/src/models/operations/{createagent.ts → createagentrequest.ts} +1643 -1485
- package/packages/orq-rc/src/models/operations/{createagentresponse.ts → createagentresponserequest.ts} +141 -127
- 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/createprompt.ts +4 -4
- package/packages/orq-rc/src/models/operations/createtool.ts +12 -12
- 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/getalltools.ts +12 -12
- 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 -7
- package/packages/orq-rc/src/models/operations/invokeagent.ts +153 -190
- package/packages/orq-rc/src/models/operations/listagents.ts +9 -21
- 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/retrieveagentrequest.ts +3741 -0
- 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 +12 -12
- package/packages/orq-rc/src/models/operations/runagent.ts +53 -57
- package/packages/orq-rc/src/models/operations/streamagent.ts +1 -1
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +68 -82
- package/packages/orq-rc/src/models/operations/updateagent.ts +17 -17
- 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/updateprompt.ts +4 -4
- package/packages/orq-rc/src/models/operations/updatetool.ts +14 -14
- package/packages/orq-rc/src/sdk/agents.ts +51 -99
- package/packages/orq-rc/src/sdk/responses.ts +7 -5
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- 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 +8 -8
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +28 -28
- package/src/models/operations/createtool.ts +12 -12
- 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/getalltools.ts +12 -12
- package/src/models/operations/getbudget.ts +2 -2
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/listbudgets.ts +2 -2
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +8 -8
- 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 +8 -8
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/retrievetool.ts +12 -12
- package/src/models/operations/runagent.ts +2 -2
- package/src/models/operations/streamrunagent.ts +2 -2
- package/src/models/operations/updatebudget.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +8 -8
- 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 +14 -14
- package/packages/orq-rc/src/funcs/agentsListActions.ts +0 -169
- package/packages/orq-rc/src/funcs/agentsListTasks.ts +0 -183
- package/packages/orq-rc/src/funcs/agentsRetrieveAction.ts +0 -173
- package/packages/orq-rc/src/funcs/agentsRetrieveTask.ts +0 -179
- package/packages/orq-rc/src/mcp-server/tools/agentsListActions.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/agentsListTasks.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveAction.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveTask.ts +0 -37
- package/packages/orq-rc/src/models/errors/createagent.ts +0 -67
- package/packages/orq-rc/src/models/errors/getagent.ts +0 -67
- package/packages/orq-rc/src/models/operations/getagent.ts +0 -3480
- package/packages/orq-rc/src/models/operations/getagenttask.ts +0 -2389
- package/packages/orq-rc/src/models/operations/listactions.ts +0 -427
- package/packages/orq-rc/src/models/operations/listagenttasks.ts +0 -2614
- 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
|
|
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
|
|
31
|
+
* Stream agent execution in real-time
|
|
32
32
|
*
|
|
33
33
|
* @remarks
|
|
34
|
-
* Executes an agent and streams
|
|
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
|
-
|
|
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
|
-
|
|
59
|
+
key,
|
|
60
|
+
requestBody,
|
|
57
61
|
options,
|
|
58
62
|
));
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
async function $do(
|
|
62
66
|
client: OrqCore,
|
|
63
|
-
|
|
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
|
-
|
|
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
|
|
31
|
+
* Run agent with streaming response
|
|
32
32
|
*
|
|
33
33
|
* @remarks
|
|
34
|
-
*
|
|
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
|
|
29
|
+
* Update agent
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
*
|
|
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
|
-
|
|
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
|
-
|
|
55
|
+
agentKey,
|
|
56
|
+
requestBody,
|
|
55
57
|
options,
|
|
56
58
|
));
|
|
57
59
|
}
|
|
58
60
|
|
|
59
61
|
async function $do(
|
|
60
62
|
client: OrqCore,
|
|
61
|
-
|
|
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
|
-
|
|
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.
|
|
71
|
+
sdkVersion: "4.1.0-rc.1",
|
|
72
72
|
genVersion: "2.760.2",
|
|
73
|
-
userAgent: "speakeasy-sdk/typescript 4.
|
|
73
|
+
userAgent: "speakeasy-sdk/typescript 4.1.0-rc.1 2.760.2 2.0 @orq-ai/node",
|
|
74
74
|
} as const;
|
|
@@ -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.
|
|
123
|
+
version: "4.1.0-rc.1",
|
|
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.
|
|
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
|
|
15
|
+
description: `Create agent
|
|
16
16
|
|
|
17
|
-
Creates a new
|
|
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
|
-
|
|
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
|
|
15
|
+
description: `Delete agent
|
|
16
16
|
|
|
17
|
-
Permanently
|
|
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.
|
|
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
|
-
|
|
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: `
|
|
17
|
+
description: `Execute an agent task
|
|
16
18
|
|
|
17
|
-
|
|
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.
|
|
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
|
-
|
|
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
|
|
17
|
+
description: `List agents
|
|
16
18
|
|
|
17
|
-
Retrieves a list of
|
|
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.
|
|
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
|
-
|
|
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
|
|
18
|
+
description: `Create response
|
|
16
19
|
|
|
17
|
-
|
|
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.
|
|
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
|
-
|
|
10
|
+
agentKey: z.string(),
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export const tool$agentsRetrieve: ToolDefinition<typeof args> = {
|
|
14
14
|
name: "agents-retrieve",
|
|
15
|
-
description: `
|
|
15
|
+
description: `Retrieve agent
|
|
16
16
|
|
|
17
|
-
Retrieves a
|
|
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.
|
|
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
|
|
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
|
-
|
|
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
|
|
17
|
+
description: `Stream agent execution in real-time
|
|
16
18
|
|
|
17
|
-
Executes an agent and streams
|
|
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.
|
|
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
|
|
15
|
+
description: `Run agent with streaming response
|
|
16
16
|
|
|
17
|
-
|
|
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
|
-
|
|
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
|
|
18
|
+
description: `Update agent
|
|
16
19
|
|
|
17
|
-
|
|
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.
|
|
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 "./
|
|
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";
|