What problem does it solve?
Wiring long-term memory into a TanStack AI agent requires choosing an adapter, scoping memory correctly per user and thread, and exposing memory operations to the model. This Skill guides the setup of the Hindsight hosted adapter so memory is bucketed per conversation and the model can retain, recall, and reflect on its own.
Core Features & Use Cases
- Hosted memory adapter: Connects
memoryMiddleware to a Hindsight server that owns extraction and ranking server-side, bucketing memory into per-conversation banks keyed as {tenantId|_}__{user}__{threadId}.
- Model-facing memory tools: Exposes
hindsight_retain, hindsight_recall, and hindsight_reflect tools through recall, letting the model manage long-term memory directly during a run.
- Configurable recall: Supports a
budget option (low, mid, high) and onToolRetain/onToolRecall callbacks to observe the model's memory operations.
- Use Case: Add persistent memory to a multi-user chat app so each user's conversation thread recalls prior context automatically, with the model deciding what to retain.
Quick Start
Set up the Hindsight memory adapter by calling hindsight with the current user id and passing it to memoryMiddleware with my scope.