Skip to main content
MEMO is a local-first long-term memory CLI: pure Rust, SQLite storage, and a local hashing / TF-IDF embedder. It has no runtime network dependency, server, provider key, or cloud account.

Install and self-management

Download the binary for your platform from Releases, or self-upgrade an existing binary:
aria-memo setup persists the upgrade source to ~/.ariacompute/memo-cli.yml. Interactive runs let you choose GitHub or Gitee; non-interactive runs resolve ARIA_MEMO_SITE=cn → existing config → the built-in GitHub default. Use aria-memo setup --status to inspect the config and --clear to delete it. Release assets follow aria-memo_{version}_{os}.tar.gz, where os is linux_x86_64, linux_arm64, macos, or windows_x86_64 (.zip on Windows). Override the home directory ~/.ariacompute with ARIA_COMPUTE_HOME.
  • Resolution order: --url > ~/.ariacompute/memo-cli.yml > ARIA_MEMO_UPGRADE_URL > built-in default.
  • Exit codes: 0 success, 1 runtime error, 2 usage error.

Command reference

Every command accepts the global --db <path> flag (default ./memo.db). An unknown --type is rejected rather than silently downgraded.

Memory tiers

--type accepts working, short_term, and long_term:episodic|semantic|entity|graph. Tiers have different half-lives: about 1 hour for working, 7 days for short_term, and 30 days for long_term. --importance participates in decay.

Retrieval semantics

Hybrid search scores results as score = 0.7 × cosine + 0.5 × lexical_relevance.
  • Lexical pushdown: the SQLite FTS5 table memories_fts runs MATCH + bm25() to prune lexical candidates before cosine scoring. Pure-vector queries, or queries with no lexical hit, fall back to a full scan so semantic recall is preserved.
  • Multilingual segmentation: Chinese (zh / zh-TW) uses jieba-rs, Japanese and Korean use lindera (ipadic / ko-dic), and the remaining space-delimited languages use whitespace — covering all 13 playground locales.
  • recall is pure cosine: no keyword component, useful for comparing the semantic signal alone.
  • Batch retrieval: search-batch --text "Rust" --text "SQLite" --json runs every query in one call, sharing one FTS5 preparation and one scan. The JSON result is [{"query": "...", "results": [{"id", "score", "content"}]}]. The library also exposes recall_batch, but the CLI has no matching subcommand yet.

Four-view relation plane

Relations are directed edges in a separate relations table; Memo is never mutated.
search --graph and graph return items plus a trace. The trace fields are views, budget, stop_reason (budget / exhausted / no-seeds), and hits, so the Retrieve→Assess→Expand process stays inspectable. The default LocalRelationScorer is fully offline; you can swap in an LLM-backed scorer without touching the controller.

JSON output

--json works with get, list, search, recall, search-batch, relations, graph, and bench. Without it, search and recall print human-readable score\tcontent lines.

Next steps