tanstack-ai-memory-hindsight
Installation
SKILL.md
Hindsight Memory Adapter
Hosted recall/save adapter backed by Hindsight. Hindsight owns extraction and
ranking server-side, buckets memory into per-conversation "banks"
({tenantId|_}__{user}__{threadId}), and — uniquely — exposes LLM tools through recall so the
model can retain/recall/reflect directly.
Setup
import { memoryMiddleware } from '@tanstack/ai-memory'
import { hindsight } from '@tanstack/ai-memory/hindsight'
// Build per request from the server-validated session — never from req.body.
function memoryFor(session: { userId: string; threadId: string }) {
const memory = hindsight({ user: session.userId }) // baseUrl defaults to HINDSIGHT_URL