@reminix/sdk 0.9.0 → 0.11.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.
Files changed (116) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +53 -6
  3. package/client.d.mts +20 -11
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +20 -11
  6. package/client.d.ts.map +1 -1
  7. package/client.js +18 -6
  8. package/client.js.map +1 -1
  9. package/client.mjs +18 -6
  10. package/client.mjs.map +1 -1
  11. package/core/pagination.d.mts +57 -0
  12. package/core/pagination.d.mts.map +1 -0
  13. package/core/pagination.d.ts +57 -0
  14. package/core/pagination.d.ts.map +1 -0
  15. package/core/pagination.js +108 -0
  16. package/core/pagination.js.map +1 -0
  17. package/core/pagination.mjs +102 -0
  18. package/core/pagination.mjs.map +1 -0
  19. package/index.d.mts +1 -0
  20. package/index.d.mts.map +1 -1
  21. package/index.d.ts +1 -0
  22. package/index.d.ts.map +1 -1
  23. package/index.js +3 -1
  24. package/index.js.map +1 -1
  25. package/index.mjs +1 -0
  26. package/index.mjs.map +1 -1
  27. package/package.json +11 -1
  28. package/pagination.d.mts +2 -0
  29. package/pagination.d.mts.map +1 -0
  30. package/pagination.d.ts +2 -0
  31. package/pagination.d.ts.map +1 -0
  32. package/pagination.js +6 -0
  33. package/pagination.js.map +1 -0
  34. package/pagination.mjs +2 -0
  35. package/pagination.mjs.map +1 -0
  36. package/resources/agents.d.mts +273 -148
  37. package/resources/agents.d.mts.map +1 -1
  38. package/resources/agents.d.ts +273 -148
  39. package/resources/agents.d.ts.map +1 -1
  40. package/resources/agents.js +29 -3
  41. package/resources/agents.js.map +1 -1
  42. package/resources/agents.mjs +29 -3
  43. package/resources/agents.mjs.map +1 -1
  44. package/resources/conversations.d.mts +107 -0
  45. package/resources/conversations.d.mts.map +1 -0
  46. package/resources/conversations.d.ts +107 -0
  47. package/resources/conversations.d.ts.map +1 -0
  48. package/resources/conversations.js +41 -0
  49. package/resources/conversations.js.map +1 -0
  50. package/resources/conversations.mjs +37 -0
  51. package/resources/conversations.mjs.map +1 -0
  52. package/resources/execution-logs.d.mts +93 -0
  53. package/resources/execution-logs.d.mts.map +1 -0
  54. package/resources/execution-logs.d.ts +93 -0
  55. package/resources/execution-logs.d.ts.map +1 -0
  56. package/resources/execution-logs.js +33 -0
  57. package/resources/execution-logs.js.map +1 -0
  58. package/resources/execution-logs.mjs +29 -0
  59. package/resources/execution-logs.mjs.map +1 -0
  60. package/resources/index.d.mts +5 -4
  61. package/resources/index.d.mts.map +1 -1
  62. package/resources/index.d.ts +5 -4
  63. package/resources/index.d.ts.map +1 -1
  64. package/resources/index.js +7 -5
  65. package/resources/index.js.map +1 -1
  66. package/resources/index.mjs +3 -2
  67. package/resources/index.mjs.map +1 -1
  68. package/resources/projects.d.mts +5 -5
  69. package/resources/projects.d.mts.map +1 -1
  70. package/resources/projects.d.ts +5 -5
  71. package/resources/projects.d.ts.map +1 -1
  72. package/resources/tools.d.mts +152 -0
  73. package/resources/tools.d.mts.map +1 -0
  74. package/resources/tools.d.ts +152 -0
  75. package/resources/tools.d.ts.map +1 -0
  76. package/resources/tools.js +59 -0
  77. package/resources/tools.js.map +1 -0
  78. package/resources/tools.mjs +55 -0
  79. package/resources/tools.mjs.map +1 -0
  80. package/src/client.ts +96 -22
  81. package/src/core/pagination.ts +165 -0
  82. package/src/index.ts +1 -0
  83. package/src/pagination.ts +2 -0
  84. package/src/resources/agents.ts +336 -165
  85. package/src/resources/conversations.ts +146 -0
  86. package/src/resources/execution-logs.ts +125 -0
  87. package/src/resources/index.ts +31 -8
  88. package/src/resources/projects.ts +5 -5
  89. package/src/resources/tools.ts +192 -0
  90. package/src/version.ts +1 -1
  91. package/version.d.mts +1 -1
  92. package/version.d.mts.map +1 -1
  93. package/version.d.ts +1 -1
  94. package/version.d.ts.map +1 -1
  95. package/version.js +1 -1
  96. package/version.js.map +1 -1
  97. package/version.mjs +1 -1
  98. package/version.mjs.map +1 -1
  99. package/resources/deployments.d.mts +0 -4
  100. package/resources/deployments.d.mts.map +0 -1
  101. package/resources/deployments.d.ts +0 -4
  102. package/resources/deployments.d.ts.map +0 -1
  103. package/resources/deployments.js +0 -9
  104. package/resources/deployments.js.map +0 -1
  105. package/resources/deployments.mjs +0 -5
  106. package/resources/deployments.mjs.map +0 -1
  107. package/resources/secrets.d.mts +0 -4
  108. package/resources/secrets.d.mts.map +0 -1
  109. package/resources/secrets.d.ts +0 -4
  110. package/resources/secrets.d.ts.map +0 -1
  111. package/resources/secrets.js +0 -9
  112. package/resources/secrets.js.map +0 -1
  113. package/resources/secrets.mjs +0 -5
  114. package/resources/secrets.mjs.map +0 -1
  115. package/src/resources/deployments.ts +0 -5
  116. package/src/resources/secrets.ts +0 -5
