Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/cbuntingde/kimi-memory/promotegit clone --depth 1 https://github.com/cbuntingde/kimi-memoryWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/cbuntingde/kimi-memory/promote)<a href="https://agentmods.dev/commands/cbuntingde/kimi-memory/promote"><img src="https://agentmods.dev/badge/commands/cbuntingde/kimi-memory/promote.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00023 | $0.00874 |
| Opus 5 | $0.00012 | $0.00437 |
| Sonnet 5 | $0.00005 | $0.00175 |
| Haiku 4.5 | $0.00002 | $0.00087 |
Grade A, and why
promote scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/kimi-memory:promote
Promote project memories into the cross-project store. Use when auto-extract under-classified a fact (it stayed in the project DB when it should have gone to global) or when the operator is reconciling a project cache manually.
Usage
/kimi-memory:promote --memory-id <id> [--memory-id <id> ...] # dry run
/kimi-memory:promote --memory-id <id> --apply # actually move
The dry run is the default — it lists what would be moved and exits
without touching either database. Review the list, then re-run with
--apply to perform the move.
What this does
The plugin stores project memories under
$KIMI_CODE_HOME/kimi-memory/<project-key>/memory.sqlite and
cross-project memories under
$KIMI_CODE_HOME/kimi-memory/_global/memory.sqlite. This command
moves a row from the project DB to the global DB:
- The source row is removed from the project DB.
- The row is rewritten into
_global/memory.sqlitewithproject_key = '_global'. The id is preserved across the move so any caller holding the id keeps working. provenance.promoted_fromrecords the originating project key;provenance.promoted_atrecords the move timestamp.
The move is a two-phase commit with compensation: the global DB is written first, then the source DB is deleted; if the source-DB step fails, the global writes are rolled back so the operation is atomic from the caller's view.
Procedure
- Confirm the user wants to promote. Cross-project memory is visible from every project — promoting the wrong fact pollutes global recall.
- Identify the source memory ids. Use
memory_recall(scope: "project", query: ...)ormemory_list(scope: "project")to find the row. Confirm the title and content are genuinely cross-project (user preference, environment fact, reusable procedure) before promoting. - Run the dry run:
Reviewmemory_promote_to_global(cwd: <project>, memory_ids: [...])would_move(the titles + types) andmissing(ids that did not exist in the project DB). - After the user confirms, run the apply:
The response carriesmemory_promote_to_global(cwd: <project>, memory_ids: [...])moved(id + new_global_id; same value) andskipped(rows that did not exist or matched a secret shape). - Confirm by calling
memory_recall(scope: "global", query: ...)and showing the user the row is now visible from any project.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 90 lines · 23 tokens per session scan A 674104b4e4dc
promote is a command published in the GitHub repository cbuntingde/kimi-memory (0 stars, last pushed yesterday), licensed MIT. It adds 23 tokens to every session and 874 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.
Other commands, from other repositories
focus
"What should I work on today, and why?".
start
"What accumulated? What's blocking? Where do I begin?".
patterns
"What patterns are showing up across my work?".
iai-directive
Record a standing order the user typed themselves, as an explicit memory directive.
memory
What px0 knows about you, as opposed to what you have read.
init
Scaffold a store: create the folder layout, write config.toml, install the starter workflows and guidelines, and take the first version snapshot.