@reminix/sdk 0.12.0 → 0.14.0
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/CHANGELOG.md +21 -0
- package/client.d.mts +8 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -2
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents.d.mts +123 -30
- package/resources/agents.d.mts.map +1 -1
- package/resources/agents.d.ts +123 -30
- package/resources/agents.d.ts.map +1 -1
- package/resources/agents.js.map +1 -1
- package/resources/agents.mjs.map +1 -1
- package/resources/execution-logs.d.mts +3 -3
- package/resources/execution-logs.d.mts.map +1 -1
- package/resources/execution-logs.d.ts +3 -3
- package/resources/execution-logs.d.ts.map +1 -1
- package/resources/execution-logs.js +1 -1
- package/resources/execution-logs.mjs +1 -1
- package/resources/index.d.mts +3 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/knowledge/collections/collections.d.mts +89 -0
- package/resources/knowledge/collections/collections.d.mts.map +1 -0
- package/resources/knowledge/collections/collections.d.ts +89 -0
- package/resources/knowledge/collections/collections.d.ts.map +1 -0
- package/resources/knowledge/collections/collections.js +56 -0
- package/resources/knowledge/collections/collections.js.map +1 -0
- package/resources/knowledge/collections/collections.mjs +51 -0
- package/resources/knowledge/collections/collections.mjs.map +1 -0
- package/resources/knowledge/collections/documents.d.mts +121 -0
- package/resources/knowledge/collections/documents.d.mts.map +1 -0
- package/resources/knowledge/collections/documents.d.ts +121 -0
- package/resources/knowledge/collections/documents.d.ts.map +1 -0
- package/resources/knowledge/collections/documents.js +62 -0
- package/resources/knowledge/collections/documents.js.map +1 -0
- package/resources/knowledge/collections/documents.mjs +58 -0
- package/resources/knowledge/collections/documents.mjs.map +1 -0
- package/resources/knowledge/collections/index.d.mts +3 -0
- package/resources/knowledge/collections/index.d.mts.map +1 -0
- package/resources/knowledge/collections/index.d.ts +3 -0
- package/resources/knowledge/collections/index.d.ts.map +1 -0
- package/resources/knowledge/collections/index.js +9 -0
- package/resources/knowledge/collections/index.js.map +1 -0
- package/resources/knowledge/collections/index.mjs +4 -0
- package/resources/knowledge/collections/index.mjs.map +1 -0
- package/resources/knowledge/collections.d.mts +2 -0
- package/resources/knowledge/collections.d.mts.map +1 -0
- package/resources/knowledge/collections.d.ts +2 -0
- package/resources/knowledge/collections.d.ts.map +1 -0
- package/resources/knowledge/collections.js +6 -0
- package/resources/knowledge/collections.js.map +1 -0
- package/resources/knowledge/collections.mjs +3 -0
- package/resources/knowledge/collections.mjs.map +1 -0
- package/resources/knowledge/index.d.mts +3 -0
- package/resources/knowledge/index.d.mts.map +1 -0
- package/resources/knowledge/index.d.ts +3 -0
- package/resources/knowledge/index.d.ts.map +1 -0
- package/resources/knowledge/index.js +9 -0
- package/resources/knowledge/index.js.map +1 -0
- package/resources/knowledge/index.mjs +4 -0
- package/resources/knowledge/index.mjs.map +1 -0
- package/resources/knowledge/knowledge.d.mts +65 -0
- package/resources/knowledge/knowledge.d.mts.map +1 -0
- package/resources/knowledge/knowledge.d.ts +65 -0
- package/resources/knowledge/knowledge.d.ts.map +1 -0
- package/resources/knowledge/knowledge.js +26 -0
- package/resources/knowledge/knowledge.js.map +1 -0
- package/resources/knowledge/knowledge.mjs +21 -0
- package/resources/knowledge/knowledge.mjs.map +1 -0
- package/resources/knowledge.d.mts +2 -0
- package/resources/knowledge.d.mts.map +1 -0
- package/resources/knowledge.d.ts +2 -0
- package/resources/knowledge.d.ts.map +1 -0
- package/resources/knowledge.js +6 -0
- package/resources/knowledge.js.map +1 -0
- package/resources/knowledge.mjs +3 -0
- package/resources/knowledge.mjs.map +1 -0
- package/resources/memory.d.mts +148 -0
- package/resources/memory.d.mts.map +1 -0
- package/resources/memory.d.ts +148 -0
- package/resources/memory.d.ts.map +1 -0
- package/resources/memory.js +82 -0
- package/resources/memory.js.map +1 -0
- package/resources/memory.mjs +78 -0
- package/resources/memory.mjs.map +1 -0
- package/resources/tools.d.mts +70 -12
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +70 -12
- package/resources/tools.d.ts.map +1 -1
- package/src/client.ts +30 -0
- package/src/resources/agents.ts +140 -33
- package/src/resources/execution-logs.ts +3 -3
- package/src/resources/index.ts +10 -0
- package/src/resources/knowledge/collections/collections.ts +167 -0
- package/src/resources/knowledge/collections/documents.ts +200 -0
- package/src/resources/knowledge/collections/index.ts +22 -0
- package/src/resources/knowledge/collections.ts +3 -0
- package/src/resources/knowledge/index.ts +11 -0
- package/src/resources/knowledge/knowledge.ts +101 -0
- package/src/resources/knowledge.ts +3 -0
- package/src/resources/memory.ts +188 -0
- package/src/resources/tools.ts +80 -12
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/resources/tools.d.ts
CHANGED
|
@@ -68,18 +68,18 @@ export interface Tool {
|
|
|
68
68
|
* When the tool was discovered
|
|
69
69
|
*/
|
|
70
70
|
discoveredAt: string | null;
|
|
71
|
+
/**
|
|
72
|
+
* JSON Schema for agent input
|
|
73
|
+
*/
|
|
74
|
+
input: Tool.Input | null;
|
|
71
75
|
/**
|
|
72
76
|
* Tool name
|
|
73
77
|
*/
|
|
74
78
|
name: string;
|
|
75
79
|
/**
|
|
76
|
-
* JSON Schema for agent input
|
|
80
|
+
* JSON Schema for agent input
|
|
77
81
|
*/
|
|
78
82
|
output: Tool.Output | null;
|
|
79
|
-
/**
|
|
80
|
-
* JSON Schema for agent input parameters
|
|
81
|
-
*/
|
|
82
|
-
parameters: Tool.Parameters | null;
|
|
83
83
|
/**
|
|
84
84
|
* Project ID
|
|
85
85
|
*/
|
|
@@ -100,25 +100,83 @@ export interface Tool {
|
|
|
100
100
|
}
|
|
101
101
|
export declare namespace Tool {
|
|
102
102
|
/**
|
|
103
|
-
* JSON Schema for agent input
|
|
104
|
-
*/
|
|
105
|
-
interface
|
|
106
|
-
|
|
103
|
+
* JSON Schema for agent input
|
|
104
|
+
*/
|
|
105
|
+
interface Input {
|
|
106
|
+
/**
|
|
107
|
+
* Default value for the property
|
|
108
|
+
*/
|
|
109
|
+
default?: unknown;
|
|
110
|
+
/**
|
|
111
|
+
* Description of the schema
|
|
112
|
+
*/
|
|
113
|
+
description?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Enumeration of allowed values
|
|
116
|
+
*/
|
|
117
|
+
enum?: Array<unknown>;
|
|
118
|
+
/**
|
|
119
|
+
* Schema for array items
|
|
120
|
+
*/
|
|
121
|
+
items?: unknown;
|
|
122
|
+
/**
|
|
123
|
+
* Property definitions for object types
|
|
124
|
+
*/
|
|
107
125
|
properties?: {
|
|
108
126
|
[key: string]: unknown;
|
|
109
127
|
};
|
|
128
|
+
/**
|
|
129
|
+
* List of required property names
|
|
130
|
+
*/
|
|
110
131
|
required?: Array<string>;
|
|
132
|
+
/**
|
|
133
|
+
* Human-readable title
|
|
134
|
+
*/
|
|
135
|
+
title?: string;
|
|
136
|
+
/**
|
|
137
|
+
* JSON Schema type (e.g., "object", "string", "array")
|
|
138
|
+
*/
|
|
139
|
+
type?: string;
|
|
111
140
|
[k: string]: unknown;
|
|
112
141
|
}
|
|
113
142
|
/**
|
|
114
|
-
* JSON Schema for agent input
|
|
143
|
+
* JSON Schema for agent input
|
|
115
144
|
*/
|
|
116
|
-
interface
|
|
117
|
-
|
|
145
|
+
interface Output {
|
|
146
|
+
/**
|
|
147
|
+
* Default value for the property
|
|
148
|
+
*/
|
|
149
|
+
default?: unknown;
|
|
150
|
+
/**
|
|
151
|
+
* Description of the schema
|
|
152
|
+
*/
|
|
153
|
+
description?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Enumeration of allowed values
|
|
156
|
+
*/
|
|
157
|
+
enum?: Array<unknown>;
|
|
158
|
+
/**
|
|
159
|
+
* Schema for array items
|
|
160
|
+
*/
|
|
161
|
+
items?: unknown;
|
|
162
|
+
/**
|
|
163
|
+
* Property definitions for object types
|
|
164
|
+
*/
|
|
118
165
|
properties?: {
|
|
119
166
|
[key: string]: unknown;
|
|
120
167
|
};
|
|
168
|
+
/**
|
|
169
|
+
* List of required property names
|
|
170
|
+
*/
|
|
121
171
|
required?: Array<string>;
|
|
172
|
+
/**
|
|
173
|
+
* Human-readable title
|
|
174
|
+
*/
|
|
175
|
+
title?: string;
|
|
176
|
+
/**
|
|
177
|
+
* JSON Schema type (e.g., "object", "string", "array")
|
|
178
|
+
*/
|
|
179
|
+
type?: string;
|
|
122
180
|
[k: string]: unknown;
|
|
123
181
|
}
|
|
124
182
|
}
|
package/resources/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/resources/tools.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;OAC1C,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAIlE;;;;;;;;;;;OAWG;IACH,IAAI,CACF,KAAK,GAAE,cAAc,GAAG,IAAI,GAAG,SAAc,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,WAAW,EAAE,IAAI,CAAC;IAIjC;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;CAG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I,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QAEtB;;WAEG;QACH,KAAK,CAAC,EAAE,OAAO,CAAC;QAEhB;;WAEG;QACH,UAAU,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;SAAE,CAAC;QAExC;;WAEG;QACH,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAEzB;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;KACtB;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,cAAe,SAAQ,YAAY;IAClD;;OAEG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IAE/B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,KAAK,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,IAAI,IAAI,IAAI,EACjB,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"}
|
package/src/client.ts
CHANGED
|
@@ -29,7 +29,9 @@ import {
|
|
|
29
29
|
AgentInvokeParamsNonStreaming,
|
|
30
30
|
AgentInvokeParamsStreaming,
|
|
31
31
|
AgentInvokeResponse,
|
|
32
|
+
AgentKnowledgeBaseConfig,
|
|
32
33
|
AgentListParams,
|
|
34
|
+
AgentMemoryConfig,
|
|
33
35
|
Agents,
|
|
34
36
|
AgentsCursor,
|
|
35
37
|
ChatMessage,
|
|
@@ -49,6 +51,13 @@ import {
|
|
|
49
51
|
ExecutionLogs,
|
|
50
52
|
ExecutionLogsCursor,
|
|
51
53
|
} from './resources/execution-logs';
|
|
54
|
+
import {
|
|
55
|
+
Memory,
|
|
56
|
+
MemoryDeleteAllResponse,
|
|
57
|
+
MemoryListResponse,
|
|
58
|
+
MemoryResource,
|
|
59
|
+
MemoryStoreParams,
|
|
60
|
+
} from './resources/memory';
|
|
52
61
|
import { Project, Projects } from './resources/projects';
|
|
53
62
|
import {
|
|
54
63
|
Tool,
|
|
@@ -58,6 +67,7 @@ import {
|
|
|
58
67
|
Tools,
|
|
59
68
|
ToolsCursor,
|
|
60
69
|
} from './resources/tools';
|
|
70
|
+
import { Knowledge, KnowledgeSearchParams, KnowledgeSearchResponse } from './resources/knowledge/knowledge';
|
|
61
71
|
import { type Fetch } from './internal/builtin-types';
|
|
62
72
|
import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
|
|
63
73
|
import { FinalRequestOptions, RequestOptions } from './internal/request-options';
|
|
@@ -781,6 +791,8 @@ export class Reminix {
|
|
|
781
791
|
clientTokens: API.ClientTokens = new API.ClientTokens(this);
|
|
782
792
|
executionLogs: API.ExecutionLogs = new API.ExecutionLogs(this);
|
|
783
793
|
conversations: API.Conversations = new API.Conversations(this);
|
|
794
|
+
memory: API.MemoryResource = new API.MemoryResource(this);
|
|
795
|
+
knowledge: API.Knowledge = new API.Knowledge(this);
|
|
784
796
|
}
|
|
785
797
|
|
|
786
798
|
Reminix.Projects = Projects;
|
|
@@ -789,6 +801,8 @@ Reminix.Tools = Tools;
|
|
|
789
801
|
Reminix.ClientTokens = ClientTokens;
|
|
790
802
|
Reminix.ExecutionLogs = ExecutionLogs;
|
|
791
803
|
Reminix.Conversations = Conversations;
|
|
804
|
+
Reminix.MemoryResource = MemoryResource;
|
|
805
|
+
Reminix.Knowledge = Knowledge;
|
|
792
806
|
|
|
793
807
|
export declare namespace Reminix {
|
|
794
808
|
export type RequestOptions = Opts.RequestOptions;
|
|
@@ -802,6 +816,8 @@ export declare namespace Reminix {
|
|
|
802
816
|
Agents as Agents,
|
|
803
817
|
type Agent as Agent,
|
|
804
818
|
type AgentConfig as AgentConfig,
|
|
819
|
+
type AgentKnowledgeBaseConfig as AgentKnowledgeBaseConfig,
|
|
820
|
+
type AgentMemoryConfig as AgentMemoryConfig,
|
|
805
821
|
type ChatMessage as ChatMessage,
|
|
806
822
|
type StreamChunk as StreamChunk,
|
|
807
823
|
type AgentChatResponse as AgentChatResponse,
|
|
@@ -845,4 +861,18 @@ export declare namespace Reminix {
|
|
|
845
861
|
type ConversationsCursor as ConversationsCursor,
|
|
846
862
|
type ConversationListParams as ConversationListParams,
|
|
847
863
|
};
|
|
864
|
+
|
|
865
|
+
export {
|
|
866
|
+
MemoryResource as MemoryResource,
|
|
867
|
+
type Memory as Memory,
|
|
868
|
+
type MemoryListResponse as MemoryListResponse,
|
|
869
|
+
type MemoryDeleteAllResponse as MemoryDeleteAllResponse,
|
|
870
|
+
type MemoryStoreParams as MemoryStoreParams,
|
|
871
|
+
};
|
|
872
|
+
|
|
873
|
+
export {
|
|
874
|
+
Knowledge as Knowledge,
|
|
875
|
+
type KnowledgeSearchResponse as KnowledgeSearchResponse,
|
|
876
|
+
type KnowledgeSearchParams as KnowledgeSearchParams,
|
|
877
|
+
};
|
|
848
878
|
}
|
package/src/resources/agents.ts
CHANGED
|
@@ -42,7 +42,7 @@ export class Agents extends APIResource {
|
|
|
42
42
|
/**
|
|
43
43
|
* Send a chat message to an agent and receive a response.
|
|
44
44
|
*
|
|
45
|
-
* **Supported Agents:** Managed agents only. Custom agents should use the /
|
|
45
|
+
* **Supported Agents:** Managed agents only. Custom agents should use the /invoke
|
|
46
46
|
* endpoint.
|
|
47
47
|
*
|
|
48
48
|
* **Tool Calls:** Messages support the OpenAI tool calling format:
|
|
@@ -111,7 +111,11 @@ export class Agents extends APIResource {
|
|
|
111
111
|
*
|
|
112
112
|
* @example
|
|
113
113
|
* ```ts
|
|
114
|
-
* const response = await client.agents.invoke('name'
|
|
114
|
+
* const response = await client.agents.invoke('name', {
|
|
115
|
+
* input: {
|
|
116
|
+
* prompt: 'Summarize the key points of machine learning',
|
|
117
|
+
* },
|
|
118
|
+
* });
|
|
115
119
|
* ```
|
|
116
120
|
*/
|
|
117
121
|
invoke(
|
|
@@ -186,35 +190,25 @@ export interface Agent {
|
|
|
186
190
|
discoveredAt: string | null;
|
|
187
191
|
|
|
188
192
|
/**
|
|
189
|
-
*
|
|
193
|
+
* JSON Schema for agent input
|
|
190
194
|
*/
|
|
191
|
-
|
|
195
|
+
input: Agent.Input | null;
|
|
192
196
|
|
|
193
197
|
/**
|
|
194
|
-
*
|
|
198
|
+
* Agent name
|
|
195
199
|
*/
|
|
196
|
-
|
|
200
|
+
name: string;
|
|
197
201
|
|
|
198
202
|
/**
|
|
199
|
-
* JSON Schema for agent input
|
|
203
|
+
* JSON Schema for agent input
|
|
200
204
|
*/
|
|
201
|
-
|
|
205
|
+
output: Agent.Output | null;
|
|
202
206
|
|
|
203
207
|
/**
|
|
204
208
|
* Project ID
|
|
205
209
|
*/
|
|
206
210
|
projectId: string;
|
|
207
211
|
|
|
208
|
-
/**
|
|
209
|
-
* Top-level keys expected in request body
|
|
210
|
-
*/
|
|
211
|
-
requestKeys: Array<string> | null;
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Top-level keys returned in response body
|
|
215
|
-
*/
|
|
216
|
-
responseKeys: Array<string> | null;
|
|
217
|
-
|
|
218
212
|
/**
|
|
219
213
|
* Agent status
|
|
220
214
|
*/
|
|
@@ -235,28 +229,96 @@ export interface Agent {
|
|
|
235
229
|
|
|
236
230
|
export namespace Agent {
|
|
237
231
|
/**
|
|
238
|
-
* JSON Schema for agent input
|
|
232
|
+
* JSON Schema for agent input
|
|
239
233
|
*/
|
|
240
|
-
export interface
|
|
241
|
-
|
|
234
|
+
export interface Input {
|
|
235
|
+
/**
|
|
236
|
+
* Default value for the property
|
|
237
|
+
*/
|
|
238
|
+
default?: unknown;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Description of the schema
|
|
242
|
+
*/
|
|
243
|
+
description?: string;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Enumeration of allowed values
|
|
247
|
+
*/
|
|
248
|
+
enum?: Array<unknown>;
|
|
242
249
|
|
|
250
|
+
/**
|
|
251
|
+
* Schema for array items
|
|
252
|
+
*/
|
|
253
|
+
items?: unknown;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Property definitions for object types
|
|
257
|
+
*/
|
|
243
258
|
properties?: { [key: string]: unknown };
|
|
244
259
|
|
|
260
|
+
/**
|
|
261
|
+
* List of required property names
|
|
262
|
+
*/
|
|
245
263
|
required?: Array<string>;
|
|
246
264
|
|
|
265
|
+
/**
|
|
266
|
+
* Human-readable title
|
|
267
|
+
*/
|
|
268
|
+
title?: string;
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* JSON Schema type (e.g., "object", "string", "array")
|
|
272
|
+
*/
|
|
273
|
+
type?: string;
|
|
274
|
+
|
|
247
275
|
[k: string]: unknown;
|
|
248
276
|
}
|
|
249
277
|
|
|
250
278
|
/**
|
|
251
|
-
* JSON Schema for agent input
|
|
279
|
+
* JSON Schema for agent input
|
|
252
280
|
*/
|
|
253
|
-
export interface
|
|
254
|
-
|
|
281
|
+
export interface Output {
|
|
282
|
+
/**
|
|
283
|
+
* Default value for the property
|
|
284
|
+
*/
|
|
285
|
+
default?: unknown;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Description of the schema
|
|
289
|
+
*/
|
|
290
|
+
description?: string;
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Enumeration of allowed values
|
|
294
|
+
*/
|
|
295
|
+
enum?: Array<unknown>;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Schema for array items
|
|
299
|
+
*/
|
|
300
|
+
items?: unknown;
|
|
255
301
|
|
|
302
|
+
/**
|
|
303
|
+
* Property definitions for object types
|
|
304
|
+
*/
|
|
256
305
|
properties?: { [key: string]: unknown };
|
|
257
306
|
|
|
307
|
+
/**
|
|
308
|
+
* List of required property names
|
|
309
|
+
*/
|
|
258
310
|
required?: Array<string>;
|
|
259
311
|
|
|
312
|
+
/**
|
|
313
|
+
* Human-readable title
|
|
314
|
+
*/
|
|
315
|
+
title?: string;
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* JSON Schema type (e.g., "object", "string", "array")
|
|
319
|
+
*/
|
|
320
|
+
type?: string;
|
|
321
|
+
|
|
260
322
|
[k: string]: unknown;
|
|
261
323
|
}
|
|
262
324
|
}
|
|
@@ -285,17 +347,52 @@ export interface AgentConfig {
|
|
|
285
347
|
*/
|
|
286
348
|
tools: Array<string>;
|
|
287
349
|
|
|
350
|
+
/**
|
|
351
|
+
* Knowledge base feature configuration
|
|
352
|
+
*/
|
|
353
|
+
knowledgeBase?: AgentKnowledgeBaseConfig;
|
|
354
|
+
|
|
288
355
|
/**
|
|
289
356
|
* Maximum tool call iterations
|
|
290
357
|
*/
|
|
291
358
|
maxIterations?: number;
|
|
292
359
|
|
|
360
|
+
/**
|
|
361
|
+
* Memory feature configuration
|
|
362
|
+
*/
|
|
363
|
+
memory?: AgentMemoryConfig;
|
|
364
|
+
|
|
293
365
|
/**
|
|
294
366
|
* Whether to require approval for tool calls
|
|
295
367
|
*/
|
|
296
368
|
requireApproval?: boolean;
|
|
297
369
|
}
|
|
298
370
|
|
|
371
|
+
/**
|
|
372
|
+
* Knowledge base feature configuration
|
|
373
|
+
*/
|
|
374
|
+
export interface AgentKnowledgeBaseConfig {
|
|
375
|
+
/**
|
|
376
|
+
* Collection IDs to search
|
|
377
|
+
*/
|
|
378
|
+
collectionIds: Array<string>;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Whether knowledge base is enabled for this agent
|
|
382
|
+
*/
|
|
383
|
+
enabled: boolean;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Memory feature configuration
|
|
388
|
+
*/
|
|
389
|
+
export interface AgentMemoryConfig {
|
|
390
|
+
/**
|
|
391
|
+
* Whether memory is enabled for this agent
|
|
392
|
+
*/
|
|
393
|
+
enabled: boolean;
|
|
394
|
+
}
|
|
395
|
+
|
|
299
396
|
export interface ChatMessage {
|
|
300
397
|
/**
|
|
301
398
|
* Message content. Can be string, array (multimodal), object (tool), or null (when
|
|
@@ -378,10 +475,19 @@ export interface AgentChatResponse {
|
|
|
378
475
|
}
|
|
379
476
|
|
|
380
477
|
/**
|
|
381
|
-
* Response with
|
|
382
|
-
* output: ... }, chat agents return { messages: [...] }.
|
|
478
|
+
* Response with output from the agent and optional execution ID.
|
|
383
479
|
*/
|
|
384
|
-
export
|
|
480
|
+
export interface AgentInvokeResponse {
|
|
481
|
+
/**
|
|
482
|
+
* Execution ID for tracking
|
|
483
|
+
*/
|
|
484
|
+
execution_id?: string;
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Output from the agent
|
|
488
|
+
*/
|
|
489
|
+
output?: unknown;
|
|
490
|
+
}
|
|
385
491
|
|
|
386
492
|
export interface AgentListParams extends CursorParams {
|
|
387
493
|
/**
|
|
@@ -458,12 +564,15 @@ export interface AgentInvokeParamsBase {
|
|
|
458
564
|
*/
|
|
459
565
|
context?: AgentInvokeParams.Context;
|
|
460
566
|
|
|
567
|
+
/**
|
|
568
|
+
* Input data for the agent
|
|
569
|
+
*/
|
|
570
|
+
input?: { [key: string]: unknown };
|
|
571
|
+
|
|
461
572
|
/**
|
|
462
573
|
* Enable streaming response (SSE)
|
|
463
574
|
*/
|
|
464
575
|
stream?: boolean;
|
|
465
|
-
|
|
466
|
-
[k: string]: unknown;
|
|
467
576
|
}
|
|
468
577
|
|
|
469
578
|
export namespace AgentInvokeParams {
|
|
@@ -488,8 +597,6 @@ export interface AgentInvokeParamsNonStreaming extends AgentInvokeParamsBase {
|
|
|
488
597
|
* Enable streaming response (SSE)
|
|
489
598
|
*/
|
|
490
599
|
stream?: false;
|
|
491
|
-
|
|
492
|
-
[k: string]: unknown;
|
|
493
600
|
}
|
|
494
601
|
|
|
495
602
|
export interface AgentInvokeParamsStreaming extends AgentInvokeParamsBase {
|
|
@@ -497,14 +604,14 @@ export interface AgentInvokeParamsStreaming extends AgentInvokeParamsBase {
|
|
|
497
604
|
* Enable streaming response (SSE)
|
|
498
605
|
*/
|
|
499
606
|
stream: true;
|
|
500
|
-
|
|
501
|
-
[k: string]: unknown;
|
|
502
607
|
}
|
|
503
608
|
|
|
504
609
|
export declare namespace Agents {
|
|
505
610
|
export {
|
|
506
611
|
type Agent as Agent,
|
|
507
612
|
type AgentConfig as AgentConfig,
|
|
613
|
+
type AgentKnowledgeBaseConfig as AgentKnowledgeBaseConfig,
|
|
614
|
+
type AgentMemoryConfig as AgentMemoryConfig,
|
|
508
615
|
type ChatMessage as ChatMessage,
|
|
509
616
|
type StreamChunk as StreamChunk,
|
|
510
617
|
type AgentChatResponse as AgentChatResponse,
|
|
@@ -22,7 +22,7 @@ export class ExecutionLogs extends APIResource {
|
|
|
22
22
|
*
|
|
23
23
|
* **Filters:**
|
|
24
24
|
*
|
|
25
|
-
* - `type`: Filter by execution type (
|
|
25
|
+
* - `type`: Filter by execution type (agent_invoke, agent_chat, tool_call)
|
|
26
26
|
* - `source`: Filter by request source (api, cli, dashboard, widget, sdk)
|
|
27
27
|
* - `name`: Filter by agent or tool name
|
|
28
28
|
* - `status`: Filter by result status (success, error, timeout)
|
|
@@ -81,7 +81,7 @@ export interface ExecutionLog {
|
|
|
81
81
|
/**
|
|
82
82
|
* Type of execution
|
|
83
83
|
*/
|
|
84
|
-
type: '
|
|
84
|
+
type: 'agent_invoke' | 'agent_chat' | 'tool_call';
|
|
85
85
|
|
|
86
86
|
/**
|
|
87
87
|
* Input parameters
|
|
@@ -113,7 +113,7 @@ export interface ExecutionLogListParams extends CursorParams {
|
|
|
113
113
|
/**
|
|
114
114
|
* Filter by execution type
|
|
115
115
|
*/
|
|
116
|
-
type?: '
|
|
116
|
+
type?: 'agent_invoke' | 'agent_chat' | 'tool_call';
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
export declare namespace ExecutionLogs {
|
package/src/resources/index.ts
CHANGED
|
@@ -4,6 +4,8 @@ export {
|
|
|
4
4
|
Agents,
|
|
5
5
|
type Agent,
|
|
6
6
|
type AgentConfig,
|
|
7
|
+
type AgentKnowledgeBaseConfig,
|
|
8
|
+
type AgentMemoryConfig,
|
|
7
9
|
type ChatMessage,
|
|
8
10
|
type StreamChunk,
|
|
9
11
|
type AgentChatResponse,
|
|
@@ -31,6 +33,14 @@ export {
|
|
|
31
33
|
type ExecutionLogListParams,
|
|
32
34
|
type ExecutionLogsCursor,
|
|
33
35
|
} from './execution-logs';
|
|
36
|
+
export { Knowledge, type KnowledgeSearchResponse, type KnowledgeSearchParams } from './knowledge/knowledge';
|
|
37
|
+
export {
|
|
38
|
+
MemoryResource,
|
|
39
|
+
type Memory,
|
|
40
|
+
type MemoryListResponse,
|
|
41
|
+
type MemoryDeleteAllResponse,
|
|
42
|
+
type MemoryStoreParams,
|
|
43
|
+
} from './memory';
|
|
34
44
|
export { Projects, type Project } from './projects';
|
|
35
45
|
export {
|
|
36
46
|
Tools,
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as DocumentsAPI from './documents';
|
|
5
|
+
import {
|
|
6
|
+
DocumentDeleteParams,
|
|
7
|
+
DocumentListParams,
|
|
8
|
+
DocumentProcessParams,
|
|
9
|
+
DocumentProcessResponse,
|
|
10
|
+
DocumentRetrieveParams,
|
|
11
|
+
DocumentUploadParams,
|
|
12
|
+
DocumentUploadResponse,
|
|
13
|
+
Documents,
|
|
14
|
+
KnowledgeDocument,
|
|
15
|
+
KnowledgeDocumentsCursor,
|
|
16
|
+
} from './documents';
|
|
17
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
18
|
+
import { Cursor, type CursorParams, PagePromise } from '../../../core/pagination';
|
|
19
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
20
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
21
|
+
import { path } from '../../../internal/utils/path';
|
|
22
|
+
|
|
23
|
+
export class Collections extends APIResource {
|
|
24
|
+
documents: DocumentsAPI.Documents = new DocumentsAPI.Documents(this._client);
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Create a new knowledge collection for storing documents.
|
|
28
|
+
*/
|
|
29
|
+
create(body: CollectionCreateParams, options?: RequestOptions): APIPromise<KnowledgeCollection> {
|
|
30
|
+
return this._client.post('/knowledge/collections', { body, ...options });
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Get details of a knowledge collection including document stats.
|
|
35
|
+
*/
|
|
36
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<KnowledgeCollection> {
|
|
37
|
+
return this._client.get(path`/knowledge/collections/${id}`, options);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Update a knowledge collection name or description.
|
|
42
|
+
*/
|
|
43
|
+
update(
|
|
44
|
+
id: string,
|
|
45
|
+
body: CollectionUpdateParams | null | undefined = {},
|
|
46
|
+
options?: RequestOptions,
|
|
47
|
+
): APIPromise<KnowledgeCollection> {
|
|
48
|
+
return this._client.patch(path`/knowledge/collections/${id}`, { body, ...options });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* List all knowledge collections for the project.
|
|
53
|
+
*/
|
|
54
|
+
list(
|
|
55
|
+
query: CollectionListParams | null | undefined = {},
|
|
56
|
+
options?: RequestOptions,
|
|
57
|
+
): PagePromise<KnowledgeCollectionsCursor, KnowledgeCollection> {
|
|
58
|
+
return this._client.getAPIList('/knowledge/collections', Cursor<KnowledgeCollection>, {
|
|
59
|
+
query,
|
|
60
|
+
...options,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Delete a knowledge collection and all its documents.
|
|
66
|
+
*/
|
|
67
|
+
delete(id: string, options?: RequestOptions): APIPromise<void> {
|
|
68
|
+
return this._client.delete(path`/knowledge/collections/${id}`, {
|
|
69
|
+
...options,
|
|
70
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export type KnowledgeCollectionsCursor = Cursor<KnowledgeCollection>;
|
|
76
|
+
|
|
77
|
+
export interface KnowledgeCollection {
|
|
78
|
+
/**
|
|
79
|
+
* Unique collection ID
|
|
80
|
+
*/
|
|
81
|
+
id: string;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* When the collection was created
|
|
85
|
+
*/
|
|
86
|
+
createdAt: string;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Collection description
|
|
90
|
+
*/
|
|
91
|
+
description: string | null;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Embedding model used
|
|
95
|
+
*/
|
|
96
|
+
embeddingModel: string;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Collection name
|
|
100
|
+
*/
|
|
101
|
+
name: string;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Project ID
|
|
105
|
+
*/
|
|
106
|
+
projectId: string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* When the collection was last updated
|
|
110
|
+
*/
|
|
111
|
+
updatedAt: string;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Total number of documents
|
|
115
|
+
*/
|
|
116
|
+
documentCount?: number;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Number of processed documents
|
|
120
|
+
*/
|
|
121
|
+
readyDocumentCount?: number;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface CollectionCreateParams {
|
|
125
|
+
/**
|
|
126
|
+
* Collection name
|
|
127
|
+
*/
|
|
128
|
+
name: string;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Collection description
|
|
132
|
+
*/
|
|
133
|
+
description?: string;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface CollectionUpdateParams {
|
|
137
|
+
description?: string;
|
|
138
|
+
|
|
139
|
+
name?: string;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export interface CollectionListParams extends CursorParams {}
|
|
143
|
+
|
|
144
|
+
Collections.Documents = Documents;
|
|
145
|
+
|
|
146
|
+
export declare namespace Collections {
|
|
147
|
+
export {
|
|
148
|
+
type KnowledgeCollection as KnowledgeCollection,
|
|
149
|
+
type KnowledgeCollectionsCursor as KnowledgeCollectionsCursor,
|
|
150
|
+
type CollectionCreateParams as CollectionCreateParams,
|
|
151
|
+
type CollectionUpdateParams as CollectionUpdateParams,
|
|
152
|
+
type CollectionListParams as CollectionListParams,
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
export {
|
|
156
|
+
Documents as Documents,
|
|
157
|
+
type KnowledgeDocument as KnowledgeDocument,
|
|
158
|
+
type DocumentProcessResponse as DocumentProcessResponse,
|
|
159
|
+
type DocumentUploadResponse as DocumentUploadResponse,
|
|
160
|
+
type KnowledgeDocumentsCursor as KnowledgeDocumentsCursor,
|
|
161
|
+
type DocumentRetrieveParams as DocumentRetrieveParams,
|
|
162
|
+
type DocumentListParams as DocumentListParams,
|
|
163
|
+
type DocumentDeleteParams as DocumentDeleteParams,
|
|
164
|
+
type DocumentProcessParams as DocumentProcessParams,
|
|
165
|
+
type DocumentUploadParams as DocumentUploadParams,
|
|
166
|
+
};
|
|
167
|
+
}
|