/**
 * src/memory/graphiti.ts
 * Centralized Knowledge Graph — The "Hive Mind"
 * Ensures all channels (Web, WhatsApp, Telegram) share the same memory
 * using Graphiti/Graphify for real-time graph-based RAG
 */
export interface GraphNode {
    id: string;
    type: 'business' | 'product' | 'process' | 'customer' | 'conversation' | 'document';
    properties: Record<string, any>;
    embeddings?: number[];
}
export interface GraphEdge {
    source: string;
    target: string;
    relation: string;
}
export interface GraphContext {
    nodes: GraphNode[];
    edges: GraphEdge[];
}
export interface MemoryEntry {
    id: string;
    tenantId: string;
    channel: 'whatsapp' | 'web' | 'telegram' | 'email';
    content: string;
    timestamp: Date;
    metadata: Record<string, any>;
}
declare class GraphitiClient {
    private baseUrl;
    private apiKey;
    constructor();
    /**
     * Create a new knowledge graph for a tenant
     */
    createGraph(tenantId: string, config: {
        name: string;
        schema: string;
        syncChannels: string[];
    }): Promise<string>;
    /**
     * Add a node to the graph
     */
    addNode(graphId: string, node: GraphNode): Promise<void>;
    /**
     * Add an edge to the graph
     */
    addEdge(graphId: string, edge: GraphEdge): Promise<void>;
    /**
     * Query the graph for relevant context
     */
    queryGraph(graphId: string, query: string, options?: {
        topK?: number;
        filters?: Record<string, any>;
    }): Promise<GraphContext>;
    /**
     * Sync memory across channels
     */
    syncMemory(tenantId: string, channel: string, memory: MemoryEntry): Promise<void>;
    /**
     * Get unified context for a tenant (across all channels)
     */
    getUnifiedContext(tenantId: string, query: string): Promise<string>;
}
export declare const graphiti: GraphitiClient;
/**
 * Initialize the knowledge graph for a new tenant
 */
export declare function initTenantGraph(tenantId: string): Promise<string>;
/**
 * Add a memory entry to the graph (called from any channel)
 */
export declare function addMemoryToGraph(tenantId: string, channel: 'whatsapp' | 'web' | 'telegram' | 'email', content: string, metadata?: Record<string, any>): Promise<void>;
/**
 * Get context for an AI response (unified across all channels)
 */
export declare function getContextForResponse(tenantId: string, query: string): Promise<string>;
/**
 * Index initial documents (SOUL, PRODUCTS, PROCESSES) into the graph
 */
export declare function indexInitialDocuments(tenantId: string, documents: {
    soul: string;
    products: string;
    processes: string;
}): Promise<void>;
export {};
//# sourceMappingURL=graphiti.d.ts.map