@convex-dev/agent 0.0.14 → 0.0.15-alpha.1

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.
@@ -3,13 +3,13 @@ import type { CoreMessage, DeepPartial, GenerateObjectResult, GenerateTextResult
3
3
  import { generateObject, generateText, streamObject, streamText } from "ai";
4
4
  import { Infer } from "convex/values";
5
5
  import { z } from "zod";
6
- import { Mounts } from "../component/_generated/api.js";
6
+ import { api } from "../component/_generated/api.js";
7
7
  import { type VectorDimension } from "../component/vector/tables.js";
8
8
  import { type AIMessageWithoutId } from "../mapping.js";
9
9
  import { type CallSettings, MessageWithMetadata, type ProviderMetadata, type ProviderOptions, type SearchOptions, type Usage } from "../validators.js";
10
10
  import type { OpaqueIds, RunActionCtx, RunMutationCtx, RunQueryCtx, UseApi } from "./types.js";
11
11
  import schema from "../component/schema.js";
12
- export { type Usage, type ProviderMetadata };
12
+ export type { Usage, ProviderMetadata };
13
13
  export { vUsage, vProviderMetadata, vUserMessage, vAssistantMessage, vToolMessage, vSystemMessage, vMessage, } from "../validators.js";
14
14
  export type ThreadDoc = OpaqueIds<{
15
15
  _id: string;
@@ -102,7 +102,7 @@ export type UsageHandler = (ctx: RunActionCtx, args: {
102
102
  provider: string;
103
103
  }) => void | Promise<void>;
104
104
  export declare class Agent<AgentTools extends ToolSet> {
105
- component: UseApi<Mounts>;
105
+ component: UseApi<typeof api>;
106
106
  options: {
107
107
  /**
108
108
  * The name for the agent. This will be attributed on each message
@@ -166,7 +166,7 @@ export declare class Agent<AgentTools extends ToolSet> {
166
166
  */
167
167
  usageHandler?: UsageHandler;
168
168
  };
169
- constructor(component: UseApi<Mounts>, options: {
169
+ constructor(component: UseApi<typeof api>, options: {
170
170
  /**
171
171
  * The name for the agent. This will be attributed on each message
172
172
  * created by this agent.
@@ -239,7 +239,7 @@ export declare class Agent<AgentTools extends ToolSet> {
239
239
  * @param args The thread metadata.
240
240
  * @returns The threadId of the new thread and the thread object.
241
241
  */
242
- createThread(ctx: RunActionCtx, args?: {
242
+ createThread<ThreadTools extends ToolSet | undefined = undefined>(ctx: RunActionCtx, args?: {
243
243
  /**
244
244
  * The userId to associate with the thread. If not provided, the thread will be
245
245
  * anonymous.
@@ -258,9 +258,14 @@ export declare class Agent<AgentTools extends ToolSet> {
258
258
  * set in the agent constructor.
259
259
  */
260
260
  usageHandler?: UsageHandler;
261
+ /**
262
+ * The tools to use for this thread.
263
+ * Overrides any tools passed in the agent constructor.
264
+ */
265
+ tools?: ThreadTools;
261
266
  }): Promise<{
262
267
  threadId: string;
263
- thread: Thread<AgentTools>;
268
+ thread: Thread<ThreadTools extends undefined ? AgentTools : ThreadTools>;
264
269
  }>;
265
270
  /**
266
271
  * Start a new thread with the agent. This will have a fresh history, though if
@@ -271,11 +276,30 @@ export declare class Agent<AgentTools extends ToolSet> {
271
276
  * @param args The thread metadata.
272
277
  * @returns The threadId of the new thread.
273
278
  */
274
- createThread(ctx: RunMutationCtx, args?: {
279
+ createThread<ThreadTools extends ToolSet | undefined = undefined>(ctx: RunMutationCtx, args?: {
280
+ /**
281
+ * The userId to associate with the thread. If not provided, the thread will be
282
+ * anonymous.
283
+ */
275
284
  userId?: string;
285
+ /**
286
+ * The title of the thread. Not currently used.
287
+ */
276
288
  title?: string;
289
+ /**
290
+ * The summary of the thread. Not currently used.
291
+ */
277
292
  summary?: string;
293
+ /**
294
+ * The usage handler to use for this thread. Overrides any handler
295
+ * set in the agent constructor.
296
+ */
278
297
  usageHandler?: UsageHandler;
298
+ /**
299
+ * The tools to use for this thread.
300
+ * Overrides any tools passed in the agent constructor.
301
+ */
302
+ tools?: ThreadTools;
279
303
  }): Promise<{
280
304
  threadId: string;
281
305
  }>;
@@ -287,7 +311,7 @@ export declare class Agent<AgentTools extends ToolSet> {
287
311
  * @param { threadId, userId }: the thread and user to associate the messages with.
288
312
  * @returns Functions bound to the userId and threadId on a `{thread}` object.
289
313
  */
290
- continueThread(ctx: RunActionCtx, args: {
314
+ continueThread<ThreadTools extends ToolSet | undefined = undefined>(ctx: RunActionCtx, args: {
291
315
  /**
292
316
  * The associated thread created by {@link createThread}
293
317
  */
@@ -302,8 +326,13 @@ export declare class Agent<AgentTools extends ToolSet> {
302
326
  * set in the agent constructor.
303
327
  */
304
328
  usageHandler?: UsageHandler;
329
+ /**
330
+ * The tools to use for this thread.
331
+ * Overrides any tools passed in the agent constructor.
332
+ */
333
+ tools?: ThreadTools;
305
334
  }): Promise<{
306
- thread: Thread<AgentTools>;
335
+ thread: Thread<ThreadTools extends undefined ? AgentTools : ThreadTools>;
307
336
  }>;
308
337
  /**
309
338
  * Fetch the context messages for a thread.
@@ -314,12 +343,18 @@ export declare class Agent<AgentTools extends ToolSet> {
314
343
  * @returns
315
344
  */
316
345
  fetchContextMessages(ctx: RunQueryCtx | RunActionCtx, args: {
317
- userId?: string;
318
- threadId?: string;
346
+ userId: string | undefined;
347
+ threadId: string | undefined;
319
348
  messages: CoreMessage[];
320
349
  parentMessageId?: string;
321
- } & ContextOptions): Promise<CoreMessage[]>;
322
- getEmbeddings(messages: CoreMessage[]): Promise<{
350
+ contextOptions: ContextOptions | undefined;
351
+ }): Promise<CoreMessage[]>;
352
+ /**
353
+ * Get the embeddings for a set of messages.
354
+ * @param messages The messages to get the embeddings for.
355
+ * @returns The embeddings for the messages.
356
+ */
357
+ generateEmbeddings(messages: CoreMessage[]): Promise<{
323
358
  vectors: (number[] | null)[];
324
359
  dimension: VectorDimension;
325
360
  model: string;
@@ -416,7 +451,7 @@ export declare class Agent<AgentTools extends ToolSet> {
416
451
  * for the {@link ContextOptions} and {@link StorageOptions}.
417
452
  * @returns The result of the generateText function.
418
453
  */
419
- generateText<TOOLS extends ToolSet, OUTPUT = never, OUTPUT_PARTIAL = never>(ctx: RunActionCtx, { userId, threadId, usageHandler, }: {
454
+ generateText<TOOLS extends ToolSet | undefined = undefined, OUTPUT = never, OUTPUT_PARTIAL = never>(ctx: RunActionCtx, { userId, threadId, usageHandler, tools: threadTools, }: {
420
455
  userId?: string;
421
456
  threadId?: string;
422
457
  /**
@@ -424,7 +459,11 @@ export declare class Agent<AgentTools extends ToolSet> {
424
459
  * set in the agent constructor.
425
460
  */
426
461
  usageHandler?: UsageHandler;
427
- }, args: TextArgs<AgentTools, TOOLS, Parameters<typeof generateText<TOOLS, OUTPUT, OUTPUT_PARTIAL>>[0]>): Promise<GenerateTextResult<TOOLS & AgentTools, OUTPUT> & GenerationOutputMetadata>;
462
+ /**
463
+ * The tools to use for this thread. Overrides any tools passed in the agent constructor.
464
+ */
465
+ tools?: ToolSet;
466
+ }, args: TextArgs<AgentTools, TOOLS, OUTPUT, OUTPUT_PARTIAL>): Promise<GenerateTextResult<TOOLS extends undefined ? AgentTools : TOOLS, OUTPUT> & GenerationOutputMetadata>;
428
467
  /**
429
468
  * This behaves like {@link streamText} from the "ai" package except that
430
469
  * it add context based on the userId and threadId and saves the input and
@@ -437,11 +476,17 @@ export declare class Agent<AgentTools extends ToolSet> {
437
476
  * for the {@link ContextOptions} and {@link StorageOptions}.
438
477
  * @returns The result of the streamText function.
439
478
  */
440
- streamText<TOOLS extends ToolSet, OUTPUT = never, PARTIAL_OUTPUT = never>(ctx: RunActionCtx, { userId, threadId, usageHandler, }: {
479
+ streamText<TOOLS extends ToolSet | undefined = undefined, OUTPUT = never, PARTIAL_OUTPUT = never>(ctx: RunActionCtx, { userId, threadId, usageHandler,
480
+ /**
481
+ * @deprecated Pass `tools` in the next parameter instead.
482
+ * This is only intended to pass through thread-default tools.
483
+ */
484
+ tools: threadTools, }: {
441
485
  userId?: string;
442
486
  threadId?: string;
443
487
  usageHandler?: UsageHandler;
444
- }, args: TextArgs<AgentTools, TOOLS, Parameters<typeof streamText<TOOLS, OUTPUT, PARTIAL_OUTPUT>>[0]>): Promise<StreamTextResult<TOOLS, PARTIAL_OUTPUT> & GenerationOutputMetadata>;
488
+ tools?: ToolSet;
489
+ }, args: StreamingTextArgs<AgentTools, TOOLS, OUTPUT, PARTIAL_OUTPUT>): Promise<StreamTextResult<TOOLS extends undefined ? AgentTools : TOOLS, PARTIAL_OUTPUT> & GenerationOutputMetadata>;
445
490
  saveMessagesAndFetchContext<T extends {
446
491
  id?: string;
447
492
  prompt?: string;
@@ -451,9 +496,9 @@ export declare class Agent<AgentTools extends ToolSet> {
451
496
  userId: string | undefined;
452
497
  threadId: string | undefined;
453
498
  parentMessageId?: string;
454
- saveAllInputMessages?: boolean;
455
- saveAnyInputMessages?: boolean;
456
- } & ContextOptions & T): Promise<{
499
+ contextOptions?: ContextOptions;
500
+ storageOptions?: StorageOptions;
501
+ } & T): Promise<{
457
502
  args: T;
458
503
  messageId: string | undefined;
459
504
  }>;
@@ -505,7 +550,7 @@ export declare class Agent<AgentTools extends ToolSet> {
505
550
  result: GenerateObjectResult<unknown>;
506
551
  metadata?: Omit<MessageWithMetadata, "message">;
507
552
  }): Promise<void>;
508
- mergedContextOptions(opts: ContextOptions): ContextOptions;
553
+ mergedContextOptions(opts: ContextOptions | undefined): ContextOptions;
509
554
  searchOptionsWithDefaults(contextOptions: ContextOptions, messages: CoreMessage[]): Promise<SearchOptions>;
510
555
  /**
511
556
  * Create a mutation that creates a thread so you can call it from a Workflow.
@@ -834,29 +879,102 @@ export declare function createTool<PARAMETERS extends ToolParameters, RESULT>(t:
834
879
  }): Tool<PARAMETERS, RESULT> & {
835
880
  execute: (args: inferParameters<PARAMETERS>, options: ToolExecutionOptions) => PromiseLike<RESULT>;
836
881
  };
837
- type TextArgs<AgentTools extends ToolSet, TOOLS extends ToolSet, T extends {
838
- toolChoice?: ToolChoice<TOOLS & AgentTools>;
839
- tools?: TOOLS;
840
- model: LanguageModelV1;
841
- }> = Omit<T, "toolChoice" | "tools" | "model"> & {
882
+ type TextArgs<AgentTools extends ToolSet, TOOLS extends ToolSet | undefined = undefined, OUTPUT = never, OUTPUT_PARTIAL = never> = Omit<Parameters<typeof generateText<TOOLS extends undefined ? AgentTools : TOOLS, OUTPUT, OUTPUT_PARTIAL>>[0], "toolChoice" | "tools" | "model"> & {
883
+ /**
884
+ * The model to use for the tool calls. This will override the model specified
885
+ * in the Agent constructor.
886
+ */
842
887
  model?: LanguageModelV1;
888
+ /**
889
+ * The tools to use for the tool calls. This will override tools specified
890
+ * in the Agent constructor or createThread / continueThread.
891
+ */
892
+ tools?: TOOLS;
893
+ /**
894
+ * The tool choice to use for the tool calls. This must be one of the tools
895
+ * specified in the tools array. e.g. {toolName: "getWeather", type: "tool"}
896
+ */
897
+ toolChoice?: ToolChoice<TOOLS extends undefined ? AgentTools : TOOLS>;
898
+ /**
899
+ * The parent message id to use for the tool calls.
900
+ */
843
901
  parentMessageId?: string;
844
- } & {
902
+ /**
903
+ * The context options to use for passing in message history to the LLM.
904
+ */
905
+ contextOptions?: ContextOptions;
906
+ /**
907
+ * The storage options to use for saving the input and output messages to the thread.
908
+ */
909
+ storageOptions?: StorageOptions;
910
+ } & ContextOptions & StorageOptions;
911
+ type StreamingTextArgs<AgentTools extends ToolSet, TOOLS extends ToolSet | undefined = undefined, OUTPUT = never, OUTPUT_PARTIAL = never> = Omit<Parameters<typeof streamText<TOOLS extends undefined ? AgentTools : TOOLS, OUTPUT, OUTPUT_PARTIAL>>[0], "toolChoice" | "tools" | "model"> & {
912
+ /**
913
+ * The model to use for the tool calls. This will override the model specified
914
+ * in the Agent constructor.
915
+ */
916
+ model?: LanguageModelV1;
917
+ /**
918
+ * The tools to use for the tool calls. This will override tools specified
919
+ * in the Agent constructor or createThread / continueThread.
920
+ */
845
921
  tools?: TOOLS;
846
- toolChoice?: ToolChoice<{
847
- [key in keyof TOOLS | keyof AgentTools]: unknown;
848
- }>;
922
+ /**
923
+ * The tool choice to use for the tool calls. This must be one of the tools
924
+ * specified in the tools array. e.g. {toolName: "getWeather", type: "tool"}
925
+ */
926
+ toolChoice?: ToolChoice<TOOLS extends undefined ? AgentTools : TOOLS>;
927
+ /**
928
+ * The parent message id to use for the tool calls.
929
+ */
930
+ parentMessageId?: string;
931
+ /**
932
+ * The context options to use for passing in message history to the LLM.
933
+ */
934
+ contextOptions?: ContextOptions;
935
+ /**
936
+ * The storage options to use for saving the input and output messages to the thread.
937
+ */
938
+ storageOptions?: StorageOptions;
849
939
  } & ContextOptions & StorageOptions;
850
940
  type BaseGenerateObjectOptions = StorageOptions & ContextOptions & CallSettings & {
941
+ /**
942
+ * The model to use for the object generation. This will override the model
943
+ * specified in the Agent constructor.
944
+ */
851
945
  model?: LanguageModelV1;
852
- parentMessageId?: string;
946
+ /**
947
+ * The system prompt to use for the object generation. This will override the
948
+ * system prompt specified in the Agent constructor.
949
+ */
853
950
  system?: string;
951
+ /**
952
+ * The prompt to the LLM to use for the object generation.
953
+ * Specify this or messages, but not both.
954
+ */
854
955
  prompt?: string;
956
+ /**
957
+ * The messages to use for the object generation.
958
+ * Note: recent messages are automatically added based on the thread it's
959
+ * associated with and your contextOptions.
960
+ */
855
961
  messages?: CoreMessage[];
856
962
  experimental_repairText?: RepairTextFunction;
857
963
  experimental_telemetry?: TelemetrySettings;
858
964
  providerOptions?: ProviderOptions;
859
965
  experimental_providerMetadata?: ProviderMetadata;
966
+ /**
967
+ * The parent message id to use for the object generation.
968
+ */
969
+ parentMessageId?: string;
970
+ /**
971
+ * The context options to use for passing in message history to the LLM.
972
+ */
973
+ contextOptions?: ContextOptions;
974
+ /**
975
+ * The storage options to use for saving the input and output messages to the thread.
976
+ */
977
+ storageOptions?: StorageOptions;
860
978
  };
861
979
  type GenerateObjectObjectOptions<T extends Record<string, unknown>> = BaseGenerateObjectOptions & {
862
980
  output?: "object";
@@ -888,7 +1006,7 @@ type OurStreamObjectArgs<T> = StreamObjectArgs<T> & Pick<Parameters<typeof strea
888
1006
  type ThreadOutputMetadata = GenerationOutputMetadata & {
889
1007
  messageId: string;
890
1008
  };
891
- interface Thread<AgentTools extends ToolSet> {
1009
+ interface Thread<DefaultTools extends ToolSet> {
892
1010
  /**
893
1011
  * The target threadId, from the startThread or continueThread initializers.
894
1012
  */
@@ -903,7 +1021,7 @@ interface Thread<AgentTools extends ToolSet> {
903
1021
  * for the {@link ContextOptions} and {@link StorageOptions}.
904
1022
  * @returns The result of the generateText function.
905
1023
  */
906
- generateText<TOOLS extends ToolSet, OUTPUT = never, OUTPUT_PARTIAL = never>(args: TextArgs<AgentTools, TOOLS, Parameters<typeof generateText<TOOLS, OUTPUT, OUTPUT_PARTIAL>>[0]>): Promise<GenerateTextResult<TOOLS & AgentTools, OUTPUT> & ThreadOutputMetadata>;
1024
+ generateText<TOOLS extends ToolSet | undefined = undefined, OUTPUT = never, OUTPUT_PARTIAL = never>(args: TextArgs<TOOLS extends undefined ? DefaultTools : TOOLS, TOOLS, OUTPUT, OUTPUT_PARTIAL>): Promise<GenerateTextResult<TOOLS extends undefined ? DefaultTools : TOOLS, OUTPUT> & ThreadOutputMetadata>;
907
1025
  /**
908
1026
  * This behaves like {@link streamText} from the "ai" package except that
909
1027
  * it add context based on the userId and threadId and saves the input and
@@ -914,7 +1032,7 @@ interface Thread<AgentTools extends ToolSet> {
914
1032
  * for the {@link ContextOptions} and {@link StorageOptions}.
915
1033
  * @returns The result of the streamText function.
916
1034
  */
917
- streamText<TOOLS extends ToolSet, OUTPUT = never, PARTIAL_OUTPUT = never>(args: TextArgs<AgentTools, TOOLS, Parameters<typeof streamText<TOOLS, OUTPUT, PARTIAL_OUTPUT>>[0]>): Promise<StreamTextResult<TOOLS & AgentTools, PARTIAL_OUTPUT> & ThreadOutputMetadata>;
1035
+ streamText<TOOLS extends ToolSet | undefined = undefined, OUTPUT = never, PARTIAL_OUTPUT = never>(args: StreamingTextArgs<TOOLS extends undefined ? DefaultTools : TOOLS, TOOLS, OUTPUT, PARTIAL_OUTPUT>): Promise<StreamTextResult<TOOLS extends undefined ? DefaultTools : TOOLS, PARTIAL_OUTPUT> & ThreadOutputMetadata>;
918
1036
  /**
919
1037
  * This behaves like {@link generateObject} from the "ai" package except that
920
1038
  * it add context based on the userId and threadId and saves the input and
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.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f,GACA,OAAO,CACR,gBAAgB,CACd,KAAK,SAAS,SAAS,GAAG,YAAY,GAAG,KAAK,EAC9C,cAAc,CACf,GACC,oBAAoB,CACvB,CAAC;IACF;;;;;;;;;OASG;IACH,cAAc,CAAC,CAAC,EACd,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,GACrB,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,GAAG,oBAAoB,CAAC,CAAC;IAC3D;;;;;;;;;OASG;IACH,cAAc,CACZ,IAAI,EAAE,6BAA6B,GAClC,OAAO,CAAC,oBAAoB,CAAC,SAAS,CAAC,GAAG,oBAAoB,CAAC,CAAC;IACnE;;;;;;;;;OASG;IACH,YAAY,CAAC,CAAC,EACZ,IAAI,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAC3B,OAAO,CACR,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,GAAG,oBAAoB,CACpE,CAAC;CACH"}
@@ -10,7 +10,9 @@ export { vUsage, vProviderMetadata, vUserMessage, vAssistantMessage, vToolMessag
10
10
  export class Agent {
11
11
  component;
12
12
  options;
13
- constructor(component, options) {
13
+ constructor(
14
+ // public component: UseApi<Mounts>,
15
+ component, options) {
14
16
  this.component = component;
15
17
  this.options = options;
16
18
  }
@@ -28,6 +30,7 @@ export class Agent {
28
30
  threadId: threadDoc._id,
29
31
  userId: args?.userId,
30
32
  usageHandler: args?.usageHandler,
33
+ tools: args?.tools,
31
34
  });
32
35
  return {
33
36
  threadId: threadDoc._id,
@@ -66,13 +69,15 @@ export class Agent {
66
69
  // Fetch the latest messages from the thread
67
70
  const contextMessages = [];
68
71
  let included;
69
- const opts = this.mergedContextOptions(args);
72
+ const opts = this.mergedContextOptions(args.contextOptions);
70
73
  if (opts.searchOptions?.textSearch || opts.searchOptions?.vectorSearch) {
71
74
  if (!("runAction" in ctx)) {
72
75
  throw new Error("searchUserMessages only works in an action");
73
76
  }
74
77
  const searchMessages = await ctx.runAction(this.component.messages.searchMessages, {
75
- userId: args.searchOtherThreads ? args.userId : undefined,
78
+ userId: args.contextOptions?.searchOtherThreads
79
+ ? args.userId
80
+ : undefined,
76
81
  threadId: args.threadId,
77
82
  parentMessageId: args.parentMessageId,
78
83
  ...(await this.searchOptionsWithDefaults(opts, args.messages)),
@@ -99,7 +104,12 @@ export class Agent {
99
104
  .sort((a, b) => a.order === b.order ? a.stepOrder - b.stepOrder : a.order - b.order)
100
105
  .map((m) => deserializeMessage(m.message));
101
106
  }
102
- async getEmbeddings(messages) {
107
+ /**
108
+ * Get the embeddings for a set of messages.
109
+ * @param messages The messages to get the embeddings for.
110
+ * @returns The embeddings for the messages.
111
+ */
112
+ async generateEmbeddings(messages) {
103
113
  let embeddings;
104
114
  if (this.options.textEmbedding) {
105
115
  const messageTexts = messages.map((m) => !isTool(m) && extractText(m));
@@ -139,7 +149,7 @@ export class Agent {
139
149
  * @returns
140
150
  */
141
151
  async saveMessages(ctx, args) {
142
- const embeddings = await this.getEmbeddings(args.messages);
152
+ const embeddings = await this.generateEmbeddings(args.messages);
143
153
  const result = await ctx.runMutation(this.component.messages.addMessages, {
144
154
  threadId: args.threadId,
145
155
  userId: args.userId,
@@ -173,7 +183,7 @@ export class Agent {
173
183
  provider: args.provider ?? this.options.chat.provider,
174
184
  model: args.model ?? this.options.chat.modelId,
175
185
  });
176
- const embeddings = await this.getEmbeddings(messages.map((m) => m.message));
186
+ const embeddings = await this.generateEmbeddings(messages.map((m) => m.message));
177
187
  if (embeddings) {
178
188
  const { model, dimension, vectors } = embeddings;
179
189
  for (let i = 0; i < messages.length; i++) {
@@ -225,10 +235,10 @@ export class Agent {
225
235
  * for the {@link ContextOptions} and {@link StorageOptions}.
226
236
  * @returns The result of the generateText function.
227
237
  */
228
- async generateText(ctx, { userId, threadId, usageHandler, }, args) {
238
+ async generateText(ctx, { userId, threadId, usageHandler, tools: threadTools, }, args) {
229
239
  const { args: aiArgs, messageId } = await this.saveMessagesAndFetchContext(ctx, { ...args, userId, threadId });
230
240
  const toolCtx = { ...ctx, userId, threadId, messageId };
231
- const tools = wrapTools(toolCtx, this.options.tools, args.tools);
241
+ const tools = wrapTools(toolCtx, args.tools ?? threadTools ?? this.options.tools);
232
242
  const saveOutputMessages = args.saveOutputMessages ??
233
243
  this.options.storageOptions?.saveOutputMessages;
234
244
  const model = aiArgs.model ?? this.options.chat;
@@ -240,8 +250,6 @@ export class Agent {
240
250
  maxRetries: this.options.maxRetries,
241
251
  ...aiArgs,
242
252
  model,
243
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
244
- toolChoice: args.toolChoice,
245
253
  tools,
246
254
  onStepFinish: async (step) => {
247
255
  if (threadId && messageId && saveOutputMessages !== false) {
@@ -292,10 +300,15 @@ export class Agent {
292
300
  * for the {@link ContextOptions} and {@link StorageOptions}.
293
301
  * @returns The result of the streamText function.
294
302
  */
295
- async streamText(ctx, { userId, threadId, usageHandler, }, args) {
303
+ async streamText(ctx, { userId, threadId, usageHandler,
304
+ /**
305
+ * @deprecated Pass `tools` in the next parameter instead.
306
+ * This is only intended to pass through thread-default tools.
307
+ */
308
+ tools: threadTools, }, args) {
296
309
  const { args: aiArgs, messageId } = await this.saveMessagesAndFetchContext(ctx, { ...args, userId, threadId });
297
310
  const toolCtx = { ...ctx, userId, threadId, messageId };
298
- const tools = wrapTools(toolCtx, this.options.tools, args.tools);
311
+ const tools = wrapTools(toolCtx, args.tools ?? threadTools ?? this.options.tools);
299
312
  const saveOutputMessages = args.saveOutputMessages ??
300
313
  this.options.storageOptions?.saveOutputMessages;
301
314
  const model = aiArgs.model ?? this.options.chat;
@@ -306,8 +319,6 @@ export class Agent {
306
319
  maxRetries: this.options.maxRetries,
307
320
  ...aiArgs,
308
321
  model,
309
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
310
- toolChoice: args.toolChoice,
311
322
  tools,
312
323
  onChunk: async (chunk) => {
313
324
  // console.log("onChunk", chunk);
@@ -352,20 +363,19 @@ export class Agent {
352
363
  return result;
353
364
  }
354
365
  async saveMessagesAndFetchContext(ctx, { id, userId, threadId, parentMessageId, system, ...args }) {
355
- const saveAny = args.saveAnyInputMessages ??
356
- this.options.storageOptions?.saveAnyInputMessages;
357
- const saveAll = args.saveAllInputMessages ??
358
- this.options.storageOptions?.saveAllInputMessages;
366
+ const contextOptions = args.contextOptions ?? this.options.contextOptions ?? args;
367
+ const storageOptions = args.storageOptions ?? this.options.storageOptions ?? args;
359
368
  const messages = promptOrMessagesToCoreMessages(args);
360
369
  const contextMessages = await this.fetchContextMessages(ctx, {
361
- messages,
362
- parentMessageId,
363
370
  userId,
364
371
  threadId,
365
- ...args,
372
+ messages,
373
+ parentMessageId,
374
+ contextOptions,
366
375
  });
367
376
  let messageId;
368
- if (threadId && saveAny !== false) {
377
+ if (threadId && storageOptions?.saveAnyInputMessages !== false) {
378
+ const saveAll = storageOptions?.saveAllInputMessages;
369
379
  const coreMessages = saveAll ? messages : messages.slice(-1);
370
380
  const saved = await this.saveMessages(ctx, {
371
381
  threadId,
@@ -521,7 +531,7 @@ export class Agent {
521
531
  model: this.options.chat.modelId,
522
532
  provider: this.options.chat.provider,
523
533
  });
524
- const embeddings = await this.getEmbeddings([withoutEmbed[0].message]);
534
+ const embeddings = await this.generateEmbeddings([withoutEmbed[0].message]);
525
535
  const messages = embeddings?.vectors[0]
526
536
  ? [
527
537
  {
@@ -545,7 +555,7 @@ export class Agent {
545
555
  mergedContextOptions(opts) {
546
556
  const searchOptions = {
547
557
  ...this.options.contextOptions?.searchOptions,
548
- ...opts.searchOptions,
558
+ ...opts?.searchOptions,
549
559
  };
550
560
  return {
551
561
  ...this.options.contextOptions,