@@ -3,48 +3,64 @@
3
3
  import { APIResource } from '../core/resource';
4
4
  import * as AgentsAPI from './agents';
5
5
  import { APIPromise } from '../core/api-promise';
6
+ import { Cursor, type CursorParams, PagePromise } from '../core/pagination';
6
7
  import { Stream } from '../core/streaming';
7
8
  import { RequestOptions } from '../internal/request-options';
8
9
  import { path } from '../internal/utils/path';
9
10
 
10
11
  export class Agents extends APIResource {
11
12
  /**
12
- * Have a conversational interaction with an agent. This endpoint maintains
13
- * conversation context through the messages array, allowing for multi-turn
14
- * conversations.
13
+ * Get details of a specific agent by name.
15
14
  *
16
- * **Timeout:** Chat requests have a 60-second timeout. If the agent takes longer
17
- * to respond, you will receive a 504 Gateway Timeout error. For long-running
18
- * conversations, consider using streaming mode which does not have the same
19
- * timeout constraints.
15
+ * @example
16
+ * ```ts
17
+ * const agent = await client.agents.retrieve('x');
18
+ * ```
19
+ */
20
+ retrieve(name: string, options?: RequestOptions): APIPromise<Agent> {
21
+ return this._client.get(path`/agents/${name}`, options);
22
+ }
23
+
24
+ /**
25
+ * List all agents in the project with optional filtering by type and status.
20
26
  *
21
- * **Idempotency:** For non-streaming requests, send an `Idempotency-Key` header
22
- * with a unique value (e.g., UUID) to ensure duplicate requests return the same
23
- * response. Keys are valid for 24 hours. Streaming responses are not cached.
27
+ * @example
28
+ * ```ts
29
+ * // Automatically fetches more pages as needed.
30
+ * for await (const agent of client.agents.list()) {
31
+ * // ...
32
+ * }
33
+ * ```
34
+ */
35
+ list(
36
+ query: AgentListParams | null | undefined = {},
37
+ options?: RequestOptions,
38
+ ): PagePromise<AgentsCursor, Agent> {
39
+ return this._client.getAPIList('/agents', Cursor<Agent>, { query, ...options });
40
+ }
41
+
42
+ /**
43
+ * Send a chat message to an agent and receive a response.
24
44
  *
25
- * **Use cases:**
45
+ * **Supported Agents:**
26
46
  *
27
- * - Customer support chatbots
28
- * - AI assistants with memory
29
- * - Multi-step question answering
30
- * - Conversational agents that need context
47
+ * - Managed agents: Always supported
48
+ * - Custom agents: Only supported if agent has `messages` in both requestKeys and
49
+ * responseKeys
31
50
  *
32
- * **Message format:** Follows OpenAI-compliant message structure with support for:
51
+ * **Tool Calls:** Messages support the OpenAI tool calling format:
33
52
  *
34
- * - `system`, `user`, `assistant`, and `tool` roles
35
- * - Multimodal content (text + images)
36
- * - Tool/function calling
53
+ * - Assistant messages can include `tool_calls` array with function calls
54
+ * - Tool result messages use `role: "tool"` with `tool_call_id` and `name`
55
+ * - Content can be `null` when `tool_calls` is present
37
56
  *
38
- * **Streaming:** Set `stream: true` in the request body to receive Server-Sent
39
- * Events (SSE) stream with incremental chunks. Perfect for ChatGPT-like real-time
40
- * chat interfaces.
57
+ * **Streaming:** Set `stream: true` to receive Server-Sent Events (SSE) for
58
+ * real-time responses.
41
59
  *
42
60
  * @example
43
61
  * ```ts
44
62
  * const response = await client.agents.chat('name', {
45
- * messages: [
46
- * { role: 'user', content: 'What is the weather today?' },
47
- * ],
63
+ * messages: [{ content: 'string', role: 'system' }],
48
64
  * });
49
65
  * ```
50
66
  */
@@ -76,10 +92,14 @@ export class Agents extends APIResource {
76
92
  }
77
93
 
78
94
  /**
79
- * Execute a one-shot task with an agent. This endpoint is designed for
80
- * task-oriented operations where you provide input and receive a complete output.
95
+ * Execute an agent with the provided input.
96
+ *
97
+ * **Agent Types:**
81
98
  *
82
- * **Timeout:** Agent invocations have a 60-second timeout. If the agent takes
99
+ * - Task-oriented agents: Pass structured input data
100
+ * - Chat agents: Pass `{ messages: [...] }` in the input
101
+ *
102
+ * **Timeout:** Agent executions have a 60-second timeout. If the agent takes
83
103
  * longer to respond, you will receive a 504 Gateway Timeout error. For
84
104
  * long-running tasks, consider using streaming mode which does not have the same
85
105
  * timeout constraints.
@@ -88,197 +108,331 @@ export class Agents extends APIResource {
88
108
  * with a unique value (e.g., UUID) to ensure duplicate requests return the same
89
109
  * response. Keys are valid for 24 hours. Streaming responses are not cached.
90
110
  *
91
- * **Use cases:**
92
- *
93
- * - Data analysis and processing
94
- * - Content generation (with streaming for long outputs)
95
- * - One-time operations that don't require conversation history
96
- * - API-like operations
97
- *
98
111
  * **Streaming:** Set `stream: true` in the request body to receive Server-Sent
99
112
  * Events (SSE) stream with incremental chunks. Useful for long-running tasks or
100
- * real-time progress updates.
113
+ * real-time chat interfaces.
101
114
  *
102
115
  * @example
103
116
  * ```ts
104
- * const response = await client.agents.invoke('name', {
105
- * input: {
106
- * task: 'analyze this data',
107
- * data: { value: 123, items: ['a', 'b', 'c'] },
108
- * },
109
- * });
117
+ * const response = await client.agents.execute('name');
110
118
  * ```
111
119
  */
112
- invoke(
120
+ execute(
113
121
  name: string,
114
- body: AgentInvokeParamsNonStreaming,
122
+ body?: AgentExecuteParamsNonStreaming,
115
123
  options?: RequestOptions,
116
- ): APIPromise<AgentInvokeResponse>;
117
- invoke(
124
+ ): APIPromise<AgentExecuteResponse>;
125
+ execute(
118
126
  name: string,
119
- body: AgentInvokeParamsStreaming,
127
+ body: AgentExecuteParamsStreaming,
120
128
  options?: RequestOptions,
121
129
  ): APIPromise<Stream<StreamChunk>>;
122
- invoke(
130
+ execute(
123
131
  name: string,
124
- body: AgentInvokeParamsBase,
132
+ body?: AgentExecuteParamsBase | undefined,
125
133
  options?: RequestOptions,
126
- ): APIPromise<Stream<StreamChunk> | AgentInvokeResponse>;
127
- invoke(
134
+ ): APIPromise<Stream<StreamChunk> | AgentExecuteResponse>;
135
+ execute(
128
136
  name: string,
129
- body: AgentInvokeParams,
137
+ body: AgentExecuteParams | undefined = {},
130
138
  options?: RequestOptions,
131
- ): APIPromise<AgentInvokeResponse> | APIPromise<Stream<StreamChunk>> {
132
- return this._client.post(path`/agents/${name}/invoke`, {
139
+ ): APIPromise<AgentExecuteResponse> | APIPromise<Stream<StreamChunk>> {
140
+ return this._client.post(path`/agents/${name}/execute`, {
133
141
  body,
134
142
  ...options,
135
- stream: body.stream ?? false,
136
- }) as APIPromise<AgentInvokeResponse> | APIPromise<Stream<StreamChunk>>;
143
+ stream: body?.stream ?? false,
144
+ }) as APIPromise<AgentExecuteResponse> | APIPromise<Stream<StreamChunk>>;
145
+ }
146
+ }
147
+
148
+ export type AgentsCursor = Cursor<Agent>;
149
+
150
+ export interface Agent {
151
+ /**
152
+ * Unique agent ID
153
+ */
154
+ id: string;
155
+
156
+ /**
157
+ * Whether agent supports chat interface
158
+ */
159
+ canChat: boolean | null;
160
+
161
+ /**
162
+ * Whether agent supports streaming
163
+ */
164
+ canStream: boolean | null;
165
+
166
+ /**
167
+ * Agent configuration (for managed agents)
168
+ */
169
+ config: AgentConfig | null;
170
+
171
+ /**
172
+ * Creation timestamp
173
+ */
174
+ createdAt: string;
175
+
176
+ /**
177
+ * User who created the agent
178
+ */
179
+ createdBy: string | null;
180
+
181
+ /**
182
+ * Agent description
183
+ */
184
+ description: string | null;
185
+
186
+ /**
187
+ * When the agent was discovered (for custom agents)
188
+ */
189
+ discoveredAt: string | null;
190
+
191
+ /**
192
+ * Agent name
193
+ */
194
+ name: string;
195
+
196
+ /**
197
+ * JSON Schema for agent input parameters
198
+ */
199
+ output: Agent.Output | null;
200
+
201
+ /**
202
+ * JSON Schema for agent input parameters
203
+ */
204
+ parameters: Agent.Parameters | null;
205
+
206
+ /**
207
+ * Project ID
208
+ */
209
+ projectId: string;
210
+
211
+ /**
212
+ * Top-level keys expected in request body
213
+ */
214
+ requestKeys: Array<string> | null;
215
+
216
+ /**
217
+ * Top-level keys returned in response body
218
+ */
219
+ responseKeys: Array<string> | null;
220
+
221
+ /**
222
+ * Agent status
223
+ */
224
+ status: 'active' | 'inactive';
225
+
226
+ /**
227
+ * Agent type: "managed" for UI-created, "{language}" for custom agents (e.g.,
228
+ * "python"), or "{language}-{adapter}" for adapter-based (e.g.,
229
+ * "python-langchain")
230
+ */
231
+ type: string;
232
+
233
+ /**
234
+ * Last update timestamp
235
+ */
236
+ updatedAt: string;
237
+ }
238
+
239
+ export namespace Agent {
240
+ /**
241
+ * JSON Schema for agent input parameters
242
+ */
243
+ export interface Output {
244
+ type: string;
245
+
246
+ properties?: { [key: string]: unknown };
247
+
248
+ required?: Array<string>;
249
+
250
+ [k: string]: unknown;
251
+ }
252
+
253
+ /**
254
+ * JSON Schema for agent input parameters
255
+ */
256
+ export interface Parameters {
257
+ type: string;
258
+
259
+ properties?: { [key: string]: unknown };
260
+
261
+ required?: Array<string>;
262
+
263
+ [k: string]: unknown;
137
264
  }
138
265
  }
139
266
 
140
267
  /**
141
- * Optional request context passed to the agent handler.
268
+ * Agent configuration (for managed agents)
142
269
  */
143
- export interface Context {
270
+ export interface AgentConfig {
144
271
  /**
145
- * ID to track multi-turn conversations
272
+ * Model identifier (e.g., "gpt-4o", "claude-sonnet-4-20250514")
146
273
  */
147
- conversation_id?: string;
274
+ model: string;
148
275
 
149
276
  /**
150
- * Additional custom context fields
277
+ * LLM provider
151
278
  */
152
- custom?: { [key: string]: unknown };
279
+ provider: 'openai' | 'anthropic';
153
280
 
154
281
  /**
155
- * ID of the user making the request
282
+ * System prompt for the agent
156
283
  */
157
- user_id?: string;
158
- }
284
+ systemPrompt: string;
159
285
 
160
- export interface StreamChunk {
161
286
  /**
162
- * Text chunk from the stream
287
+ * List of tools available to the agent
163
288
  */
164
- chunk: string;
289
+ tools: Array<string>;
290
+
291
+ /**
292
+ * Maximum tool call iterations
293
+ */
294
+ maxIterations?: number;
295
+
296
+ /**
297
+ * Whether to require approval for tool calls
298
+ */
299
+ requireApproval?: boolean;
165
300
  }
166
301
 
167
- export interface AgentChatResponse {
302
+ export interface ChatMessage {
303
+ /**
304
+ * Message content. Can be string, array (multimodal), object (tool), or null (when
305
+ * tool_calls present).
306
+ */
307
+ content: string | Array<ChatMessage.MultimodalContent> | { [key: string]: unknown } | null;
308
+
309
+ /**
310
+ * Message role
311
+ */
312
+ role: 'system' | 'user' | 'assistant' | 'tool';
313
+
314
+ /**
315
+ * Tool name (required when role is "tool")
316
+ */
317
+ name?: string;
318
+
168
319
  /**
169
- * Full conversation history including the assistant response
320
+ * Tool call ID (for tool role messages)
170
321
  */
171
- messages: Array<AgentChatResponse.Message>;
322
+ tool_call_id?: string;
172
323
 
173
324
  /**
174
- * Final assistant response text
325
+ * Tool calls requested by assistant (for assistant role messages)
175
326
  */
176
- output: string;
327
+ tool_calls?: Array<ChatMessage.ToolCall>;
177
328
  }
178
329
 
179
- export namespace AgentChatResponse {
180
- export interface Message {
181
- /**
182
- * Message content. Can be string, array (multimodal), or object (tool).
183
- */
184
- content: string | Array<Message.UnionMember1> | { [key: string]: unknown };
330
+ export namespace ChatMessage {
331
+ export interface MultimodalContent {
332
+ type: 'text' | 'image_url';
185
333
 
186
- /**
187
- * Message role
188
- */
189
- role: 'system' | 'user' | 'assistant' | 'tool';
334
+ image_url?: MultimodalContent.ImageURL;
190
335
 
191
- /**
192
- * Tool name (required when role is "tool")
193
- */
194
- name?: string;
336
+ text?: string;
337
+ }
195
338
 
196
- /**
197
- * Tool call ID (for tool role)
198
- */
199
- tool_call_id?: string;
339
+ export namespace MultimodalContent {
340
+ export interface ImageURL {
341
+ url: string;
342
+ }
200
343
  }
201
344
 
202
- export namespace Message {
203
- export interface UnionMember1 {
204
- type: 'text' | 'image_url';
345
+ export interface ToolCall {
346
+ id: string;
205
347
 
206
- image_url?: UnionMember1.ImageURL;
348
+ function: ToolCall.Function;
207
349
 
208
- text?: string;
209
- }
350
+ type: 'function';
351
+ }
210
352
 
211
- export namespace UnionMember1 {
212
- export interface ImageURL {
213
- url: string;
214
- }
353
+ export namespace ToolCall {
354
+ export interface Function {
355
+ arguments: string;
356
+
357
+ name: string;
215
358
  }
216
359
  }
217
360
  }
218
361
 
219
- export interface AgentInvokeResponse {
362
+ export interface StreamChunk {
220
363
  /**
221
- * Output from the agent. Structure depends on agent implementation.
364
+ * Text chunk from the stream
222
365
  */
223
- output?: unknown;
366
+ chunk: string;
367
+
368
+ [k: string]: unknown;
369
+ }
370
+
371
+ export interface AgentChatResponse {
372
+ /**
373
+ * Array of assistant response messages
374
+ */
375
+ messages: Array<ChatMessage>;
376
+
377
+ /**
378
+ * Conversation ID (present when conversation persistence is enabled)
379
+ */
380
+ conversation_id?: string;
381
+ }
382
+
383
+ /**
384
+ * Response with dynamic keys based on agent configuration. Regular agents return {
385
+ * output: ... }, chat agents return { messages: [...] }.
386
+ */
387
+ export type AgentExecuteResponse = { [key: string]: unknown };
388
+
389
+ export interface AgentListParams extends CursorParams {
390
+ /**
391
+ * Filter by agent status
392
+ */
393
+ status?: 'active' | 'inactive';
394
+
395
+ /**
396
+ * Filter by agent type (managed, python, typescript, python-langchain, etc.)
397
+ */
398
+ type?: string;
224
399
  }
225
400
 
226
401
  export type AgentChatParams = AgentChatParamsNonStreaming | AgentChatParamsStreaming;
227
402
 
228
403
  export interface AgentChatParamsBase {
229
404
  /**
230
- * Conversation history. Must include at least one message.
405
+ * Array of chat messages
406
+ */
407
+ messages: Array<ChatMessage>;
408
+
409
+ /**
410
+ * Optional context for the agent execution
231
411
  */
232
- messages: Array<AgentChatParams.Message>;
412
+ context?: AgentChatParams.Context;
233
413
 
234
414
  /**
235
- * Optional request context passed to the agent handler.
415
+ * Conversation ID to continue an existing conversation
236
416
  */
237
- context?: Context;
417
+ conversation_id?: string;
238
418
 
239
419
  /**
240
- * Whether to stream the response as SSE.
420
+ * Enable streaming response
241
421
  */
242
422
  stream?: boolean;
243
423
  }
244
424
 
245
425
  export namespace AgentChatParams {
246
- export interface Message {
247
- /**
248
- * Message content. Can be string, array (multimodal), or object (tool).
249
- */
250
- content: string | Array<Message.UnionMember1> | { [key: string]: unknown };
251
-
252
- /**
253
- * Message role
254
- */
255
- role: 'system' | 'user' | 'assistant' | 'tool';
256
-
257
- /**
258
- * Tool name (required when role is "tool")
259
- */
260
- name?: string;
261
-
426
+ /**
427
+ * Optional context for the agent execution
428
+ */
429
+ export interface Context {
262
430
  /**
263
- * Tool call ID (for tool role)
431
+ * Identity fields for conversation scoping (e.g., user_id, tenant_id)
264
432
  */
265
- tool_call_id?: string;
266
- }
433
+ identity?: { [key: string]: unknown };
267
434
 
268
- export namespace Message {
269
- export interface UnionMember1 {
270
- type: 'text' | 'image_url';
271
-
272
- image_url?: UnionMember1.ImageURL;
273
-
274
- text?: string;
275
- }
276
-
277
- export namespace UnionMember1 {
278
- export interface ImageURL {
279
- url: string;
280
- }
281
- }
435
+ [k: string]: unknown;
282
436
  }
283
437
 
284
438
  export type AgentChatParamsNonStreaming = AgentsAPI.AgentChatParamsNonStreaming;
@@ -287,67 +441,84 @@ export namespace AgentChatParams {
287
441
 
288
442
  export interface AgentChatParamsNonStreaming extends AgentChatParamsBase {
289
443
  /**
290
- * Whether to stream the response as SSE.
444
+ * Enable streaming response
291
445
  */
292
446
  stream?: false;
293
447
  }
294
448
 
295
449
  export interface AgentChatParamsStreaming extends AgentChatParamsBase {
296
450
  /**
297
- * Whether to stream the response as SSE.
451
+ * Enable streaming response
298
452
  */
299
453
  stream: true;
300
454
  }
301
455
 
302
- export type AgentInvokeParams = AgentInvokeParamsNonStreaming | AgentInvokeParamsStreaming;
456
+ export type AgentExecuteParams = AgentExecuteParamsNonStreaming | AgentExecuteParamsStreaming;
303
457
 
304
- export interface AgentInvokeParamsBase {
458
+ export interface AgentExecuteParamsBase {
305
459
  /**
306
- * Input data for the agent. Structure depends on agent implementation.
460
+ * Optional context for the agent execution
307
461
  */
308
- input: { [key: string]: unknown };
462
+ context?: AgentExecuteParams.Context;
309
463
 
310
464
  /**
311
- * Optional request context passed to the agent handler.
465
+ * Enable streaming response (SSE)
312
466
  */
313
- context?: Context;
467
+ stream?: boolean;
468
+
469
+ [k: string]: unknown;
470
+ }
314
471
 
472
+ export namespace AgentExecuteParams {
315
473
  /**
316
- * Whether to stream the response as SSE.
474
+ * Optional context for the agent execution
317
475
  */
318
- stream?: boolean;
319
- }
476
+ export interface Context {
477
+ /**
478
+ * Identity fields for conversation scoping (e.g., user_id, tenant_id)
479
+ */
480
+ identity?: { [key: string]: unknown };
481
+
482
+ [k: string]: unknown;
483
+ }
320
484
 
321
- export namespace AgentInvokeParams {
322
- export type AgentInvokeParamsNonStreaming = AgentsAPI.AgentInvokeParamsNonStreaming;
323
- export type AgentInvokeParamsStreaming = AgentsAPI.AgentInvokeParamsStreaming;
485
+ export type AgentExecuteParamsNonStreaming = AgentsAPI.AgentExecuteParamsNonStreaming;
486
+ export type AgentExecuteParamsStreaming = AgentsAPI.AgentExecuteParamsStreaming;
324
487
  }
325
488
 
326
- export interface AgentInvokeParamsNonStreaming extends AgentInvokeParamsBase {
489
+ export interface AgentExecuteParamsNonStreaming extends AgentExecuteParamsBase {
327
490
  /**
328
- * Whether to stream the response as SSE.
491
+ * Enable streaming response (SSE)
329
492
  */
330
493
  stream?: false;
494
+
495
+ [k: string]: unknown;
331
496
  }
332
497
 
333
- export interface AgentInvokeParamsStreaming extends AgentInvokeParamsBase {
498
+ export interface AgentExecuteParamsStreaming extends AgentExecuteParamsBase {
334
499
  /**
335
- * Whether to stream the response as SSE.
500
+ * Enable streaming response (SSE)
336
501
  */
337
502
  stream: true;
503
+
504
+ [k: string]: unknown;
338
505
  }
339
506
 
340
507
  export declare namespace Agents {
341
508
  export {
342
- type Context as Context,
509
+ type Agent as Agent,
510
+ type AgentConfig as AgentConfig,
511
+ type ChatMessage as ChatMessage,
343
512
  type StreamChunk as StreamChunk,
344
513
  type AgentChatResponse as AgentChatResponse,
345
- type AgentInvokeResponse as AgentInvokeResponse,
514
+ type AgentExecuteResponse as AgentExecuteResponse,
515
+ type AgentsCursor as AgentsCursor,
516
+ type AgentListParams as AgentListParams,
346
517
  type AgentChatParams as AgentChatParams,
347
518
  type AgentChatParamsNonStreaming as AgentChatParamsNonStreaming,
348
519
  type AgentChatParamsStreaming as AgentChatParamsStreaming,
349
- type AgentInvokeParams as AgentInvokeParams,
350
- type AgentInvokeParamsNonStreaming as AgentInvokeParamsNonStreaming,
351
- type AgentInvokeParamsStreaming as AgentInvokeParamsStreaming,
520
+ type AgentExecuteParams as AgentExecuteParams,
521
+ type AgentExecuteParamsNonStreaming as AgentExecuteParamsNonStreaming,
522
+ type AgentExecuteParamsStreaming as AgentExecuteParamsStreaming,
352
523
  };
353
524
  }