Skip to content
Development
Hook

Hooks

What tencentdb-agent-memory runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.

Install
$ npx -y skills add baodq97/tencentdb-agent-memory --agent claude-code

Ships with tencentdb-agent-memory. Installing the plugin gets these hooks.

What fires, and when

SessionStart

Fires once when a session begins, and again after a context compaction. It is where a plugin sets up its environment, or restores state the compaction dropped.

  • Runs on_session_start.js.

UserPromptSubmit

Fires before Claude sees each prompt you send. A plugin can use it to inject context, so the same instruction reaches the model every turn instead of only at session start.

  • Runs on_user_prompt.js.

Stop

  • Runs on_stop.js.

SessionEnd

  • Runs on_session_end.js.
Read hooks/hooks.json
Ships withtencentdb-agent-memory

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.

Get the whole plugin, auto-invoked
Stats
6
Stars
0
Views
1
Forks
Active
Maintenance
JavaScript
Language
1d ago
Last commit
2mo ago
Created

Repo: baodq97/tencentdb-agent-memory