Skip to content

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.

Terminal window
npm install @youcraft/recall-extractor-anthropic
import { 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 })
OptionTypeDefaultDescription
apiKeystringrequiredYour Anthropic API key
modelstring"claude-3-5-haiku-latest"Model to use for extraction and consolidation
const extractor = anthropicExtractor({
apiKey: process.env.ANTHROPIC_API_KEY!,
model: 'claude-sonnet-4-20250514',
})

The Anthropic extractor uses Claude’s native tool use capability for structured outputs, ensuring reliable JSON responses for both extraction and consolidation operations.