dynamic-memory-cli

Operate SQLite-backed agent memory with atomic Pending publication and Built index validation.

Updated Aug 31, 2026
One-click install
npx skills add https://github.com/DreamMacer/jiuwenswarm --skill dynamic-memory-cli-dreammacer
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dynamic-memory-cli
Source: https://github.com/DreamMacer/jiuwenswarm/tree/main/resources/agent/workspace/skills/dynamic-memory-cli
Command: npx skills add https://github.com/DreamMacer/jiuwenswarm --skill dynamic-memory-cli-dreammacer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Long-running agent conversations need durable memory that stays searchable while extraction happens asynchronously, without corrupting state or losing continuity between sessions. This Skill provides a deterministic CLI boundary that handles validation, transactions, cursors, and search merging so agents only make semantic decisions. ## Core Features & Use Cases - Atomic Pending Publication: Commit Snapshot updates, UT changes, and history cursor advances in a single SQLite transaction via publish-pending, with stale-revision and continuity checks. - Merged Pending/Built Search: Query memory immediately after publication; Pending UTs participate through lexical matching while Built indexes serve validated, hash-verified documents. - Frozen Batch Builds: Freeze Pending UTs into an exact-content batch, then build them into a stable index with Built-only validation that rolls back on any retrieval failure. - Use Case: An agent Harness extracts memory from a conversation in the background, publishes a proposal covering history events 81-120, searches the new Pending UTs instantly, then freezes and builds them into the validated Built index once a builder Agent reviews the batch. ## Quick Start Initialize a memory project with the dynamic memory CLI, then publish a proposal file and run a search query against the merged memory.

Frequently Asked Questions about dynamic-memory-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I publish agent memory proposals with the dynamic memory CLI?▼

Write a proposal JSON containing base revisions, cursor range, snapshot, changed UTs, evidence references, and a semantic statement, then run publish-pending with that file. The CLI validates continuity and commits everything in one SQLite transaction.

How does Pending versus Built memory search work?▼

Pending UTs are searched directly against their current content and queries immediately after publication. Built search uses committed index documents whose content hash still matches the UT, and results merge by stable UT ID with Pending shadowing stale Built entries.

What happens when a memory proposal has a stale revision?▼

The CLI rejects proposals whose base memory or snapshot revision does not match current state, or whose from_cursor is not covered_through plus one. The extraction Agent must regenerate the proposal against the current revisions and cursor.

Why does build-pending fail or skip memory items?▼

Items are skipped when their content changed after freezing or they are no longer Pending. The build rolls back entirely if Built-only validation fails, meaning any frozen query cannot retrieve its own UT with all must_include phrases present.

Can I edit the memory.sqlite3 database directly?▼

No, direct database edits are prohibited. Use the CLI commands add, update, retire, or publish-pending so schema validation, content hashing, revision tracking, and transaction safety are enforced.