import { z } from "zod"; export interface MultiModalMessages { type: "image_url"; image_url: { url: string; }; } export interface Message { role: string; content: string | MultiModalMessages; } export interface EmbeddingConfig { apiKey?: string; model?: string | any; url?: string; modelProperties?: Record; } export interface VectorStoreConfig { collectionName?: string; dimension?: number; client?: any; instance?: any; [key: string]: any; } export interface HistoryStoreConfig { provider: string; config: { historyDbPath?: string; supabaseUrl?: string; supabaseKey?: string; tableName?: string; }; } export interface LLMConfig { provider?: string; config?: Record; apiKey?: string; model?: string | any; modelProperties?: Record; } export interface Neo4jConfig { url: string; username: string; password: string; } export interface GraphStoreConfig { provider: string; config: Neo4jConfig; llm?: LLMConfig; customPrompt?: string; } export interface MemoryConfig { version?: string; embedder: { provider: string; config: EmbeddingConfig; }; vectorStore: { provider: string; config: VectorStoreConfig; }; llm: { provider: string; config: LLMConfig; }; historyStore?: HistoryStoreConfig; disableHistory?: boolean; historyDbPath?: string; customPrompt?: string; graphStore?: GraphStoreConfig; enableGraph?: boolean; } export interface MemoryItem { id: string; memory: string; hash?: string; metadata?: Record; createdAt?: string; updatedAt?: string; userId?: string; agentId?: string; runId?: string; score?: number; entityIds?: string[]; context?: ContextMessage[]; messages?: Message[]; type?: string; } export interface Entity { entity_id: string; label: string; type: "Person" | "Place" | "Organization" | "Event" | "Object" | "Concept"; created_at?: string; updated_at?: string; user_id?: string; run_id?: string; } export interface SearchFilters { userId?: string; agentId?: string; runId?: string; [key: string]: any; } export interface ContextMessage { id: string; content: string; role?: string; timestamp: string; messageId?: string; userId?: string; runId?: string; type: 'before' | 'after' | 'match'; } export interface MemoryItemWithContext extends MemoryItem { context?: ContextMessage[]; } export interface SearchResult { results: MemoryItemWithContext[]; relations?: any[]; agentAnalysis?: { decision?: { needsAdditionalSteps: boolean; reasoning: string; nextSteps: Array<{ action: string; parameters: Record; priority: number; }>; }; stepResults?: Array<{ action: string; results: any; success: boolean; }>; additionalResults?: any[]; isMultihop?: boolean; multihopResults?: Array<{ hopNumber: number; decision: { needsAdditionalSteps: boolean; reasoning: string; needsAnotherHop: boolean; hopReasoning: string; nextSteps: Array<{ action: string; parameters: Record; priority: number; }>; }; stepResults: Array<{ action: string; results: any; success: boolean; }>; additionalResults: any[]; }>; }; } export interface ChatResult { response: string; sources: MemoryItemWithContext[]; agentAnalysis?: { decision?: { needsAdditionalSteps: boolean; reasoning: string; nextSteps: Array<{ action: string; parameters: Record; priority: number; }>; }; stepResults?: Array<{ action: string; results: any; success: boolean; }>; additionalResults?: any[]; isMultihop?: boolean; multihopResults?: Array<{ hopNumber: number; decision: { needsAdditionalSteps: boolean; reasoning: string; needsAnotherHop: boolean; hopReasoning: string; nextSteps: Array<{ action: string; parameters: Record; priority: number; }>; }; stepResults: Array<{ action: string; results: any; success: boolean; }>; additionalResults: any[]; }>; }; metadata: { searchQuery: string; sourcesCount: number; responseTokens?: number; processingTimeMs: number; responseCustomInstructions?: string | null; reasoningCustomInstructions?: string | null; customInstructions?: string | null; multihopEnabled?: boolean; hopsUsed?: number; isNaiveMode?: boolean; }; } export interface VectorStoreResult { id: string; payload: Record; score?: number; } export declare const MemoryConfigSchema: z.ZodObject<{ version: z.ZodOptional; embedder: z.ZodObject<{ provider: z.ZodString; config: z.ZodObject<{ modelProperties: z.ZodOptional>; apiKey: z.ZodOptional; model: z.ZodOptional>; }, "strip", z.ZodTypeAny, { modelProperties?: Record | undefined; apiKey?: string | undefined; model?: any; }, { modelProperties?: Record | undefined; apiKey?: string | undefined; model?: any; }>; }, "strip", z.ZodTypeAny, { provider: string; config: { modelProperties?: Record | undefined; apiKey?: string | undefined; model?: any; }; }, { provider: string; config: { modelProperties?: Record | undefined; apiKey?: string | undefined; model?: any; }; }>; vectorStore: z.ZodObject<{ provider: z.ZodString; config: z.ZodObject<{ collectionName: z.ZodOptional; dimension: z.ZodOptional; client: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ collectionName: z.ZodOptional; dimension: z.ZodOptional; client: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ collectionName: z.ZodOptional; dimension: z.ZodOptional; client: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; }, "strip", z.ZodTypeAny, { provider: string; config: { collectionName?: string | undefined; dimension?: number | undefined; client?: any; } & { [k: string]: unknown; }; }, { provider: string; config: { collectionName?: string | undefined; dimension?: number | undefined; client?: any; } & { [k: string]: unknown; }; }>; llm: z.ZodObject<{ provider: z.ZodString; config: z.ZodObject<{ apiKey: z.ZodOptional; model: z.ZodOptional>; modelProperties: z.ZodOptional>; }, "strip", z.ZodTypeAny, { modelProperties?: Record | undefined; apiKey?: string | undefined; model?: any; }, { modelProperties?: Record | undefined; apiKey?: string | undefined; model?: any; }>; }, "strip", z.ZodTypeAny, { provider: string; config: { modelProperties?: Record | undefined; apiKey?: string | undefined; model?: any; }; }, { provider: string; config: { modelProperties?: Record | undefined; apiKey?: string | undefined; model?: any; }; }>; historyDbPath: z.ZodOptional; customPrompt: z.ZodOptional; enableGraph: z.ZodOptional; graphStore: z.ZodOptional; llm: z.ZodOptional; }, "strip", z.ZodTypeAny, { provider: string; config: Record; }, { provider: string; config: Record; }>>; customPrompt: z.ZodOptional; }, "strip", z.ZodTypeAny, { provider: string; config: { url: string; username: string; password: string; }; llm?: { provider: string; config: Record; } | undefined; customPrompt?: string | undefined; }, { provider: string; config: { url: string; username: string; password: string; }; llm?: { provider: string; config: Record; } | undefined; customPrompt?: string | undefined; }>>; historyStore: z.ZodOptional; }, "strip", z.ZodTypeAny, { provider: string; config: Record; }, { provider: string; config: Record; }>>; disableHistory: z.ZodOptional; }, "strip", z.ZodTypeAny, { embedder: { provider: string; config: { modelProperties?: Record | undefined; apiKey?: string | undefined; model?: any; }; }; vectorStore: { provider: string; config: { collectionName?: string | undefined; dimension?: number | undefined; client?: any; } & { [k: string]: unknown; }; }; llm: { provider: string; config: { modelProperties?: Record | undefined; apiKey?: string | undefined; model?: any; }; }; version?: string | undefined; historyDbPath?: string | undefined; customPrompt?: string | undefined; enableGraph?: boolean | undefined; graphStore?: { provider: string; config: { url: string; username: string; password: string; }; llm?: { provider: string; config: Record; } | undefined; customPrompt?: string | undefined; } | undefined; historyStore?: { provider: string; config: Record; } | undefined; disableHistory?: boolean | undefined; }, { embedder: { provider: string; config: { modelProperties?: Record | undefined; apiKey?: string | undefined; model?: any; }; }; vectorStore: { provider: string; config: { collectionName?: string | undefined; dimension?: number | undefined; client?: any; } & { [k: string]: unknown; }; }; llm: { provider: string; config: { modelProperties?: Record | undefined; apiKey?: string | undefined; model?: any; }; }; version?: string | undefined; historyDbPath?: string | undefined; customPrompt?: string | undefined; enableGraph?: boolean | undefined; graphStore?: { provider: string; config: { url: string; username: string; password: string; }; llm?: { provider: string; config: Record; } | undefined; customPrompt?: string | undefined; } | undefined; historyStore?: { provider: string; config: Record; } | undefined; disableHistory?: boolean | undefined; }>;