LangChain has built-in memory modules for conversation history. pref0 provides preference learning that goes beyond conversation recall to structured preference extraction.
| pref0 | LangChain Memory | |
|---|---|---|
| What it stores | Structured preferences with confidence | Conversation history and summaries |
| Scope | Cross-session preference learning | Primarily within-session memory |
| Extraction | Automatic preference extraction from corrections | Stores raw messages or generates summaries |
| Confidence scoring | Built-in, compounds over time | Not available |
| Framework | Framework-agnostic API | LangChain-specific |
| Best for | Learning persistent user preferences | Maintaining conversation context |
LangChain memory maintains conversation context within a session — what was said, conversation summaries, entity references. pref0 extracts structured preferences that persist across sessions and compound in confidence.
LangChain's built-in memory modules are primarily designed for within-session context. pref0 is designed for cross-session learning — preferences from last week inform today's responses.
LangChain memory only works within LangChain. pref0 works with any framework — LangChain, CrewAI, Vercel AI SDK, or raw API calls. You can switch frameworks without losing preference data.
Yes. Use LangChain memory for conversation context within a session. Use pref0 for cross-session preference learning. Add pref0 preferences to the system prompt alongside LangChain's conversation buffer.
No. They serve different purposes. LangChain memory handles conversation context. pref0 handles preference learning. Most agents benefit from both.
pref0 preferences carry over. Since pref0 is a REST API, your preference data works with any framework. LangChain memory would need to be reimplemented.
Your users are already teaching your agent what they want. pref0 makes sure the lesson sticks.