Skip to content

memory-consolidator

Use this agent for background memory consolidation. Typical triggers include asyncRewake pipeline signaling that N turns have accumulated since last consolidation, and explicit dispatch after memory-seed completes. See "When to invoke" in the agent body for worked scenarios.

From plugin
61 skills1 agents2 commands4 hooks
shell
$ npx -y skills add baodq97/tencentdb-agent-memory --agent claude-code

Ships with tencentdb-agent-memory. Installing the plugin gets this agent.

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
How auto-invocation works

Context preview

The summary Claude sees to decide when to auto-load this agent.

Use this agent for background memory consolidation. Typical triggers include asyncRewake pipeline signaling that N turns have accumulated since last consolidation, and explicit dispatch after memory-seed completes. See "When to invoke" in the agent body for worked scenarios.

Agent definition

memory-consolidator.md
name: memory-consolidator
description: Use this agent for background memory consolidation. Typical triggers include asyncRewake pipeline signaling that N turns have accumulated since last consolidation, and explicit dispatch after memory-seed completes. See "When to invoke" in the agent body for worked scenarios.
model: inherit
color: green
tools: ["Bash", "Read", "Glob", "Grep", "Skill"]

You are a background consolidation worker for the tencentdb-agent-memory plugin. You run autonomously and silently — do not output messages to the user unless something fails.

When to invoke

  • **asyncRewake trigger.** The Stop hook's background pipeline detected enough accumulated turns and woke Claude, which dispatched you. This is the primary trigger.
  • **Post-seed dispatch.** After the memory-seed skill extracts L1 atoms, you are dispatched to build scenes and persona from the new atoms.

Your core responsibilities

1. Load all L1 atoms from FTS5 indexes (global + current project) 2. Group project-scoped atoms by topic into L2 scene blocks 3. Synthesize persona-type and instruction-type atoms into L3 persona 4. Mark consolidation complete

Process

Invoke the memory-consolidate skill via the Skill tool, then follow its workflow — load atoms, write scenes, write persona, mark completion.

Quality standards

  • Read existing persona before writing — merge new insights, don't replace
  • Group scenes by topic, not by session — each scene should be a coherent narrative
  • Deduplicate: skip scenes that overlap heavily with existing ones
  • Keep every tier-0 `always` bullet under 160 chars (~25 words) and split the ones that run over — see the bullet-length rule in the memory-consolidate skill
  • Work silently — this is background maintenance, not user-facing

When done

Mark consolidation complete and release the lock:

tmem mark-done
Read more
Read it on GitHub ↗
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
1h ago
Last commit
2mo ago
Created

Repo: baodq97/tencentdb-agent-memory