Contributing to ai-memory
September 11, 2026 · View on GitHub
Thanks for helping. This crate is a local memory layer for agent harnesses — not an LLM client and not a cloud sync product.
Quick start
git clone https://github.com/zzjzzb/ai-memory.git
cd ai-memory
cargo test
cargo run --example harness_loop_sim
Optional vector extension tests:
cargo test --features sqlite-vec
How to contribute
- Open an issue for bugs or design discussion (preferred before large changes).
- Fork the repo and create a branch from
main. - Keep changes focused. Prefer boring, maintainable Rust.
- Add or update tests for behavior you change.
cargo testmust stay green. - Update docs when you change public API or the recommended harness pattern:
- docs/USAGE.md / docs/USAGE.zh-CN.md
- docs/ARCHITECTURE.md / docs/ARCHITECTURE.zh-CN.md
- DeepSeek Harness showcase: docs/INSTALL_DSH.md / docs/INSTALL_DSH.zh-CN.md, docs/INTEGRATION_DSH.md / docs/INTEGRATION_DSH.zh-CN.md,
integrations/dsh-ai-memory/(DSH_AI_MEMORY_SKIP_NATIVE=1 npm testthere;node scripts/check-dsh-bundle.mjsat repo root), and the flagship scenarioscenarios/dsh-support-agent/(cargo test --test dsh_support_scenario)
- Open a pull request against
mainwith a short description of why.
Design boundaries (please respect)
In scope
- Project-scoped memory,
MemoryPolicy, hybrid recall, harness adapter (AgentSession,HostSession, tools, budgetedContextPack) - Thin DeepSeek Harness Cordis plugin that calls this crate (napi or CLI — not a JS store)
- Usage scenarios that drive that plugin (headless sim + documented
dsh plugin add) - Transparent local performance (SQLite defaults, caches, prune)
- Offline-first defaults (no network required for tests)
Out of scope (unless discussed in an issue first)
- Building a full LLM harness / vendor SDK (pi, Claude, Codex, DeepSeek clients)
- Multi-device sync or hosted multi-tenant cloud
- Background auto-
consolidateor silent policy changes - Stuffing full transcripts into the model prompt (use
prefetch_within_budget)
Code style
- Match existing module layout (
store,sqlite,harness, …). - Public API should stay easy for SME developers: good defaults, few knobs.
- Do not add heavy dependencies without a clear win.
License
Dual-licensed under MIT OR Apache-2.0. Contributions are accepted under the same terms.