@voltagent/core 1.1.25 → 1.1.27

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/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ModelMessage, DataContent as DataContent$1, UserContent, AssistantContent, ToolContent, ProviderOptions as ProviderOptions$1 } from '@ai-sdk/provider-utils';
2
2
  export { AssistantContent, FilePart, ImagePart, TextPart, ToolContent, UserContent } from '@ai-sdk/provider-utils';
3
3
  import { TextStreamPart, generateText, UIMessage, StreamTextResult, LanguageModel, CallSettings, Output, ToolSet, GenerateTextResult, GenerateObjectResult, AsyncIterableStream as AsyncIterableStream$1, CallWarning, LanguageModelUsage, FinishReason, EmbeddingModel } from 'ai';
4
- export { hasToolCall, stepCountIs } from 'ai';
4
+ export { LanguageModel, hasToolCall, stepCountIs } from 'ai';
5
5
  import * as zod from 'zod';
6
6
  import { z } from 'zod';
7
7
  import { AsyncIterableStream } from '@voltagent/internal/utils';
@@ -158,7 +158,7 @@ declare class ToolManager {
158
158
  * @returns The result of the tool execution
159
159
  * @throws Error if the tool doesn't exist or fails to execute
160
160
  */
161
- executeTool(toolName: string, args: any, options?: ToolExecuteOptions): Promise<any>;
161
+ executeTool(toolName: string, args: unknown, options?: ToolExecuteOptions): Promise<unknown>;
162
162
  }
163
163
 
164
164
  /**
@@ -192,7 +192,7 @@ type ToolOptions<T extends ToolSchema = ToolSchema, O extends ToolSchema | undef
192
192
  /**
193
193
  * Function to execute when the tool is called
194
194
  */
195
- execute: (args: z.infer<T>, context?: OperationContext) => Promise<O extends ToolSchema ? z.infer<O> : unknown>;
195
+ execute?: (args: z.infer<T>, context?: OperationContext) => Promise<O extends ToolSchema ? z.infer<O> : unknown>;
196
196
  };
197
197
  /**
198
198
  * Tool class for defining tools that agents can use
@@ -221,7 +221,12 @@ declare class Tool<T extends ToolSchema = ToolSchema, O extends ToolSchema | und
221
221
  /**
222
222
  * Function to execute when the tool is called
223
223
  */
224
- readonly execute: (args: z.infer<T>, context?: OperationContext) => Promise<O extends ToolSchema ? z.infer<O> : unknown>;
224
+ readonly execute?: (args: z.infer<T>, context?: OperationContext) => Promise<O extends ToolSchema ? z.infer<O> : unknown>;
225
+ /**
226
+ * Whether this tool should be executed on the client side.
227
+ * Returns true when no server-side execute handler is provided.
228
+ */
229
+ readonly isClientSide: () => boolean;
225
230
  /**
226
231
  * Create a new tool
227
232
  */
