Open Source building blocks that make your development with AI so much easier.
FactSheet maintains a live, structured profile for each user by extracting facts from conversations and resolving conflicts deterministically. Instead of searching through chat history, your AI reads current truths from a single JSON object.
1Install the package
npm install @weavlet/factsheet zod
2Define your schema and initialize FactSheet
import { FactSheet, MemoryAdapter } from '@weavlet/factsheet'import { z } from 'zod'
const factSheet = new FactSheet({ storage: new MemoryAdapter(), schema: z.object({ name: z.string().optional(), role: z.enum(['founder', 'engineer', 'designer']).optional(), intent: z.enum(['learn', 'buy', 'support']).optional(), }), extractor: { model: 'gpt-4o-mini', },})
3Extract facts and use them in your app
// Extract facts from conversationawait factSheet.observe({ userId: 'user_123', input: "I'm Alice, CTO at Acme. Looking to migrate from Heroku.",})
// Get current profileconst profile = await factSheet.get('user_123')// → { name: "Alice", role: "founder", intent: "migrate" }
We push the edges of AI; you benefit from the journey
Contact us at hello@weavlet.com