Memory provider integrations. Each provider implements the Provider interface.
interface Provider {
name: string
prompts?: ProviderPrompts
initialize(config: ProviderConfig): Promise<void>
ingest(sessions: UnifiedSession[], options: IngestOptions): Promise<IngestResult>
awaitIndexing(result: IngestResult, containerTag: string): Promise<void>
search(query: string, options: SearchOptions): Promise<unknown[]>
clear(containerTag: string): Promise<void>
}- Create
src/providers/myprovider/index.ts - Implement
Providerinterface - Register in
src/providers/index.ts - Add to
ProviderNametype insrc/types/provider.ts - Add config in
src/utils/config.ts
Required returns:
initialize()- Set up client with API keyingest()- Return{ documentIds: string[], taskIds?: string[] }awaitIndexing()- Wait for async indexing to completesearch()- Return array of results (provider-specific format)clear()- Delete data by containerTag
Providers can override answer generation and judge prompts via ProviderPrompts:
interface ProviderPrompts {
answerPrompt?: string | ((question: string, context: unknown[], questionDate?: string) => string)
judgePrompt?: (question: string, groundTruth: string, hypothesis: string) => { default: string, [type: string]: string }
}Answer Prompt: Transform search results into an LLM prompt. Function receives raw search results.
Judge Prompt: Return prompts keyed by question type. Must include default. Falls back to built-in prompts if not provided.
Example: See src/providers/zep/prompts.ts
| Provider | SDK | Notes |
|---|---|---|
supermemory |
supermemory |
Raw JSON sessions |
mem0 |
mem0ai |
v2 API with graph |
zep |
@getzep/zep-cloud |
Graph-based, custom prompts |