Use when wiring inMemory() from @tanstack/ai-memory/in-memory — explains setup, options (embedder, extract, topK/minScore), when to pick it (dev/tests/single-process demos), and what NOT to use it for (multi-process or persistent).
SkillScore100Maintained
Automatic
◆AI Engineer pack
Last verified 9/28/2026
What it changes
Passed 22 of 22 test cases with the skill, and 13 of 22 without it.
Without skill59%
With skill100%
Checks it passed that the model alone missed
States that the default minScore threshold is 0.15
Imports inMemory from @tanstack/ai-memory/in-memory
Passes an embedder object containing an embed method to inMemory
and 10 more in the full report
9 fixed13 passed either way0 still failing0 broke
Pass-rate lift
+41 pp
Tokens
-41%
Agent turns
0%
Response time
-63%
Model gemini-3.6-flashMeasured 9/28/2026v222 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 9 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 9
Prompt
In our TanStack AI local chat application, we want to know what the default maximum number of recalled context memories is when we instantiate the zero-dependency ephemeral memory adapter without setting explicit recall tuning options. What is the default topK limit?
What was checked, without and with the skill
Checked
Without skill
With skill
States that the default topK value for the in-memory adapter is 6
Missed
Passed
case-07 · gemini-3.6-flash · 9/28/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md50 linessingle file
In-Memory Memory Adapter
Zero-dependency recall/save adapter backed by a Map. Records vanish on process
restart.
When to use it
Local development.
Vitest / Playwright tests.
Single-process demos where users don't need persistence.
When NOT to use it
Production multi-process deployments — every worker has its own Map; users get
inconsistent memory.
Anything that needs survival across restarts.
For production, use redis() (see the tanstack-ai-memory-redis skill).
Setup
import { memoryMiddleware } from '@tanstack/ai-memory'
import { inMemory } from '@tanstack/ai-memory/in-memory'
const memory = inMemory()
// A static scope is fine for dev/tests; derive it from the session in real apps.
memoryMiddleware({
adapter: memory,
scope: { threadId: 'demo-thread', userId: 'alice' },
})