@voltagent/core 1.1.20 → 1.1.22

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
@@ -754,6 +754,32 @@ interface MemoryConfig {
754
754
  */
755
755
  workingMemory?: WorkingMemoryConfig;
756
756
  }
757
+ /**
758
+ * Metadata about the underlying storage adapter
759
+ */
760
+ interface MemoryStorageMetadata {
761
+ /** Name of the configured storage adapter */
762
+ adapter: string;
763
+ }
764
+ /**
765
+ * Summary of working memory configuration exposed to the UI
766
+ */
767
+ interface WorkingMemorySummary {
768
+ /** Whether working memory support is enabled */
769
+ enabled: boolean;
770
+ /** Scope of working memory persistence */
771
+ scope?: WorkingMemoryScope;
772
+ /** Output format (markdown/json) */
773
+ format: "markdown" | "json" | null;
774
+ /** Indicates if a template is configured */
775
+ hasTemplate: boolean;
776
+ /** Indicates if a schema is configured */
777
+ hasSchema: boolean;
778
+ /** Template content if configured */
779
+ template?: string | null;
780
+ /** Simplified schema field map if configured */
781
+ schema?: Record<string, string> | null;
782
+ }
757
783
  /**
758
784
  * Document type for RAG operations
759
785
  */
@@ -1249,6 +1275,14 @@ declare class Memory {
1249
1275
  * Get embedding adapter if configured
1250
1276
  */
1251
1277
  getEmbeddingAdapter(): EmbeddingAdapter$1 | undefined;
1278
+ /**
1279
+ * Get metadata about the configured storage adapter
1280
+ */
1281
+ getStorageMetadata(): MemoryStorageMetadata;
1282
+ /**
1283
+ * Get a UI-friendly summary of working memory configuration
1284
+ */
1285
+ getWorkingMemorySummary(): WorkingMemorySummary | null;
1252
1286
  /**
1253
1287
  * Get workflow state by execution ID
1254
1288
  */
@@ -2211,6 +2245,12 @@ interface ObservabilityStorageAdapter {
2211
2245
  deleteOldSpans(beforeTimestamp: number): Promise<number>;
2212
2246
  deleteOldLogs(beforeTimestamp: number): Promise<number>;
2213
2247
  clear(): Promise<void>;
2248
+ getInfo?(): {
2249
+ adapter: string;
2250
+ displayName?: string;
2251
+ persistent?: boolean;
2252
+ description?: string;
2253
+ };
2214
2254
  }
2215
2255
  /**
2216
2256
  * Log filter for querying
@@ -2653,6 +2693,12 @@ declare class InMemoryStorageAdapter$1 implements ObservabilityStorageAdapter {
2653
2693
  oldestLog?: Date;
2654
2694
  newestLog?: Date;
2655
2695
  };
2696
+ getInfo(): {
2697
+ adapter: string;
2698
+ displayName: string;
2699
+ persistent: boolean;
2700
+ description: string;
2701
+ };
2656
2702
  }
2657
2703
 
2658
2704
  /**
@@ -2815,6 +2861,8 @@ interface OnToolEndHookArgs {
2815
2861
  interface OnPrepareMessagesHookArgs {
2816
2862
  /** The messages that will be sent to the LLM (AI SDK UIMessage). */
2817
2863
  messages: UIMessage[];
2864
+ /** The raw messages before sanitization (for advanced transformations). */
2865
+ rawMessages?: UIMessage[];
2818
2866
  /** The agent instance making the LLM call. */
2819
2867
  agent: Agent;
2820
2868
  /** The operation context containing metadata about the current operation. */
@@ -2824,6 +2872,20 @@ interface OnPrepareMessagesHookResult {
2824
2872
  /** The transformed messages to send to the LLM. */
2825
2873
  messages?: UIMessage[];
2826
2874
  }
2875
+ interface OnPrepareModelMessagesHookArgs {
2876
+ /** The finalized model messages that will be sent to the provider. */
2877
+ modelMessages: ModelMessage[];
2878
+ /** The sanitized UI messages that produced the model messages. */
2879
+ uiMessages: UIMessage[];
2880
+ /** The agent instance making the LLM call. */
2881
+ agent: Agent;
2882
+ /** The operation context containing metadata about the current operation. */
2883
+ context: OperationContext;
2884
+ }
2885
+ interface OnPrepareModelMessagesHookResult {
2886
+ /** The transformed model messages to send to the provider. */
2887
+ modelMessages?: ModelMessage[];
2888
+ }
2827
2889
  interface OnErrorHookArgs {
2828
2890
  agent: Agent;
2829
2891
  error: VoltAgentError | AbortError | Error;
@@ -2840,6 +2902,7 @@ type AgentHookOnHandoff = (args: OnHandoffHookArgs) => Promise<void> | void;
2840
2902
  type AgentHookOnToolStart = (args: OnToolStartHookArgs) => Promise<void> | void;
2841
2903
  type AgentHookOnToolEnd = (args: OnToolEndHookArgs) => Promise<void> | void;
2842
2904
  type AgentHookOnPrepareMessages = (args: OnPrepareMessagesHookArgs) => Promise<OnPrepareMessagesHookResult> | OnPrepareMessagesHookResult;
2905
+ type AgentHookOnPrepareModelMessages = (args: OnPrepareModelMessagesHookArgs) => Promise<OnPrepareModelMessagesHookResult> | OnPrepareModelMessagesHookResult;
2843
2906
  type AgentHookOnError = (args: OnErrorHookArgs) => Promise<void> | void;
2844
2907
  type AgentHookOnStepFinish = (args: OnStepFinishHookArgs) => Promise<void> | void;
2845
2908
  /**
@@ -2852,6 +2915,7 @@ type AgentHooks = {
2852
2915
  onToolStart?: AgentHookOnToolStart;
2853
2916
  onToolEnd?: AgentHookOnToolEnd;
2854
2917
  onPrepareMessages?: AgentHookOnPrepareMessages;
2918
+ onPrepareModelMessages?: AgentHookOnPrepareModelMessages;
2855
2919
  onError?: AgentHookOnError;
2856
2920
  onStepFinish?: AgentHookOnStepFinish;
2857
2921
  };
@@ -2982,7 +3046,7 @@ interface SubAgentStateData {
2982
3046
  status: string;
2983
3047
  model: string;
2984
3048
  tools: ApiToolInfo[];
2985
- memory?: Record<string, unknown>;
3049
+ memory?: AgentMemoryState;
2986
3050
  node_id: string;
2987
3051
  subAgents?: SubAgentStateData[];
2988
3052
  methodConfig?: {
@@ -2992,6 +3056,33 @@ interface SubAgentStateData {
2992
3056
  };
2993
3057
  [key: string]: unknown;
2994
3058
  }
3059
+ /**
3060
+ * Memory block representation shared across agent and sub-agent state
3061
+ */
3062
+ interface AgentMemoryState extends Record<string, unknown> {
3063
+ node_id: string;
3064
+ type?: string;
3065
+ resourceId?: string;
3066
+ options?: MemoryOptions;
3067
+ available?: boolean;
3068
+ status?: string;
3069
+ storage?: MemoryStorageMetadata;
3070
+ workingMemory?: WorkingMemorySummary | null;
3071
+ vectorDB?: {
3072
+ enabled: boolean;
3073
+ adapter?: string;
3074
+ dimension?: number;
3075
+ status?: string;
3076
+ node_id?: string;
3077
+ } | null;
3078
+ embeddingModel?: {
3079
+ enabled: boolean;
3080
+ model?: string;
3081
+ dimension?: number;
3082
+ status?: string;
3083
+ node_id?: string;
3084
+ } | null;
3085
+ }
2995
3086
  /**
2996
3087
  * Full state of an agent including all properties
2997
3088
  */
@@ -3004,9 +3095,7 @@ interface AgentFullState {
3004
3095
  node_id: string;
3005
3096
  tools: ToolWithNodeId[];
3006
3097
  subAgents: SubAgentStateData[];
3007
- memory: Record<string, unknown> & {
3008
- node_id: string;
3009
- };
3098
+ memory: AgentMemoryState;
3010
3099
  retriever?: {
3011
3100
  name: string;
3012
3101
  description?: string;
@@ -6605,7 +6694,10 @@ interface ServerApiResponse<T> {
6605
6694
  * VoltAgent constructor options
6606
6695
  */
6607
6696
  type VoltAgentOptions = {
6608
- agents: Record<string, Agent>;
6697
+ /**
6698
+ * Optional agents to register when bootstrapping VoltAgent
6699
+ */
6700
+ agents?: Record<string, Agent>;
6609
6701
  /**
6610
6702
  * Optional workflows to register with VoltAgent
6611
6703
  * Can be either Workflow instances or WorkflowChain instances
@@ -7258,7 +7350,7 @@ declare class VoltAgent {
7258
7350
  /**
7259
7351
  * Register multiple agents
7260
7352
  */
7261
- registerAgents(agents: Record<string, Agent>): void;
7353
+ registerAgents(agents?: Record<string, Agent>): void;
7262
7354
  /**
7263
7355
  * Start the server
7264
7356
  */
@@ -7334,4 +7426,4 @@ declare class VoltAgent {
7334
7426
  */
7335
7427
  declare function convertUsage(usage: LanguageModelUsage | undefined): UsageInfo | undefined;
7336
7428
 
7337
- export { A2AServerRegistry, AbortError, Agent, type AgentFullState, type AgentHookOnEnd, type AgentHookOnError, type AgentHookOnHandoff, type AgentHookOnPrepareMessages, 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, 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, Memory, type MemoryConfig, type MemoryOptions, 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 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, 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 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 };
7429
+ 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, 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, 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, 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 };
package/dist/index.d.ts CHANGED
@@ -754,6 +754,32 @@ interface MemoryConfig {
754
754
  */
755
755
  workingMemory?: WorkingMemoryConfig;
756
756
  }
757
+ /**
758
+ * Metadata about the underlying storage adapter
759
+ */
760
+ interface MemoryStorageMetadata {
761
+ /** Name of the configured storage adapter */
762
+ adapter: string;
763
+ }
764
+ /**
765
+ * Summary of working memory configuration exposed to the UI
766
+ */
767
+ interface WorkingMemorySummary {
768
+ /** Whether working memory support is enabled */
769
+ enabled: boolean;
770
+ /** Scope of working memory persistence */
771
+ scope?: WorkingMemoryScope;
772
+ /** Output format (markdown/json) */
773
+ format: "markdown" | "json" | null;
774
+ /** Indicates if a template is configured */
775
+ hasTemplate: boolean;
776
+ /** Indicates if a schema is configured */
777
+ hasSchema: boolean;
778
+ /** Template content if configured */
779
+ template?: string | null;
780
+ /** Simplified schema field map if configured */
781
+ schema?: Record<string, string> | null;
782
+ }
757
783
  /**
758
784
  * Document type for RAG operations
759
785
  */
@@ -1249,6 +1275,14 @@ declare class Memory {
1249
1275
  * Get embedding adapter if configured
1250
1276
  */
1251
1277
  getEmbeddingAdapter(): EmbeddingAdapter$1 | undefined;
1278
+ /**
1279
+ * Get metadata about the configured storage adapter
1280
+ */
1281
+ getStorageMetadata(): MemoryStorageMetadata;
1282
+ /**
1283
+ * Get a UI-friendly summary of working memory configuration
1284
+ */
1285
+ getWorkingMemorySummary(): WorkingMemorySummary | null;
1252
1286
  /**
1253
1287
  * Get workflow state by execution ID
1254
1288
  */
@@ -2211,6 +2245,12 @@ interface ObservabilityStorageAdapter {
2211
2245
  deleteOldSpans(beforeTimestamp: number): Promise<number>;
2212
2246
  deleteOldLogs(beforeTimestamp: number): Promise<number>;
2213
2247
  clear(): Promise<void>;
2248
+ getInfo?(): {
2249
+ adapter: string;
2250
+ displayName?: string;
2251
+ persistent?: boolean;
2252
+ description?: string;
2253
+ };
2214
2254
  }
2215
2255
  /**
2216
2256
  * Log filter for querying
@@ -2653,6 +2693,12 @@ declare class InMemoryStorageAdapter$1 implements ObservabilityStorageAdapter {
2653
2693
  oldestLog?: Date;
2654
2694
  newestLog?: Date;
2655
2695
  };
2696
+ getInfo(): {
2697
+ adapter: string;
2698
+ displayName: string;
2699
+ persistent: boolean;
2700
+ description: string;
2701
+ };
2656
2702
  }
2657
2703
 
2658
2704
  /**
@@ -2815,6 +2861,8 @@ interface OnToolEndHookArgs {
2815
2861
  interface OnPrepareMessagesHookArgs {
2816
2862
  /** The messages that will be sent to the LLM (AI SDK UIMessage). */
2817
2863
  messages: UIMessage[];
2864
+ /** The raw messages before sanitization (for advanced transformations). */
2865
+ rawMessages?: UIMessage[];
2818
2866
  /** The agent instance making the LLM call. */
2819
2867
  agent: Agent;
2820
2868
  /** The operation context containing metadata about the current operation. */
@@ -2824,6 +2872,20 @@ interface OnPrepareMessagesHookResult {
2824
2872
  /** The transformed messages to send to the LLM. */
2825
2873
  messages?: UIMessage[];
2826
2874
  }
2875
+ interface OnPrepareModelMessagesHookArgs {
2876
+ /** The finalized model messages that will be sent to the provider. */
2877
+ modelMessages: ModelMessage[];
2878
+ /** The sanitized UI messages that produced the model messages. */
2879
+ uiMessages: UIMessage[];
2880
+ /** The agent instance making the LLM call. */
2881
+ agent: Agent;
2882
+ /** The operation context containing metadata about the current operation. */
2883
+ context: OperationContext;
2884
+ }
2885
+ interface OnPrepareModelMessagesHookResult {
2886
+ /** The transformed model messages to send to the provider. */
2887
+ modelMessages?: ModelMessage[];
2888
+ }
2827
2889
  interface OnErrorHookArgs {
2828
2890
  agent: Agent;
2829
2891
  error: VoltAgentError | AbortError | Error;
@@ -2840,6 +2902,7 @@ type AgentHookOnHandoff = (args: OnHandoffHookArgs) => Promise<void> | void;
2840
2902
  type AgentHookOnToolStart = (args: OnToolStartHookArgs) => Promise<void> | void;
2841
2903
  type AgentHookOnToolEnd = (args: OnToolEndHookArgs) => Promise<void> | void;
2842
2904
  type AgentHookOnPrepareMessages = (args: OnPrepareMessagesHookArgs) => Promise<OnPrepareMessagesHookResult> | OnPrepareMessagesHookResult;
2905
+ type AgentHookOnPrepareModelMessages = (args: OnPrepareModelMessagesHookArgs) => Promise<OnPrepareModelMessagesHookResult> | OnPrepareModelMessagesHookResult;
2843
2906
  type AgentHookOnError = (args: OnErrorHookArgs) => Promise<void> | void;
2844
2907
  type AgentHookOnStepFinish = (args: OnStepFinishHookArgs) => Promise<void> | void;
2845
2908
  /**
@@ -2852,6 +2915,7 @@ type AgentHooks = {
2852
2915
  onToolStart?: AgentHookOnToolStart;
2853
2916
  onToolEnd?: AgentHookOnToolEnd;
2854
2917
  onPrepareMessages?: AgentHookOnPrepareMessages;
2918
+ onPrepareModelMessages?: AgentHookOnPrepareModelMessages;
2855
2919
  onError?: AgentHookOnError;
2856
2920
  onStepFinish?: AgentHookOnStepFinish;
2857
2921
  };
@@ -2982,7 +3046,7 @@ interface SubAgentStateData {
2982
3046
  status: string;
2983
3047
  model: string;
2984
3048
  tools: ApiToolInfo[];
2985
- memory?: Record<string, unknown>;
3049
+ memory?: AgentMemoryState;
2986
3050
  node_id: string;
2987
3051
  subAgents?: SubAgentStateData[];
2988
3052
  methodConfig?: {
@@ -2992,6 +3056,33 @@ interface SubAgentStateData {
2992
3056
  };
2993
3057
  [key: string]: unknown;
2994
3058
  }
3059
+ /**
3060
+ * Memory block representation shared across agent and sub-agent state
3061
+ */
3062
+ interface AgentMemoryState extends Record<string, unknown> {
3063
+ node_id: string;
3064
+ type?: string;
3065
+ resourceId?: string;
3066
+ options?: MemoryOptions;
3067
+ available?: boolean;
3068
+ status?: string;
3069
+ storage?: MemoryStorageMetadata;
3070
+ workingMemory?: WorkingMemorySummary | null;
3071
+ vectorDB?: {
3072
+ enabled: boolean;
3073
+ adapter?: string;
3074
+ dimension?: number;
3075
+ status?: string;
3076
+ node_id?: string;
3077
+ } | null;
3078
+ embeddingModel?: {
3079
+ enabled: boolean;
3080
+ model?: string;
3081
+ dimension?: number;
3082
+ status?: string;
3083
+ node_id?: string;
3084
+ } | null;
3085
+ }
2995
3086
  /**
2996
3087
  * Full state of an agent including all properties
2997
3088
  */
@@ -3004,9 +3095,7 @@ interface AgentFullState {
3004
3095
  node_id: string;
3005
3096
  tools: ToolWithNodeId[];
3006
3097
  subAgents: SubAgentStateData[];
3007
- memory: Record<string, unknown> & {
3008
- node_id: string;
3009
- };
3098
+ memory: AgentMemoryState;
3010
3099
  retriever?: {
3011
3100
  name: string;
3012
3101
  description?: string;
@@ -6605,7 +6694,10 @@ interface ServerApiResponse<T> {
6605
6694
  * VoltAgent constructor options
6606
6695
  */
6607
6696
  type VoltAgentOptions = {
6608
- agents: Record<string, Agent>;
6697
+ /**
6698
+ * Optional agents to register when bootstrapping VoltAgent
6699
+ */
6700
+ agents?: Record<string, Agent>;
6609
6701
  /**
6610
6702
  * Optional workflows to register with VoltAgent
6611
6703
  * Can be either Workflow instances or WorkflowChain instances
@@ -7258,7 +7350,7 @@ declare class VoltAgent {
7258
7350
  /**
7259
7351
  * Register multiple agents
7260
7352
  */
7261
- registerAgents(agents: Record<string, Agent>): void;
7353
+ registerAgents(agents?: Record<string, Agent>): void;
7262
7354
  /**
7263
7355
  * Start the server
7264
7356
  */
@@ -7334,4 +7426,4 @@ declare class VoltAgent {
7334
7426
  */
7335
7427
  declare function convertUsage(usage: LanguageModelUsage | undefined): UsageInfo | undefined;
7336
7428
 
7337
- export { A2AServerRegistry, AbortError, Agent, type AgentFullState, type AgentHookOnEnd, type AgentHookOnError, type AgentHookOnHandoff, type AgentHookOnPrepareMessages, 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, 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, Memory, type MemoryConfig, type MemoryOptions, 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 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, 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 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 };
7429
+ 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, 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, 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, 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 };