Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By baodq97v0.9.1MITIn 1 marketplace
Recalls your past project context into each prompt, so Claude Code carries memory across sessions. Hooks capture every turn and start background consolidation on their own; it says it runs fully local with no paid API.
Trending plugins
7-day copy clicks
You run one by typing its /name in Claude Code.
1 caution to review before installing
A hook runs when Claude uses the Bash tool
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Four-layer long-term memory (L0 Conversation → L1 Atom → L2 Scene → L3 Persona) for Claude Code, inspired by Tencent/TencentDB-Agent-Memory.
Fully local — no external Gateway, no paid API, no Python. All extraction and consolidation is done by the Claude agent itself.
# Add marketplace
claude plugin marketplace add https://github.com/baodq97/tencentdb-agent-memory
# Install plugin
claude plugin install tencentdb-agent-memory
The tmem CLI is also published on npm, CLI-only (no plugin assets), for use
outside Claude Code:
npx @baodq97/tmem <command> # run once, no install
npm i -g @baodq97/tmem # or install globally → `tmem`
tmem version # resolved version + path + node
tmem update # check npm for a newer release (--apply to install)
Requires Node ≥ 24 (node:sqlite DatabaseSync is flag-free from 24). The
embedding model (~314 MB, EmbeddingGemma-300M GGUF) downloads on first embed use
into ~/.memory-tencentdb/models/, not at install.
# Inside Claude Code:
/memory-init
# → installs deps, links tmem CLI, creates store
# → hints: "ask me to seed memories"
# then say "seed memories" → agent extracts L1 atoms
# then say "consolidate memories" → agent builds scenes + persona
# done — hybrid recall is now active automatically
| Hook | Action |
|---|---|
SessionStart | Inject the tier-0 persona core once per session (<persona-core>) + keep the global tmem shim current |
UserPromptSubmit | Hybrid recall (FTS5 + vector + RRF, relevance-floored) + L2 scene-navigation index -> inject <memory-context>. Scoped to the project store; tmem recall on the CLI still reads global + project. |
Stop | Auto-capture turn; spawn a detached headless consolidation once N new turns have accumulated |
SessionEnd | Mark session as pending for later seeding; spawn consolidation for a session that produced ≥3 new turns |
Hooks never block — failures degrade to no injection.
Consolidation runs outside the session, as a detached claude -p subprocess
that outlives it, so it costs the session no context and cannot be skipped by the
session declining to dispatch. Two arms fire it: a turn counter, and the session
boundary — the median session is short enough that a counter alone never reaches
most projects. Success is a measured store delta, never the child's exit code
(a validating run reported success while the store was byte-for-byte unchanged);
every run appends its verdict, cost and delta to consolidation_runs.jsonl, which
tmem status summarises. Turn it off with tmem config auto-consolidate off.
Each turn, the UserPromptSubmit hook builds a <memory-context> block from three layers:
conditional persona bullets this prompt actually reaches for, plus a short always-on insurance line (see How the persona reaches the agent).tmem scene <name> (progressive disclosure — cheap always-on index, full read only when needed).Tune the scene-navigation budget with tmem config scene-max-tokens N (0 disables it).
A consolidated persona grows well past what any per-turn budget can carry (~39k chars here). Rather than truncate it, each bullet is classified by duty and delivered on the channel that duty needs:
| Duty | Tier | Channel | Budget |
|---|---|---|---|
always | 0 | SessionStart hook → <persona-core>, once per session | persona-max-tokens (default 1200) |
conditional | 1 | UserPromptSubmit recall → <persona>, query-matched per turn | ~105 tokens |
reference | 2 | on demand — tmem persona --section <name> | none (never injected) |
Tier 0 is paid once per session, not per turn, which is what makes a budget that size affordable. The tier-0 block also carries a one-line index of every section name — including sections it delivered nothing from — so the tier-2 pointer is something the agent can actually act on.
7-day copy clicks
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub baodq97/tencentdb-agent-memory --plugin tencentdb-agent-memoryPlugins from other owners that cover similar ground