Back to articles
@hazeljs/memory: Pluggable User Memory for AI Applications

@hazeljs/memory: Pluggable User Memory for AI Applications

via Dev.to JavaScriptMuhammad Arslan

We’re excited to highlight @hazeljs/memory — a new standalone package in the HazelJS alpha that gives you pluggable, user-scoped memory with one interface and multiple backends. Use it to keep user context in one place and share it between RAG and agents in-process. Why a dedicated memory package? Without a dedicated memory layer, user context often ends up scattered: in RAG conversation buffers, ad-hoc database tables, or hardcoded in prompts. That makes it hard to keep profile, preferences, and conversation history consistent across your AI features. @hazeljs/memory solves this with a single model for: Profile — User identity and static attributes Preference — Stated preferences (language, theme, etc.) Behavioral — Inferred behavior patterns Emotional — Emotional state (often with TTL) Episodic — Event-based memories (what happened when) Semantic summary — Summarized or semantic facts You get explicit vs inferred storage, optional TTL (e.g. for emotional state or short-lived context)

Continue reading on Dev.to JavaScript

Opens in a new tab

Read Full Article
0 views

Related Articles