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.
$ npx -y skills add baodq97/tencentdb-agent-memory --agent claude-codeShips 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.
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.
Repo: baodq97/tencentdb-agent-memory