@@ -634,13 +639,7 @@ type GetMessagesOptions = {
634
639
  /**
635
640
  * Memory options for MemoryManager
636
641
  */
637
- type MemoryOptions = {
638
- /**
639
- * Maximum number of messages to store in the database
640
- * @default 100
641
- */
642
- storageLimit?: number;
643
- };
642
+ type MemoryOptions = {};
644
643
  /**
645
644
  * Workflow state entry for suspension and resumption
646
645
  * Stores only the essential state needed to resume a workflow
@@ -743,11 +742,6 @@ interface MemoryConfig {
743
742
  * @default 3600000 (1 hour)
744
743
  */
745
744
  cacheTTL?: number;
746
- /**
747
- * Maximum number of messages to store per conversation
748
- * @default 100
749
- */
750
- storageLimit?: number;
751
745
  /**
752
746
  * Working memory configuration
753
747
  * Enables agents to maintain important context
@@ -1759,6 +1753,114 @@ interface VoltOpsPromptManager {
1759
1753
  entries: string[];
1760
1754
  };
1761
1755
  }
1756
+ type VoltOpsEvalRunStatus = "pending" | "running" | "succeeded" | "failed" | "cancelled";
1757
+ type VoltOpsTerminalEvalRunStatus = "succeeded" | "failed" | "cancelled";
1758
+ type VoltOpsEvalResultStatus = "pending" | "running" | "passed" | "failed" | "error";
1759
+ interface VoltOpsEvalRunSummary {
1760
+ id: string;
1761
+ status: VoltOpsEvalRunStatus | string;
1762
+ triggerSource: string;
1763
+ datasetId?: string | null;
1764
+ datasetVersionId?: string | null;
1765
+ datasetVersionLabel?: string | null;
1766
+ itemCount: number;
1767
+ successCount: number;
1768
+ failureCount: number;
1769
+ meanScore?: number | null;
1770
+ medianScore?: number | null;
1771
+ sumScore?: number | null;
1772
+ passRate?: number | null;
1773
+ startedAt?: string | null;
1774
+ completedAt?: string | null;
1775
+ durationMs?: number | null;
1776
+ tags?: string[] | null;
1777
+ createdAt: string;
1778
+ updatedAt: string;
1779
+ }
1780
+ interface VoltOpsCreateEvalRunRequest {
1781
+ experimentId?: string;
1782
+ datasetVersionId?: string;
1783
+ providerCredentialId?: string;
1784
+ triggerSource?: string;
1785
+ autoQueue?: boolean;
1786
+ }
1787
+ interface VoltOpsEvalRunResultScorePayload {
1788
+ scorerId: string;
1789
+ score?: number | null;
1790
+ threshold?: number | null;
1791
+ thresholdPassed?: boolean | null;
1792
+ metadata?: Record<string, unknown> | null;
1793
+ }
1794
+ interface VoltOpsEvalRunResultLiveMetadata {
1795
+ traceId?: string | null;
1796
+ spanId?: string | null;
1797
+ operationId?: string | null;
1798
+ operationType?: string | null;
1799
+ sampling?: {
1800
+ strategy: string;
1801
+ rate?: number | null;
1802
+ } | null;
1803
+ triggerSource?: string | null;
1804
+ environment?: string | null;
1805
+ }
1806
+ interface VoltOpsAppendEvalRunResultPayload {
1807
+ id?: string;
1808
+ datasetItemId?: string | null;
1809
+ datasetItemHash: string;
1810
+ status?: VoltOpsEvalResultStatus;
1811
+ input?: unknown;
1812
+ expected?: unknown;
1813
+ output?: unknown;
1814
+ durationMs?: number | null;
1815
+ scores?: VoltOpsEvalRunResultScorePayload[];
1816
+ metadata?: Record<string, unknown> | null;
1817
+ traceIds?: string[] | null;
1818
+ liveEval?: VoltOpsEvalRunResultLiveMetadata | null;
1819
+ }
1820
+ interface VoltOpsAppendEvalRunResultsRequest {
1821
+ results: VoltOpsAppendEvalRunResultPayload[];
1822
+ }
1823
+ interface VoltOpsEvalRunCompletionSummaryPayload {
1824
+ itemCount?: number;
1825
+ successCount?: number;
1826
+ failureCount?: number;
1827
+ meanScore?: number | null;
1828
+ medianScore?: number | null;
1829
+ sumScore?: number | null;
1830
+ passRate?: number | null;
1831
+ durationMs?: number | null;
1832
+ metadata?: Record<string, unknown> | null;
1833
+ }
1834
+ interface VoltOpsEvalRunErrorPayload {
1835
+ message: string;
1836
+ code?: string;
1837
+ details?: Record<string, unknown>;
1838
+ }
1839
+ interface VoltOpsCompleteEvalRunRequest {
1840
+ status: VoltOpsTerminalEvalRunStatus;
1841
+ summary?: VoltOpsEvalRunCompletionSummaryPayload;
1842
+ error?: VoltOpsEvalRunErrorPayload;
1843
+ }
1844
+ interface VoltOpsCreateScorerRequest {
1845
+ id: string;
1846
+ name: string;
1847
+ category?: string | null;
1848
+ description?: string | null;
1849
+ defaultThreshold?: number | null;
1850
+ thresholdOperator?: string | null;
1851
+ metadata?: Record<string, unknown> | null;
1852
+ }
1853
+ interface VoltOpsScorerSummary {
1854
+ id: string;
1855
+ name: string;
1856
+ category?: string | null;
1857
+ description?: string | null;
1858
+ defaultThreshold?: number | null;
1859
+ thresholdOperator?: string | null;
1860
+ metadata?: Record<string, unknown> | null;
1861
+ createdAt: string;
1862
+ updatedAt: string;
1863
+ }
1762
1864
  /**
1763
1865
  * Main VoltOps client interface
1764
1866
  */
@@ -1771,6 +1873,14 @@ interface VoltOpsClient$1 {
1771
1873
  };
1772
1874
  /** Create a prompt helper for agent instructions */
1773
1875
  createPromptHelper(agentId: string, historyEntryId?: string): PromptHelper;
1876
+ /** Create a new evaluation run in VoltOps */
1877
+ createEvalRun(payload?: VoltOpsCreateEvalRunRequest): Promise<VoltOpsEvalRunSummary>;
1878
+ /** Append evaluation results to an existing run */
1879
+ appendEvalRunResults(runId: string, payload: VoltOpsAppendEvalRunResultsRequest): Promise<VoltOpsEvalRunSummary>;
1880
+ /** Complete an evaluation run */
1881
+ completeEvalRun(runId: string, payload: VoltOpsCompleteEvalRunRequest): Promise<VoltOpsEvalRunSummary>;
1882
+ /** Upsert a scorer definition */
1883
+ createEvalScorer(payload: VoltOpsCreateScorerRequest): Promise<VoltOpsScorerSummary>;
1774
1884
  /** List managed memory databases available to the project */
1775
1885
  listManagedMemoryDatabases(): Promise<ManagedMemoryDatabaseSummary[]>;
1776
1886
  /** List credentials for a managed memory database */
@@ -2008,6 +2118,10 @@ declare class VoltOpsClient implements VoltOpsClient$1 {
2008
2118
  * Get prompt manager for direct access
2009
2119
  */
2010
2120
  getPromptManager(): VoltOpsPromptManager | undefined;
2121
+ createEvalRun(payload?: VoltOpsCreateEvalRunRequest): Promise<VoltOpsEvalRunSummary>;
2122
+ appendEvalRunResults(runId: string, payload: VoltOpsAppendEvalRunResultsRequest): Promise<VoltOpsEvalRunSummary>;
2123
+ completeEvalRun(runId: string, payload: VoltOpsCompleteEvalRunRequest): Promise<VoltOpsEvalRunSummary>;
2124
+ createEvalScorer(payload: VoltOpsCreateScorerRequest): Promise<VoltOpsScorerSummary>;
2011
2125
  private request;
2012
2126
  private buildQueryString;
2013
2127
  private createManagedMemoryClient;
@@ -2049,6 +2163,9 @@ declare class VoltOpsClient implements VoltOpsClient$1 {
2049
2163
  * Cleanup resources when client is no longer needed
2050
2164
  */
2051
2165
  dispose(): Promise<void>;
2166
+ private normalizeRunSummary;
2167
+ private normalizeDate;
2168
+ private normalizeScorerSummary;
2052
2169
  }
2053
2170
  /**
2054
2171
  * Factory function to create VoltOps client
@@ -2246,6 +2363,203 @@ interface VoltAgentStreamTextResult<TOOLS extends Record<string, any> = Record<s
2246
2363
  readonly fullStream: AsyncIterable<VoltAgentTextStreamPart<TOOLS>>;
2247
2364
  }
2248
2365
 
2366
+ type SamplingPolicy = {
2367
+ type: "always";
2368
+ } | {
2369
+ type: "never";
2370
+ } | {
2371
+ type: "ratio";
2372
+ rate: number;
2373
+ };
2374
+ interface SamplingMetadata {
2375
+ strategy: "always" | "never" | "ratio";
2376
+ rate?: number;
2377
+ applied?: boolean;
2378
+ }
2379
+ interface ScorerContext<Payload extends Record<string, unknown>, Params extends Record<string, unknown> = Record<string, unknown>> {
2380
+ payload: Payload;
2381
+ params: Params;
2382
+ }
2383
+ type ScorerResult = {
2384
+ status?: "success";
2385
+ score?: number | null;
2386
+ metadata?: Record<string, unknown> | null;
2387
+ } | {
2388
+ status: "error";
2389
+ score?: number | null;
2390
+ metadata?: Record<string, unknown> | null;
2391
+ error: unknown;
2392
+ } | {
2393
+ status: "skipped";
2394
+ score?: number | null;
2395
+ metadata?: Record<string, unknown> | null;
2396
+ };
2397
+ interface LocalScorerDefinition<Payload extends Record<string, unknown>, Params extends Record<string, unknown> = Record<string, unknown>> {
2398
+ id: string;
2399
+ name: string;
2400
+ scorer: (context: ScorerContext<Payload, Params>) => ScorerResult | Promise<ScorerResult>;
2401
+ params?: Params | ((payload: Payload) => Params | undefined | Promise<Params | undefined>);
2402
+ metadata?: Record<string, unknown> | null;
2403
+ sampling?: SamplingPolicy;
2404
+ }
2405
+ interface LocalScorerExecutionResult {
2406
+ id: string;
2407
+ name: string;
2408
+ status: "success" | "error" | "skipped";
2409
+ score: number | null;
2410
+ metadata: Record<string, unknown> | null;
2411
+ sampling?: SamplingMetadata;
2412
+ durationMs: number;
2413
+ error?: unknown;
2414
+ }
2415
+ interface ScorerLifecycleScope {
2416
+ run<T>(executor: () => T | Promise<T>): Promise<T>;
2417
+ }
2418
+ interface RunLocalScorersArgs<Payload extends Record<string, unknown>> {
2419
+ payload: Payload;
2420
+ scorers: LocalScorerDefinition<Payload>[];
2421
+ defaultSampling?: SamplingPolicy;
2422
+ baseArgs?: Record<string, unknown> | ((payload: Payload) => Record<string, unknown> | Promise<Record<string, unknown>>);
2423
+ onScorerStart?: (info: {
2424
+ definition: LocalScorerDefinition<Payload>;
2425
+ sampling?: SamplingMetadata;
2426
+ }) => ScorerLifecycleScope | undefined;
2427
+ onScorerComplete?: (info: {
2428
+ definition: LocalScorerDefinition<Payload>;
2429
+ execution: LocalScorerExecutionResult;
2430
+ context?: ScorerLifecycleScope;
2431
+ }) => void;
2432
+ }
2433
+ interface RunLocalScorersResult {
2434
+ results: LocalScorerExecutionResult[];
2435
+ summary: {
2436
+ successCount: number;
2437
+ errorCount: number;
2438
+ skippedCount: number;
2439
+ };
2440
+ }
2441
+ interface NormalizedScorerResult {
2442
+ score?: number | null;
2443
+ metadata?: Record<string, unknown> | null;
2444
+ error?: unknown;
2445
+ status?: "success" | "error" | "skipped";
2446
+ }
2447
+ declare function runLocalScorers<Payload extends Record<string, unknown>>(args: RunLocalScorersArgs<Payload>): Promise<RunLocalScorersResult>;
2448
+ declare function shouldSample(policy?: SamplingPolicy): boolean;
2449
+ declare function buildSamplingMetadata(policy?: SamplingPolicy): SamplingMetadata | undefined;
2450
+ declare function normalizeScorerResult(result: unknown): NormalizedScorerResult;
2451
+
2452
+ interface ScorerPipelineContext<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> {
2453
+ payload: Payload;
2454
+ params: Params;
2455
+ results: Record<string, unknown>;
2456
+ }
2457
+ interface ScorerReasonContext<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> extends ScorerPipelineContext<Payload, Params> {
2458
+ score: number | null;
2459
+ }
2460
+ type PreprocessFunctionStep<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> = (context: ScorerPipelineContext<Payload, Params>) => unknown | Promise<unknown>;
2461
+ type AnalyzeFunctionStep<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> = (context: ScorerPipelineContext<Payload, Params>) => unknown | Promise<unknown>;
2462
+ type GenerateScoreResult = number | {
2463
+ score: number;
2464
+ metadata?: Record<string, unknown> | null;
2465
+ };
2466
+ type PreprocessStep<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> = PreprocessFunctionStep<Payload, Params>;
2467
+ type AnalyzeStep<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> = AnalyzeFunctionStep<Payload, Params>;
2468
+ type GenerateScoreStep<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> = (context: ScorerPipelineContext<Payload, Params>) => GenerateScoreResult | Promise<GenerateScoreResult>;
2469
+ type GenerateReasonResult = string | {
2470
+ reason: string;
2471
+ metadata?: Record<string, unknown> | null;
2472
+ };
2473
+ type GenerateReasonStep<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> = (context: ScorerReasonContext<Payload, Params>) => GenerateReasonResult | Promise<GenerateReasonResult>;
2474
+ interface CreateScorerOptions<Payload extends Record<string, unknown> = Record<string, unknown>, Params extends Record<string, unknown> = Record<string, unknown>> {
2475
+ id: string;
2476
+ name?: string;
2477
+ metadata?: Record<string, unknown> | null;
2478
+ preprocess?: PreprocessStep<Payload, Params>;
2479
+ analyze?: AnalyzeStep<Payload, Params>;
2480
+ generateScore?: GenerateScoreStep<Payload, Params>;
2481
+ generateReason?: GenerateReasonStep<Payload, Params>;
2482
+ }
2483
+ declare function createScorer<Payload extends Record<string, unknown> = Record<string, unknown>, Params extends Record<string, unknown> = Record<string, unknown>>(options: CreateScorerOptions<Payload, Params>): LocalScorerDefinition<Payload, Params>;
2484
+ interface WeightedBlendComponent<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> {
2485
+ id: string;
2486
+ weight: number;
2487
+ step?: GenerateScoreStep<Payload, Params>;
2488
+ }
2489
+ interface WeightedBlendOptions {
2490
+ metadataKey?: string;
2491
+ }
2492
+ declare function weightedBlend<Payload extends Record<string, unknown>, Params extends Record<string, unknown>>(components: WeightedBlendComponent<Payload, Params>[], options?: WeightedBlendOptions): GenerateScoreStep<Payload, Params>;
2493
+
2494
+ interface BuilderResultsSnapshot {
2495
+ prepare?: unknown;
2496
+ analyze?: unknown;
2497
+ score?: number | null;
2498
+ reason?: string | null;
2499
+ raw: Record<string, unknown>;
2500
+ }
2501
+ interface BuilderContextBase<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> {
2502
+ payload: Payload;
2503
+ params: Params;
2504
+ results: BuilderResultsSnapshot;
2505
+ }
2506
+ interface BuilderPrepareContext<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> extends BuilderContextBase<Payload, Params> {
2507
+ kind: "prepare";
2508
+ }
2509
+ interface BuilderAnalyzeContext<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> extends BuilderContextBase<Payload, Params> {
2510
+ kind: "analyze";
2511
+ }
2512
+ interface BuilderScoreContext<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> extends BuilderContextBase<Payload, Params> {
2513
+ kind: "score";
2514
+ }
2515
+ interface BuilderReasonContext<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> extends BuilderContextBase<Payload, Params> {
2516
+ kind: "reason";
2517
+ score: number | null;
2518
+ }
2519
+ type BuilderPrepareStep<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> = (context: BuilderPrepareContext<Payload, Params>) => unknown | Promise<unknown>;
2520
+ type BuilderAnalyzeStep<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> = (context: BuilderAnalyzeContext<Payload, Params>) => unknown | Promise<unknown>;
2521
+ type BuilderScoreStep<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> = (context: BuilderScoreContext<Payload, Params>) => GenerateScoreResult | number | Promise<GenerateScoreResult | number>;
2522
+ type BuilderReasonStep<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> = (context: BuilderReasonContext<Payload, Params>) => GenerateReasonResult | string | Promise<GenerateReasonResult | string>;
2523
+ type BuildScorerCustomOptions<Payload extends Record<string, unknown> = Record<string, unknown>, Params extends Record<string, unknown> = Record<string, unknown>> = {
2524
+ id: string;
2525
+ label?: string;
2526
+ description?: string;
2527
+ metadata?: Record<string, unknown> | null;
2528
+ sampling?: SamplingPolicy;
2529
+ params?: Params | ((payload: Payload) => Params | undefined | Promise<Params | undefined>);
2530
+ };
2531
+ type BuildScorerOptions<Payload extends Record<string, unknown> = Record<string, unknown>, Params extends Record<string, unknown> = Record<string, unknown>> = BuildScorerCustomOptions<Payload, Params>;
2532
+ interface BuildScorerRunArgs<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> {
2533
+ payload: Payload;
2534
+ params?: Params;
2535
+ sampling?: SamplingPolicy;
2536
+ }
2537
+ interface BuildScorerRunResult<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> {
2538
+ id: string;
2539
+ status: "success" | "error" | "skipped";
2540
+ score: number | null;
2541
+ reason?: string;
2542
+ metadata: Record<string, unknown> | null;
2543
+ durationMs: number;
2544
+ sampling?: ReturnType<typeof buildSamplingMetadata>;
2545
+ rawResult: ScorerResult;
2546
+ payload: Payload;
2547
+ params: Params;
2548
+ steps: BuilderResultsSnapshot;
2549
+ }
2550
+ interface ScorerBuilder<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> {
2551
+ prepare(step: BuilderPrepareStep<Payload, Params>): ScorerBuilder<Payload, Params>;
2552
+ analyze(step: BuilderAnalyzeStep<Payload, Params>): ScorerBuilder<Payload, Params>;
2553
+ score(step: BuilderScoreStep<Payload, Params>): ScorerBuilder<Payload, Params>;
2554
+ reason(step: BuilderReasonStep<Payload, Params>): ScorerBuilder<Payload, Params>;
2555
+ build(): LocalScorerDefinition<Payload, Params>;
2556
+ run(args: BuildScorerRunArgs<Payload, Params>): Promise<BuildScorerRunResult<Payload, Params>>;
2557
+ getId(): string;
2558
+ getLabel(): string;
2559
+ getDescription(): string | undefined;
2560
+ }
2561
+ declare function buildScorer<Payload extends Record<string, unknown> = Record<string, unknown>, Params extends Record<string, unknown> = Record<string, unknown>>(options: BuildScorerOptions<Payload, Params>): ScorerBuilder<Payload, Params>;
2562
+
2249
2563
  /**
2250
2564
  * Unified Observability Types for VoltAgent
2251
2565
  *
@@ -3215,6 +3529,7 @@ declare class AgentTraceContext {
3215
3529
  error?: Error | any;
3216
3530
  attributes?: Record<string, any>;
3217
3531
  }): void;
3532
+ private resolveParentSpan;
3218
3533
  /**
3219
3534
  * Get the active context for manual context propagation
3220
3535
  */
@@ -3239,6 +3554,15 @@ interface ApiToolInfo {
3239
3554
  interface ToolWithNodeId extends BaseTool {
3240
3555
  node_id: string;
3241
3556
  }
3557
+ interface AgentScorerState {
3558
+ key: string;
3559
+ id: string;
3560
+ name: string;
3561
+ node_id: string;
3562
+ sampling?: SamplingPolicy;
3563
+ metadata?: Record<string, unknown> | null;
3564
+ params?: Record<string, unknown> | null;
3565
+ }
3242
3566
  /**
3243
3567
  * SubAgent data structure for agent state
3244
3568
  */
@@ -3252,6 +3576,7 @@ interface SubAgentStateData {
3252
3576
  memory?: AgentMemoryState;
3253
3577
  node_id: string;
3254
3578
  subAgents?: SubAgentStateData[];
3579
+ scorers?: AgentScorerState[];
3255
3580
  methodConfig?: {
3256
3581
  method: string;
3257
3582
  schema?: string;
@@ -3299,6 +3624,7 @@ interface AgentFullState {
3299
3624
  tools: ToolWithNodeId[];
3300
3625
  subAgents: SubAgentStateData[];
3301
3626
  memory: AgentMemoryState;
3627
+ scorers?: AgentScorerState[];
3302
3628
  retriever?: {
3303
3629
  name: string;
3304
3630
  description?: string;
@@ -3422,7 +3748,59 @@ type AgentOptions = {
3422
3748
  voltOpsClient?: VoltOpsClient;
3423
3749
  observability?: VoltAgentObservability;
3424
3750
  context?: ContextInput;
3751
+ eval?: AgentEvalConfig;
3752
+ };
3753
+ type AgentEvalOperationType = "generateText" | "streamText" | "generateObject" | "streamObject";
3754
+ interface AgentEvalPayload {
3755
+ operationId: string;
3756
+ operationType: AgentEvalOperationType;
3757
+ input?: string | null;
3758
+ output?: string | null;
3759
+ rawInput?: string | UIMessage[] | BaseMessage[];
3760
+ rawOutput?: unknown;
3761
+ userId?: string;
3762
+ conversationId?: string;
3763
+ traceId: string;
3764
+ spanId: string;
3765
+ metadata?: Record<string, unknown>;
3766
+ }
3767
+ type AgentEvalContext = AgentEvalPayload & Record<string, unknown> & {
3768
+ agentId: string;
3769
+ agentName: string;
3770
+ timestamp: string;
3771
+ rawPayload: AgentEvalPayload;
3425
3772
  };
3773
+ type AgentEvalParams = Record<string, unknown>;
3774
+ type AgentEvalSamplingPolicy = SamplingPolicy;
3775
+ type AgentEvalScorerFactory = () => LocalScorerDefinition<AgentEvalContext, Record<string, unknown>> | Promise<LocalScorerDefinition<AgentEvalContext, Record<string, unknown>>>;
3776
+ type AgentEvalScorerReference = LocalScorerDefinition<AgentEvalContext, Record<string, unknown>> | AgentEvalScorerFactory;
3777
+ interface AgentEvalResult {
3778
+ scorerId: string;
3779
+ scorerName?: string;
3780
+ status: "success" | "error" | "skipped";
3781
+ score?: number | null;
3782
+ metadata?: Record<string, unknown> | null;
3783
+ error?: unknown;
3784
+ durationMs?: number;
3785
+ payload: AgentEvalPayload;
3786
+ rawPayload: AgentEvalPayload;
3787
+ }
3788
+ interface AgentEvalScorerConfig {
3789
+ scorer: AgentEvalScorerReference;
3790
+ params?: AgentEvalParams | ((context: AgentEvalContext) => AgentEvalParams | undefined | Promise<AgentEvalParams | undefined>);
3791
+ sampling?: AgentEvalSamplingPolicy;
3792
+ id?: string;
3793
+ onResult?: (result: AgentEvalResult) => void | Promise<void>;
3794
+ buildPayload?: (context: AgentEvalContext) => Record<string, unknown> | Promise<Record<string, unknown>>;
3795
+ buildParams?: (context: AgentEvalContext) => AgentEvalParams | undefined | Promise<AgentEvalParams | undefined>;
3796
+ }
3797
+ interface AgentEvalConfig {
3798
+ scorers: Record<string, AgentEvalScorerConfig>;
3799
+ triggerSource?: string;
3800
+ environment?: string;
3801
+ sampling?: AgentEvalSamplingPolicy;
3802
+ redact?: (payload: AgentEvalPayload) => AgentEvalPayload;
3803
+ }
3426
3804
  /**
3427
3805
  * Agent status information
3428
3806
  */
@@ -3447,6 +3825,20 @@ type ModelToolCall = {
3447
3825
  toolName: string;
3448
3826
  args: Record<string, unknown>;
3449
3827
  };
3828
+ /**
3829
+ * Represents the payload used when sending a tool's result back to the chat runtime
3830
+ * via useChat().addToolResult in the Vercel AI SDK.
3831
+ */
3832
+ type ClientSideToolResult = {
3833
+ tool: string;
3834
+ toolCallId: string;
3835
+ output: unknown;
3836
+ } | {
3837
+ tool: string;
3838
+ toolCallId: string;
3839
+ state: "output-error";
3840
+ errorText: string;
3841
+ };
3450
3842
  /**
3451
3843
  * Agent response format
3452
3844
  */
@@ -3869,7 +4261,7 @@ declare class Agent {
3869
4261
  readonly purpose?: string;
3870
4262
  readonly instructions: InstructionsDynamicValue;
3871
4263
  readonly model: LanguageModel | DynamicValue<LanguageModel>;
3872
- readonly tools: (Tool<any, any> | Toolkit)[] | DynamicValue<(Tool<any, any> | Toolkit)[]>;
4264
+ readonly dynamicTools?: DynamicValue<(Tool<any, any> | Toolkit)[]>;
3873
4265
  readonly hooks: AgentHooks;
3874
4266
  readonly temperature?: number;
3875
4267
  readonly maxOutputTokens?: number;
@@ -3888,6 +4280,7 @@ declare class Agent {
3888
4280
  private readonly subAgentManager;
3889
4281
  private readonly voltOpsClient?;
3890
4282
  private readonly prompts?;
4283
+ private readonly evalConfig?;
3891
4284
  constructor(options: AgentOptions);
3892
4285
  /**
3893
4286
  * Generate text response
@@ -3928,6 +4321,8 @@ declare class Agent {
3928
4321
  * Calculate delegation depth
3929
4322
  */
3930
4323
  private calculateDelegationDepth;
4324
+ private enqueueEvalScoring;
4325
+ private createEvalHost;
3931
4326
  /**
3932
4327
  * Get observability instance (lazy initialization)
3933
4328
  */
@@ -4610,6 +5005,15 @@ interface WorkflowStreamWriter {
4610
5005
  filter?: (part: DangerouslyAllowAny) => boolean;
4611
5006
  }): Promise<void>;
4612
5007
  }
5008
+ /**
5009
+ * The state parameter passed to workflow steps
5010
+ */
5011
+ type WorkflowStepState<INPUT> = Omit<WorkflowState<INPUT, DangerouslyAllowAny>, "data" | "result"> & {
5012
+ /** Workflow execution context for event tracking */
5013
+ workflowContext?: WorkflowExecutionContext;
5014
+ /** AbortSignal for checking suspension during step execution */
5015
+ signal?: AbortSignal;
5016
+ };
4613
5017
 
4614
5018
  /**
4615
5019
  * WorkflowTraceContext - Manages trace hierarchy and common attributes for workflows
@@ -4938,8 +5342,8 @@ type ExtractExecuteResult<T> = T extends {
4938
5342
  execute: (...args: any[]) => infer R;
4939
5343
  } ? R extends Promise<infer U> ? U : R : never;
4940
5344
 
4941
- type AgentConfig$1<SCHEMA extends z.ZodTypeAny> = BaseGenerationOptions & {
4942
- schema: SCHEMA;
5345
+ type AgentConfig$1<SCHEMA extends z.ZodTypeAny, INPUT, DATA> = BaseGenerationOptions & {
5346
+ schema: SCHEMA | ((context: Omit<WorkflowExecuteContext<INPUT, DATA, any, any>, "suspend" | "writer">) => SCHEMA | Promise<SCHEMA>);
4943
5347
  };
4944
5348
  /**
4945
5349
  * Creates an agent step for a workflow
@@ -4964,7 +5368,7 @@ type AgentConfig$1<SCHEMA extends z.ZodTypeAny> = BaseGenerationOptions & {
4964
5368
  * @param config - The config for the agent (schema) `generateObject` call
4965
5369
  * @returns A workflow step that executes the agent with the task
4966
5370
  */
4967
- declare function andAgent<INPUT, DATA, SCHEMA extends z.ZodTypeAny>(task: UIMessage[] | ModelMessage[] | string | InternalWorkflowFunc<INPUT, DATA, UIMessage[] | ModelMessage[] | string, any, any>, agent: Agent, config: AgentConfig$1<SCHEMA>): {
5371
+ declare function andAgent<INPUT, DATA, SCHEMA extends z.ZodTypeAny>(task: UIMessage[] | ModelMessage[] | string | InternalWorkflowFunc<INPUT, DATA, UIMessage[] | ModelMessage[] | string, any, any>, agent: Agent, config: AgentConfig$1<SCHEMA, INPUT, DATA>): {
4968
5372
  type: "agent";
4969
5373
  id: string;
4970
5374
  name: string;
@@ -5373,8 +5777,8 @@ interface SerializedWorkflowStep {
5373
5777
  /**
5374
5778
  * Agent configuration for the chain
5375
5779
  */
5376
- type AgentConfig<SCHEMA extends z.ZodTypeAny> = {
5377
- schema: SCHEMA;
5780
+ type AgentConfig<SCHEMA extends z.ZodTypeAny, INPUT_SCHEMA extends InternalBaseWorkflowInputSchema, CURRENT_DATA> = BaseGenerationOptions & {
5781
+ schema: SCHEMA | ((context: Omit<WorkflowExecuteContext<WorkflowInput<INPUT_SCHEMA>, CURRENT_DATA, any, any>, "suspend" | "writer">) => SCHEMA | Promise<SCHEMA>);
5378
5782
  };
5379
5783
  /**
5380
5784
  * A workflow chain that provides a fluent API for building workflows
@@ -5451,7 +5855,7 @@ declare class WorkflowChain<INPUT_SCHEMA extends InternalBaseWorkflowInputSchema
5451
5855
  * @param config - The config for the agent (schema) `generateObject` call
5452
5856
  * @returns A workflow step that executes the agent with the task
5453
5857
  */
5454
- andAgent<SCHEMA extends z.ZodTypeAny>(task: string | UIMessage[] | ModelMessage[] | InternalWorkflowFunc<INPUT_SCHEMA, CURRENT_DATA, string | UIMessage[] | ModelMessage[], any, any>, agent: Agent, config: AgentConfig<SCHEMA>): WorkflowChain<INPUT_SCHEMA, RESULT_SCHEMA, z.infer<SCHEMA>, SUSPEND_SCHEMA, RESUME_SCHEMA>;
5858
+ andAgent<SCHEMA extends z.ZodTypeAny>(task: string | UIMessage[] | ModelMessage[] | InternalWorkflowFunc<WorkflowInput<INPUT_SCHEMA>, CURRENT_DATA, string | UIMessage[] | ModelMessage[], any, any>, agent: Agent, config: AgentConfig<SCHEMA, INPUT_SCHEMA, CURRENT_DATA>): WorkflowChain<INPUT_SCHEMA, RESULT_SCHEMA, z.infer<SCHEMA>, SUSPEND_SCHEMA, RESUME_SCHEMA>;
5455
5859
  /**
5456
5860
  * Add a function step to the workflow with both input and output schemas
5457
5861
  * @param config - Step configuration with schemas
@@ -5464,7 +5868,7 @@ declare class WorkflowChain<INPUT_SCHEMA extends InternalBaseWorkflowInputSchema
5464
5868
  resumeSchema?: RS;
5465
5869
  execute: (context: {
5466
5870
  data: z.infer<IS>;
5467
- state: any;
5871
+ state: WorkflowStepState<WorkflowInput<INPUT_SCHEMA>>;
5468
5872
  getStepData: (stepId: string) => {
5469
5873
  input: any;
5470
5874
  output: any;
@@ -5490,7 +5894,7 @@ declare class WorkflowChain<INPUT_SCHEMA extends InternalBaseWorkflowInputSchema
5490
5894
  resumeSchema?: RS;
5491
5895
  execute: (context: {
5492
5896
  data: z.infer<IS>;
5493
- state: any;
5897
+ state: WorkflowStepState<WorkflowInput<INPUT_SCHEMA>>;
5494
5898
  getStepData: (stepId: string) => {
5495
5899
  input: any;
5496
5900
  output: any;
@@ -5516,7 +5920,7 @@ declare class WorkflowChain<INPUT_SCHEMA extends InternalBaseWorkflowInputSchema
5516
5920
  resumeSchema?: RS;
5517
5921
  execute: (context: {
5518
5922
  data: CURRENT_DATA;
5519
- state: any;
5923
+ state: WorkflowStepState<WorkflowInput<INPUT_SCHEMA>>;
5520
5924
  getStepData: (stepId: string) => {
5521
5925
  input: any;
5522
5926
  output: any;
@@ -5542,7 +5946,7 @@ declare class WorkflowChain<INPUT_SCHEMA extends InternalBaseWorkflowInputSchema
5542
5946
  resumeSchema: RS;
5543
5947
  execute: (context: {
5544
5948
  data: CURRENT_DATA;
5545
- state: any;
5949
+ state: WorkflowStepState<WorkflowInput<INPUT_SCHEMA>>;
5546
5950
  getStepData: (stepId: string) => {
5547
5951
  input: any;
5548
5952
  output: any;
@@ -5584,7 +5988,7 @@ declare class WorkflowChain<INPUT_SCHEMA extends InternalBaseWorkflowInputSchema
5584
5988
  andThen<NEW_DATA>(config: {
5585
5989
  execute: (context: {
5586
5990
  data: CURRENT_DATA;
5587
- state: any;
5991
+ state: WorkflowStepState<WorkflowInput<INPUT_SCHEMA>>;
5588
5992
  getStepData: (stepId: string) => {
5589
5993
  input: any;
5590
5994
  output: any;
@@ -5614,7 +6018,7 @@ declare class WorkflowChain<INPUT_SCHEMA extends InternalBaseWorkflowInputSchema
5614
6018
  resumeSchema?: RS;
5615
6019
  condition: (context: {
5616
6020
  data: z.infer<IS>;
5617
- state: any;
6021
+ state: WorkflowStepState<WorkflowInput<INPUT_SCHEMA>>;
5618
6022
  getStepData: (stepId: string) => {
5619
6023
  input: any;
5620
6024
  output: any;
@@ -5675,7 +6079,7 @@ declare class WorkflowChain<INPUT_SCHEMA extends InternalBaseWorkflowInputSchema
5675
6079
  resumeSchema?: RS;
5676
6080
  execute: (context: {
5677
6081
  data: z.infer<IS>;
5678
- state: any;
6082
+ state: WorkflowStepState<WorkflowInput<INPUT_SCHEMA>>;
5679
6083
  getStepData: (stepId: string) => {
5680
6084
  input: any;
5681
6085
  output: any;
@@ -5716,7 +6120,7 @@ declare class WorkflowChain<INPUT_SCHEMA extends InternalBaseWorkflowInputSchema
5716
6120
  andTap<_NEW_DATA>(config: {
5717
6121
  execute: (context: {
5718
6122
  data: CURRENT_DATA;
5719
- state: any;
6123
+ state: WorkflowStepState<WorkflowInput<INPUT_SCHEMA>>;
5720
6124
  getStepData: (stepId: string) => {
5721
6125
  input: any;
5722
6126
  output: any;
@@ -6076,10 +6480,6 @@ declare class InMemoryStorageAdapter implements StorageAdapter {
6076
6480
  private users;
6077
6481
  private workflowStates;
6078
6482
  private workflowStatesByWorkflow;
6079
- private storageLimit;
6080
- constructor(options?: {
6081
- storageLimit?: number;
6082
- });
6083
6483
  /**
6084
6484
  * Add a single message
6085
6485
  */
@@ -7007,6 +7407,7 @@ declare enum NodeType {
7007
7407
  RETRIEVER = "retriever",
7008
7408
  VECTOR = "vector",
7009
7409
  EMBEDDING = "embedding",
7410
+ SCORER = "scorer",
7010
7411
  WORKFLOW_STEP = "workflow_step",
7011
7412
  WORKFLOW_AGENT_STEP = "workflow_agent_step",
7012
7413
  WORKFLOW_FUNC_STEP = "workflow_func_step",
@@ -7637,4 +8038,4 @@ declare class VoltAgent {
7637
8038
  */
7638
8039
  declare function convertUsage(usage: LanguageModelUsage | undefined): UsageInfo | undefined;
7639
8040
 
7640
- export { A2AServerRegistry, AbortError, Agent, type AgentFullState, type AgentHookOnEnd, type AgentHookOnError, type AgentHookOnHandoff, type AgentHookOnPrepareMessages, type AgentHookOnPrepareModelMessages, type AgentHookOnStart, type AgentHookOnStepFinish, type AgentHookOnToolEnd, type AgentHookOnToolStart, type AgentHooks, type AgentOptions, AgentRegistry, type AgentResponse, type AgentStatus, type AgentTool, AiSdkEmbeddingAdapter, type AllowedVariableValue, type ApiToolInfo, type BaseEventMetadata, type BaseGenerationOptions, type BaseLLMOptions, type BaseMessage, BaseRetriever, type BaseTool, type BaseToolCall, type CachedPrompt, type ChatMessage, ClientHTTPError, type CloudflareFetchHandler, type Conversation, ConversationAlreadyExistsError, ConversationNotFoundError, type ConversationQueryOptions, type ConversationQueryOptions as ConversationQueryOptionsV2, type Conversation as ConversationV2, type CreateConversationInput, type CreateConversationInput as CreateConversationInputV2, type CreateReasoningToolsOptions, DEFAULT_INSTRUCTIONS, type DataContent, type Document, type DynamicValue, type DynamicValueOptions, type EmbeddingAdapter$1 as EmbeddingAdapter, EmbeddingAdapterNotConfiguredError, EmbeddingError, type ExtractVariableNames, FEW_SHOT_EXAMPLES, type GenerateObjectOptions, type GenerateObjectSubAgentConfig, type GenerateTextOptions, type GenerateTextSubAgentConfig, type GetMessagesOptions, type IServerProvider, type IServerlessProvider, type VoltOpsClient$1 as IVoltOpsClient, InMemoryStorageAdapter$1 as InMemoryObservabilityAdapter, InMemoryStorageAdapter, InMemoryVectorAdapter, type InferGenerateObjectResponse, type InferGenerateTextResponse, type InferMessage, type InferModel, type InferProviderParams, type InferStreamResponse, type InferTool, type LLMProvider, LazyRemoteExportProcessor, LocalStorageSpanProcessor, type LogFilter, LoggerProxy, MCPConfiguration, type MCPElicitationAdapter, type MCPLoggingAdapter, type MCPPromptsAdapter, type MCPResourcesAdapter, MCPServerRegistry, type ManagedMemoryAddMessageInput, type ManagedMemoryAddMessagesInput, type ManagedMemoryClearMessagesInput, type ManagedMemoryConnectionInfo, type ManagedMemoryConversationsClient, type ManagedMemoryCredentialCreateResult, type ManagedMemoryCredentialListResult, type ManagedMemoryCredentialSummary, type ManagedMemoryDatabaseSummary, type ManagedMemoryGetMessagesInput, type ManagedMemoryMessagesClient, type ManagedMemorySetWorkingMemoryInput, type ManagedMemoryStatus, type ManagedMemoryUpdateConversationInput, type ManagedMemoryVoltOpsClient, type ManagedMemoryWorkflowStateUpdateInput, type ManagedMemoryWorkflowStatesClient, type ManagedMemoryWorkingMemoryClient, type ManagedMemoryWorkingMemoryInput, Memory, type MemoryConfig, type MemoryOptions, type MemoryStorageMetadata, type MemoryUpdateMode, Memory as MemoryV2, MemoryV2Error, type MessageContent, MessageContentBuilder, type MessageRole, type ModelToolCall, NextAction, NodeType, VoltAgentObservability$1 as NodeVoltAgentObservability, type ObservabilityConfig, type ObservabilityLogRecord, type ObservabilitySpan, type ObservabilityStorageAdapter, type ObservabilityWebSocketEvent, type OnEndHookArgs, type OnErrorHookArgs, type OnHandoffHookArgs, type OnPrepareMessagesHookArgs, type OnPrepareMessagesHookResult, type OnPrepareModelMessagesHookArgs, type OnPrepareModelMessagesHookResult, type OnStartHookArgs, type OnStepFinishHookArgs, type OnToolEndHookArgs, type OnToolStartHookArgs, type OperationContext, type PackageUpdateInfo, type PromptApiClient, type PromptApiResponse, type PromptContent, type PromptCreator, type PromptHelper, type PromptReference, type PromptTemplate, type ProviderObjectResponse, type ProviderObjectStreamResponse, type ProviderParams, type ProviderResponse, type ProviderTextResponse, type ProviderTextStreamResponse, type ReadableStreamType, type ReasoningStep, ReasoningStepSchema, type RegisterOptions, type RegisteredWorkflow, type RemoteLogExportConfig, RemoteLogProcessor, type RetrieveOptions, type Retriever, type RetrieverOptions, type SearchOptions, type SearchResult, type ServerAgentResponse, type ServerApiResponse, type ServerProviderDeps, type ServerProviderFactory, type ServerWorkflowResponse, type ServerlessProviderFactory, type ServerlessRemoteEndpointConfig, type ServerlessRemoteExportConfig, type ServerlessRequestHandler, ServerlessVoltAgentObservability, type SpanAttributes, type SpanEvent, type SpanFilterConfig, SpanFilterProcessor, SpanKind, type SpanLink, type SpanStatus, SpanStatusCode, type SpanTreeNode, type StepChunkCallback, type StepFinishCallback, type StepWithContent, type StopWhen, type StorageAdapter, StorageError, StorageLogProcessor, type StoredUIMessage, type StreamObjectFinishResult, type StreamObjectOnFinishCallback, type StreamObjectOptions, type StreamObjectSubAgentConfig, type StreamPart, type StreamTextFinishResult, type StreamTextOnFinishCallback, type StreamTextOptions, type StreamTextSubAgentConfig, type SubAgentConfig, type SubAgentMethod, type SubAgentStateData, type SupervisorConfig, type TemplateVariables, type TimelineEventCoreLevel, type TimelineEventCoreStatus, type TimelineEventCoreType, Tool, type ToolCall, ToolDeniedError, type ToolErrorInfo, type ToolExecuteOptions, ToolManager, type ToolOptions, type ToolSchema, type ToolStatus, type ToolStatusInfo, type ToolWithNodeId, type Toolkit, type Usage, type UsageInfo, type VectorAdapter, VectorAdapterNotConfiguredError, VectorError, type VectorItem, type VectorSearchOptions, type Voice, type VoiceEventData, type VoiceEventType, type VoiceMetadata, type VoiceOptions, VoltAgent, VoltAgentError, VoltAgentObservability, type VoltAgentOptions, type VoltAgentStreamTextResult, type VoltAgentTextStreamPart, VoltOpsClient, type VoltOpsClientOptions, VoltOpsPromptApiClient, type VoltOpsPromptManager, VoltOpsPromptManagerImpl, WebSocketEventEmitter, WebSocketLogProcessor, WebSocketSpanProcessor, type Workflow, type WorkflowConfig, type WorkflowExecutionContext, WorkflowRegistry, type WorkflowStateEntry, type WorkflowStats, type WorkflowStepContext, type WorkflowStepType, type WorkflowTimelineEvent, type WorkingMemoryConfig, type WorkingMemoryScope, type WorkingMemorySummary, type WorkingMemoryUpdateOptions, addTimestampToMessage, andAgent, andAll, andRace, andTap, andThen, andWhen, andWorkflow, appendToMessage, buildRetrieverLogMessage, buildSpanTree, checkForUpdates, convertUsage, cosineSimilarity, createHooks, createNodeId, createPrompt, createReasoningTools, createRetrieverTool, createSimpleTemplateEngine, createSubagent, createSuspendController, createTool, createToolkit, createVoltAgentObservability, createVoltOpsClient, createWorkflow, createWorkflowChain, createWorkflowStepNodeId, VoltAgent as default, extractFileParts, extractImageParts, extractText, extractTextParts, extractWorkflowStepInfo, filterContentParts, getContentLength, getEnvVar, getGlobalLogBuffer, getGlobalLogger, getNodeTypeFromNodeId, getWorkflowStepNodeType, hasContent, hasFilePart, hasImagePart, hasTextPart, isAbortError, isNodeRuntime, isServerlessRuntime, isStructuredContent, isTextContent, isVoltAgentError, mapMessageContent, messageHelpers, normalizeContent, normalizeToArray, prependToMessage, readableLogRecordToObservabilityLog, readableSpanToObservabilitySpan, safeJsonParse, serializeValueForDebug, tool, transformTextContent, updateAllPackages, updateSinglePackage, zodSchemaToJsonUI };
8041
+ export { A2AServerRegistry, AbortError, Agent, type AgentEvalConfig, type AgentEvalContext, type AgentEvalOperationType, type AgentEvalPayload, type AgentEvalResult, type AgentEvalSamplingPolicy, type AgentEvalScorerConfig, type AgentEvalScorerFactory, type AgentEvalScorerReference, type AgentFullState, type AgentHookOnEnd, type AgentHookOnError, type AgentHookOnHandoff, type AgentHookOnPrepareMessages, type AgentHookOnPrepareModelMessages, type AgentHookOnStart, type AgentHookOnStepFinish, type AgentHookOnToolEnd, type AgentHookOnToolStart, type AgentHooks, type AgentOptions, AgentRegistry, type AgentResponse, type AgentScorerState, type AgentStatus, type AgentTool, AiSdkEmbeddingAdapter, type AllowedVariableValue, type ApiToolInfo, type BaseEventMetadata, type BaseGenerationOptions, type BaseLLMOptions, type BaseMessage, BaseRetriever, type BaseTool, type BaseToolCall, type BuildScorerOptions, type BuildScorerRunArgs, type BuildScorerRunResult, type BuilderAnalyzeContext, type BuilderPrepareContext, type BuilderReasonContext, type BuilderScoreContext, type CachedPrompt, type ChatMessage, ClientHTTPError, type ClientSideToolResult, type CloudflareFetchHandler, type Conversation, ConversationAlreadyExistsError, ConversationNotFoundError, type ConversationQueryOptions, type ConversationQueryOptions as ConversationQueryOptionsV2, type Conversation as ConversationV2, type CreateConversationInput, type CreateConversationInput as CreateConversationInputV2, type CreateReasoningToolsOptions, type CreateScorerOptions, DEFAULT_INSTRUCTIONS, type DataContent, type Document, type DynamicValue, type DynamicValueOptions, type EmbeddingAdapter$1 as EmbeddingAdapter, EmbeddingAdapterNotConfiguredError, EmbeddingError, type ExtractVariableNames, FEW_SHOT_EXAMPLES, type GenerateObjectOptions, type GenerateObjectSubAgentConfig, type GenerateReasonResult, type GenerateScoreResult, type GenerateScoreStep, type GenerateTextOptions, type GenerateTextSubAgentConfig, type GetMessagesOptions, type IServerProvider, type IServerlessProvider, type VoltOpsClient$1 as IVoltOpsClient, InMemoryStorageAdapter$1 as InMemoryObservabilityAdapter, InMemoryStorageAdapter, InMemoryVectorAdapter, type InferGenerateObjectResponse, type InferGenerateTextResponse, type InferMessage, type InferModel, type InferProviderParams, type InferStreamResponse, type InferTool, type LLMProvider, LazyRemoteExportProcessor, type LocalScorerDefinition, type LocalScorerExecutionResult, LocalStorageSpanProcessor, type LogFilter, LoggerProxy, MCPConfiguration, type MCPElicitationAdapter, type MCPLoggingAdapter, type MCPPromptsAdapter, type MCPResourcesAdapter, MCPServerRegistry, type ManagedMemoryAddMessageInput, type ManagedMemoryAddMessagesInput, type ManagedMemoryClearMessagesInput, type ManagedMemoryConnectionInfo, type ManagedMemoryConversationsClient, type ManagedMemoryCredentialCreateResult, type ManagedMemoryCredentialListResult, type ManagedMemoryCredentialSummary, type ManagedMemoryDatabaseSummary, type ManagedMemoryGetMessagesInput, type ManagedMemoryMessagesClient, type ManagedMemorySetWorkingMemoryInput, type ManagedMemoryStatus, type ManagedMemoryUpdateConversationInput, type ManagedMemoryVoltOpsClient, type ManagedMemoryWorkflowStateUpdateInput, type ManagedMemoryWorkflowStatesClient, type ManagedMemoryWorkingMemoryClient, type ManagedMemoryWorkingMemoryInput, Memory, type MemoryConfig, type MemoryOptions, type MemoryStorageMetadata, type MemoryUpdateMode, Memory as MemoryV2, MemoryV2Error, type MessageContent, MessageContentBuilder, type MessageRole, type ModelToolCall, NextAction, NodeType, VoltAgentObservability$1 as NodeVoltAgentObservability, type ObservabilityConfig, type ObservabilityLogRecord, type ObservabilitySpan, type ObservabilityStorageAdapter, type ObservabilityWebSocketEvent, type OnEndHookArgs, type OnErrorHookArgs, type OnHandoffHookArgs, type OnPrepareMessagesHookArgs, type OnPrepareMessagesHookResult, type OnPrepareModelMessagesHookArgs, type OnPrepareModelMessagesHookResult, type OnStartHookArgs, type OnStepFinishHookArgs, type OnToolEndHookArgs, type OnToolStartHookArgs, type OperationContext, type PackageUpdateInfo, type PromptApiClient, type PromptApiResponse, type PromptContent, type PromptCreator, type PromptHelper, type PromptReference, type PromptTemplate, type ProviderObjectResponse, type ProviderObjectStreamResponse, type ProviderParams, type ProviderResponse, type ProviderTextResponse, type ProviderTextStreamResponse, type ReadableStreamType, type ReasoningStep, ReasoningStepSchema, type RegisterOptions, type RegisteredWorkflow, type RemoteLogExportConfig, RemoteLogProcessor, type RetrieveOptions, type Retriever, type RetrieverOptions, type RunLocalScorersArgs, type RunLocalScorersResult, type SamplingMetadata, type SamplingPolicy, type ScorerBuilder, type ScorerContext, type ScorerLifecycleScope, type ScorerPipelineContext, type ScorerReasonContext, type ScorerResult, type SearchOptions, type SearchResult, type ServerAgentResponse, type ServerApiResponse, type ServerProviderDeps, type ServerProviderFactory, type ServerWorkflowResponse, type ServerlessProviderFactory, type ServerlessRemoteEndpointConfig, type ServerlessRemoteExportConfig, type ServerlessRequestHandler, ServerlessVoltAgentObservability, type SpanAttributes, type SpanEvent, type SpanFilterConfig, SpanFilterProcessor, SpanKind, type SpanLink, type SpanStatus, SpanStatusCode, type SpanTreeNode, type StepChunkCallback, type StepFinishCallback, type StepWithContent, type StopWhen, type StorageAdapter, StorageError, StorageLogProcessor, type StoredUIMessage, type StreamObjectFinishResult, type StreamObjectOnFinishCallback, type StreamObjectOptions, type StreamObjectSubAgentConfig, type StreamPart, type StreamTextFinishResult, type StreamTextOnFinishCallback, type StreamTextOptions, type StreamTextSubAgentConfig, type SubAgentConfig, type SubAgentMethod, type SubAgentStateData, type SupervisorConfig, type TemplateVariables, type TimelineEventCoreLevel, type TimelineEventCoreStatus, type TimelineEventCoreType, Tool, type ToolCall, ToolDeniedError, type ToolErrorInfo, type ToolExecuteOptions, ToolManager, type ToolOptions, type ToolSchema, type ToolStatus, type ToolStatusInfo, type ToolWithNodeId, type Toolkit, type Usage, type UsageInfo, type VectorAdapter, VectorAdapterNotConfiguredError, VectorError, type VectorItem, type VectorSearchOptions, type Voice, type VoiceEventData, type VoiceEventType, type VoiceMetadata, type VoiceOptions, VoltAgent, VoltAgentError, VoltAgentObservability, type VoltAgentOptions, type VoltAgentStreamTextResult, type VoltAgentTextStreamPart, type VoltOpsAppendEvalRunResultPayload, type VoltOpsAppendEvalRunResultsRequest, VoltOpsClient, type VoltOpsClientOptions, type VoltOpsCompleteEvalRunRequest, type VoltOpsCreateEvalRunRequest, type VoltOpsCreateScorerRequest, type VoltOpsEvalResultStatus, type VoltOpsEvalRunCompletionSummaryPayload, type VoltOpsEvalRunErrorPayload, type VoltOpsEvalRunResultLiveMetadata, type VoltOpsEvalRunResultScorePayload, type VoltOpsEvalRunStatus, type VoltOpsEvalRunSummary, VoltOpsPromptApiClient, type VoltOpsPromptManager, VoltOpsPromptManagerImpl, type VoltOpsScorerSummary, type VoltOpsTerminalEvalRunStatus, WebSocketEventEmitter, WebSocketLogProcessor, WebSocketSpanProcessor, type WeightedBlendComponent, type WeightedBlendOptions, type Workflow, type WorkflowConfig, type WorkflowExecutionContext, WorkflowRegistry, type WorkflowStateEntry, type WorkflowStats, type WorkflowStepContext, type WorkflowStepType, type WorkflowTimelineEvent, type WorkingMemoryConfig, type WorkingMemoryScope, type WorkingMemorySummary, type WorkingMemoryUpdateOptions, addTimestampToMessage, andAgent, andAll, andRace, andTap, andThen, andWhen, andWorkflow, appendToMessage, buildRetrieverLogMessage, buildSamplingMetadata, buildScorer, buildSpanTree, checkForUpdates, convertUsage, cosineSimilarity, createHooks, createNodeId, createPrompt, createReasoningTools, createRetrieverTool, createScorer, createSimpleTemplateEngine, createSubagent, createSuspendController, createTool, createToolkit, createVoltAgentObservability, createVoltOpsClient, createWorkflow, createWorkflowChain, createWorkflowStepNodeId, VoltAgent as default, extractFileParts, extractImageParts, extractText, extractTextParts, extractWorkflowStepInfo, filterContentParts, getContentLength, getEnvVar, getGlobalLogBuffer, getGlobalLogger, getNodeTypeFromNodeId, getWorkflowStepNodeType, hasContent, hasFilePart, hasImagePart, hasTextPart, isAbortError, isNodeRuntime, isServerlessRuntime, isStructuredContent, isTextContent, isVoltAgentError, mapMessageContent, messageHelpers, normalizeContent, normalizeScorerResult, normalizeToArray, prependToMessage, readableLogRecordToObservabilityLog, readableSpanToObservabilitySpan, runLocalScorers, safeJsonParse, serializeValueForDebug, shouldSample, tool, transformTextContent, updateAllPackages, updateSinglePackage, weightedBlend, zodSchemaToJsonUI };