tanstack-ai-memory

Installation
SKILL.md

TanStack AI Memory Middleware

Use this when adding server-side memory to a chat() call. Everything lives in @tanstack/ai-memory. A memory adapter is a single contract with two verbs — recall and save — and the middleware is thin: it recalls into the system prompt before the model runs and defers save after the turn finishes.

When to reach for it

  • A user expects "remember what I told you last time."
  • Per-user or per-thread context that must survive across sessions.
  • A hosted memory service (mem0, Honcho, Hindsight).

Do NOT use this just to keep recent messages — that's the messages array on chat(). Memory is for cross-turn / cross-session recall, not within-turn history.

Wire it up

Installs
1
Repository
tanstack/ai
GitHub Stars
3.0K
First Seen
Aug 12, 2026
tanstack-ai-memory — tanstack/ai