Anthropic Extractor
The Anthropic extractor uses Claude models to identify and extract facts from conversations, and to make consolidation decisions (ADD, UPDATE, DELETE, or NONE) when new facts are extracted.
Installation
Section titled “Installation”npm install @youcraft/recall-extractor-anthropicimport { createMemory } from '@youcraft/recall'import { anthropicExtractor } from '@youcraft/recall-extractor-anthropic'
const extractor = anthropicExtractor({ apiKey: process.env.ANTHROPIC_API_KEY!,})
const memory = createMemory({ db, embeddings, extractor })Configuration
Section titled “Configuration”| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | required | Your Anthropic API key |
model | string | "claude-3-5-haiku-latest" | Model to use for extraction and consolidation |
Examples
Section titled “Examples”Custom model
Section titled “Custom model”const extractor = anthropicExtractor({ apiKey: process.env.ANTHROPIC_API_KEY!, model: 'claude-sonnet-4-20250514',})Implementation Details
Section titled “Implementation Details”The Anthropic extractor uses Claude’s native tool use capability for structured outputs, ensuring reliable JSON responses for both extraction and consolidation operations.