Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ruvnet/ruflo/llms.txt
Use this file to discover all available pages before exploring further.
ruflo memory is the command surface for Ruflo’s persistent vector memory layer. Every entry is stored with an automatic ONNX embedding so that memory search can perform semantic similarity lookup — not just exact key matches. The backing store is a sql.js SQLite database (default path .swarm/memory.db), optionally accelerated by the HNSW index from @ruvector/core for 150×–12,500× faster retrieval on large collections.
Synopsis
Subcommands
| Subcommand | Alias | Description |
|---|---|---|
init | — | Initialize the memory database schema |
store | — | Persist a key/value pair with auto-generated embedding |
retrieve | get | Fetch a specific entry by key |
search | — | Semantic or keyword search across all namespaces |
list | ls | List entries, optionally filtered by namespace or tags |
delete | rm | Delete an entry by key |
stats | — | Show storage statistics, embedding provider, and HNSW state |
configure | config | Set the memory backend, path, and HNSW parameters |
cleanup | — | Purge expired TTL entries and stale data |
compress | — | Compact the SQLite database |
export | — | Export memory to a JSON file |
import | — | Import memory from a previously exported JSON file |
distill | — | Compress entries into structured intelligence (ADR-174) |
backup | — | Create a timestamped backup of the memory database |
Namespaces
Entries are scoped to a namespace — a logical partition of the memory store. Using namespaces keeps different types of knowledge separate and makes targeted searches faster.| Namespace | Conventional use |
|---|---|
default | General-purpose entries |
patterns | Successful code and workflow patterns |
results | Task outcomes and measurements |
errors | Failures and the fixes that resolved them |
notifications | Hook-emitted notification log |
--namespace flag defaults to default on all subcommands. Omitting it never creates entries under the literal namespace "undefined" — that edge case is guarded in the CLI.
DB path resolution
The memory database path is resolved in this priority order:--path <path>flag (per-command override)CLAUDE_FLOW_DB_PATHenvironment variable$CLAUDE_FLOW_MEMORY_PATH/memory.db.swarm/memory.dbin the current working directory
init
Create the memory database schema. Safe to call multiple times — exits cleanly if the database already exists (use--force to reinitialize from scratch).
Storage backend:
hybrid (SQLite + AgentDB), agentdb, sqlite, or in-memory.Custom database file path.
Wipe and reinitialize the database (destructive).
Show detailed schema output: tables created, indexes, HNSW configuration, and pattern learning settings.
Run a suite of verification tests after initialization and report pass/fail.
Pre-load the ONNX embedding model instead of lazily loading on first use.
store
Save a key/value entry and automatically generate a vector embedding for semantic search.Storage key within the namespace (e.g.
api/auth, pattern/singleton).Text value to store. Can also be passed as the first positional argument.
Namespace to store the entry in.
Time to live in seconds. Entries past their TTL are eligible for
cleanup.Comma-separated tags for grouping (e.g.
auth,jwt,security).Mark this entry for priority vector indexing (embedding is always generated regardless).
Update the value if the key already exists, rather than failing.
Override the database file path.
retrieve
Fetch a single entry by its exact key and namespace.Key to retrieve. Can also be the first positional argument.
Namespace to look in.
Print only the raw stored value to stdout with no decorators — suitable for piping into
jq or JSON.parse.search
Perform semantic, keyword, or hybrid search across stored entries. Returns results ranked by similarity score.Search query. Can also be the first positional argument.
Restrict search to one namespace. Searches all namespaces if omitted.
Maximum number of results to return.
Minimum cosine similarity score (0–1). Results below this score are filtered out.Similarity score interpretation:
> 0.7— strong match, use pattern directly0.5 – 0.7— partial match, adapt before use< 0.5— weak match, consider creating a new entry
Search algorithm:
semantic (cosine similarity over vectors), keyword (full-text), or hybrid (both combined).Build or rebuild the HNSW index before searching. Enables the 150×–12,500× speedup on collections larger than ~1,000 entries.
Use the SmartRetrieval pipeline: query expansion, Reciprocal Rank Fusion (RRF), Maximal Marginal Relevance (MMR), and recency weighting. Requires
@claude-flow/memory with smartSearch support.Override the database file path.
list
List stored entries in a tabular view.Show only entries from this namespace.
Filter by comma-separated tags.
Maximum entries to display.
delete
Remove a single entry from the store.Key to delete. Can also be passed as the first positional argument.
Namespace to delete from.
Skip the confirmation prompt.
stats
Show a full memory statistics dashboard including backend details, entry counts, storage size, oldest/newest entry timestamps, the active embedding provider, and HNSW index status.memory_stats tool.
distill
Compress rawmemory_entries into structured intelligence records using the ADR-174 distillation pipeline.
patterns table for use by the SONA router and ReasoningBank.
backup
Create a timestamped copy of the memory database.Destination path for the backup file. Defaults to
.swarm/memory-backup-<timestamp>.db.