Persistent memory engine with hybrid retrieval, tiered storage, and semantic dedup for AI agents
pip install trw-memory==5.2.0 Copy PIP instructions
Local-first memory for AI agents: a SQLite file on your machine, keyword and vector recall.
trw-memory gives your AI agents long-term memory that runs locally. Memories live in a SQLite file on your machine, recall combines keyword ranking, local vector search and a re-ranker, and storing a conversation calls no LLM by default. On all 1,540 LOCOMO questions, trw-memory 2.0.0 answered 88.9% correctly against 84.1% for mem0 OSS 2.0.20, a statistically significant lead (benchmarks). Use it from Python, the command line, or any MCP client. It is the memory engine behind TRW Framework's MCP server, trw-mcp, and works on its own.
Status: alpha, source-available under BSL 1.1. The public API may change in future releases; test an upgrade before you roll it out.
What's new · Quick start · Benchmarks · How it works · MCP server · Network and security · Upgrading · FAQ
# Core: SQLite store, full-text keyword search, sqlite-vec vector storage, MCP server pip install trw-memory # Recommended: adds the local embedding model runtime and BM25, which turn on # vector search and the re-ranker pip install "trw-memory[all]" Without the [embeddings] extra (included in [all]) nothing produces vectors, so recall is keyword-only. Fetch the embedding model (BAAI/bge-small-en-v1.5, about 130 MB) and the re-ranker once with trw-mcp models fetch or trw_memory.embeddings.fetch_models(); runtime loads never download (see Telemetry and network behavior).
Supported platforms: macOS arm64/x86_64 and Linux with glibc (x86_64, aarch64). CPython 3.11 through 3.14. memory_import_checkout (the checkout-store import behind trw-mcp memory migrate) imports entries of up to 16 MiB each, per row and per value (a larger one refuses the import, naming the limit). On Windows, use WSL2, which works as Linux. Native Windows is not supported, because the store's file-safety checks need POSIX.
import asyncio from trw_memory.client import MemoryClient async def main() -> None: async with MemoryClient(namespace="project:my-app") as client: await client.store( "Pydantic v2 requires use_enum_values=True for YAML round-trip", tags=["pydantic", "gotcha"], importance=0.8, ) results = await client.recall("pydantic serialization", limit=10) high_impact = await client.search(min_importance=0.7, tags=["gotcha"]) print(results, high_impact) asyncio.run(main()) The SDK stores memories in .memory/ under the current directory by default (set MEMORY_STORAGE_PATH to move it). MemoryClient also has store_many() and bulk_store() for batch writes, search_fts() for keyword-only lookup, forget(), reembed(), and audit_learning() / review_quarantined() for lifecycle and security workflows.
# inside `async with MemoryClient(...) as client:` turns = [ {"role": "user", "speaker": "Caroline", "content": "I went to a LGBTQ support group yesterday."}, {"role": "assistant", "speaker": "Melanie", "content": "That's great! What did it look like?"}, ] summary = await client.store_conversation(turns, observed_at="2023-05-08T13:56:00+00:00", session_id="s1") rows = await client.recall("what did the support group look like", limit=5) Each turn's text is stored as written, apart from trimmed whitespace and a Speaker: prefix when a speaker is given, along with the preceding context_turns (default 1), so a reply like "What did it look like?" can be found by what it replied to. Blank turns are skipped, and rows the write gate rejects (PII, poisoning, schema) are counted in the returned summary's rejected and rejected_reasons. Feeding a conversation in chunks? Pass the last turns you already stored as preceding=.
from trw_memory.client import MemoryClient client = MemoryClient(namespace="project:my-app") # Register tools with any agent that has a register_tool() or tool() API client.register_tools(agent) # Or inject recalled memories into a handler @client.auto_recall(query_from="prompt") async def handle_prompt(prompt: str, recalled_memories: list | None = None) -> str: recalled_memories = recalled_memories or [] return f"Found {len(recalled_memories)} relevant memories" CLI trw-memory store --summary "Always use connection pooling for PostgreSQL" --tags db --tags performance --importance 0.8 trw-memory recall "database optimization" --limit 5 trw-memory search --tags security --status active trw-memory consolidate --namespace project:my-app --dry-run trw-memory export --format json > memories.json trw-memory import memories.json --namespace project:new-app trw-memory forget M-abc12345 --namespace project:my-app trw-memory status # Store-file maintenance (stop the daemon first) trw-memory reembed --namespace project:my-app # re-encode vectors after a model change trw-memory restore --from-cold # or --from-snapshot latest trw-memory snapshot create --tier daily # also: snapshot list, snapshot rotate trw-memory backup create # local gzip archive + sha256 sidecar (off-machine leg: trw-mcp backup) store, recall, search, forget, consolidate, export and status run over the loopback daemon. They start one if none is running and present this checkout's grant, which trw-mcp memory token mints; without a grant, or for a namespace outside it, the command prints the remedy and exits 1. --namespace defaults to the checkout's pinned project_namespace (pass --namespace default for the old default). import, reembed, restore, snapshot create and backup create open the store file directly, so they refuse while a daemon runs.
trw-memory itself has no command that mints a grant; trw-mcp memory token is the one that does. On a standalone install, use the Python SDK or trw-memory-server for everyday reads and writes; a stdio trw-memory-server serves its own project store and refuses the machine-wide user store the daemon serves.
export covers one namespace and holds it in memory; it is not a streaming backup and does not include stored vectors. Export from an unchanged store: pagination is not a snapshot across concurrent writes. Use the snapshot commands for database backups. import keeps export-format rows whole, re-screens every row through the write gate, writes rejected rows to .rejected.jsonl, and exits 1 when any row is rejected.
trw-memory backup create gzips a fresh snapshot to /memory/backups/ - .db.gz plus a .sha256 sidecar; it never touches the network. Getting that archive off-machine and back is trw-mcp's job:
trw-mcp backup create --db /path/to/memory.db # local archive; also uploads it when backup_remote_enabled is true trw-mcp backup restore --from latest --db /path/to/memory.db # newest remote backup: list -> presigned GET -> restore trw-mcp backup restore --from /path/to/backup.db.gz --db /path/to/memory.db # offline drill: zero network calls backup restore verifies the sidecar's sha256 against the decompressed bytes before touching the target store — a mismatch refuses and leaves the existing store untouched — then delegates to the same restore_from_snapshot atomic-replace path restore --from-snapshot uses, so it refuses beside a running daemon identically. Run the drill periodically: create a backup, wipe (or point at a scratch) store, restore it, then open a fresh client and recall a known learning by content — a PRAGMA integrity_check alone does not prove the restore worked.
from trw_memory.storage.sqlite_backend import SQLiteBackend from trw_memory.models.memory import MemoryEntry backend = SQLiteBackend(db_path=".trw/memory.db") entry = MemoryEntry(id="M-abc12345", content="Use WAL mode for concurrent readers", namespace="default") backend.store(entry) results = backend.search("query", top_k=10, namespace="default") What's new in 5.x Confidentiality labels for every memory. trw_memory.labels labels rows by tag rule, and rows labelled above team stay out of platform publishing. Secrets stay masked even when disguised. Credential and PII masking catches an email, API key or token split by an invisible character such as a zero-width space or soft hyphen. Quarantined memories never leave the host. Every platform send, including a queued retry, checks the quarantine ledger first. Faster team sync. memory_sync_apply_many writes a pulled page in one daemon call, memory_sync_find_many matches a page in one call, and pulled learnings are embedded as they are stored. A faster first recall. The daemon loads its embedding and rerank models as soon as it is serving, instead of on the first recall. Recall no longer re-sends your memories. Reading a memory no longer marks it for sync; only a content change does. Sharper anchors. A symbol anchor now matches the whole name, so short names like run no longer count as valid because runner appears in the file. 5.0.0 is a breaking release (custom StorageBackends must add get_many, and unprefixed settings variables such as DAEMON_PORT are no longer read, so use MEMORY_ ; Python 3.11+): read the CHANGELOG before upgrading, and upgrade trw-mcp to 8.0.0 with it.
Each result names the trw-memory version it was measured on. Harnesses: benchmarks/locomo/, benchmarks/longmemeval/, benchmarks/engmem/.
trw-memory answered 4.8 points more questions correctly (paired 95% CI +2.9 to +6.8; McNemar p < 0.0001) and led in all ten conversations. It made no LLM calls to store the 5,882 conversation turns; mem0 makes an extraction call for every write.
Method: mem0's evaluation harness (commit 4b61c5d) on all ten LOCOMO conversations; each system answered from its top 10 memories with the same reader and judge (gpt-4o-mini) and the same prompts. trw-memory 2.0.0 with bge-small-en-v1.5 vs self-hosted mem0ai 2.0.20 with all-MiniLM-L6-v2; the embedders differed. September 2026.
With no LLM in the loop, how often the turn that holds the answer comes back in the top results, on default settings:
On the 4.0.0 release candidate, a 10% LongMemEval sample (47 questions) put the evidence in the top 10 for 95.7% of them (95% CI 85.8–98.8). The full 470-question run on the release candidate has not been completed; this sample's interval overlaps the full 2.0.0 result.
These are retrieval hit rates, a different measure from the judged answer accuracy above. Every retrieval change has to hold up on both benchmarks, question by question, before it ships.
4.0.0 RC: the trw-memory 4.0.0 release candidate (int 657629ecd), September 2026. Intervals are Wilson 95% over questions. LOCOMO conversations were stored the way the product stores them (store_conversation) and searched with MemoryClient.recall.
On EngMem, a synthetic benchmark of engineering learnings where newer records supersede older ones, the MCP memory_recall tool found every required record for 16 of 16 queries at 1,000 rows, 14 of 16 at 5,000 and 20,000 rows, and 12 of 16 at 100,000 rows. It never returned a retired record in its top 10 at any size. Plain BM25 keyword search found every required record for none of the 16 queries at 5,000 rows and above, and grep returned a retired record for 8 of 16 at every size. Median memory_recall time was 272 ms at 20,000 rows and 467 ms at 100,000.
16 queries per size, so each rate is coarse: the Wilson 95% intervals are 80.6–100% at 16 of 16, 64.0–96.5% at 14, 50.5–89.8% at 12, 28.0–72.0% at 8 and 0–19.4% at 0. The framework's retrieval core and the library call MemoryClient.recall found every required record, and returned no retired one, for the same number of queries as the tool at every size; the latencies above are the tool's. At 100,000 rows a paired McNemar test against the retrieval core gives p = 0.0005 for BM25 and p = 0.002 for grep. Seed 7, one run per size on one Apple-silicon machine, trw-memory 4.0.0 release candidate (int 657629ecd), September 2026.
These operations used to slow down sharply as the store grew, or as more projects shared it. Profiling in 1.0.0 and 2.0.0 cut them by 2x to over 200x (single runs, one Apple-silicon machine):
On 889 queries over real engineering learnings, fusing BM25 and vectors had the highest scores: Recall@10 0.938 against 0.914 for vectors alone and 0.869 for BM25 alone (point estimates; significance not assessed). On 175 near-duplicate "rediscoveries", hybrid recall would have surfaced the earlier record 94.3% of the time against 72.0% for keyword search alone, with non-overlapping 95% confidence intervals. Measured on trw-memory 0.9.12.
Query --> BM25 (keyword, rank-bm25) --+ +--> RRF fusion --> cross-encoder re-rank --> results Query --> Dense (cosine, sqlite-vec) --+ BM25 drops function words from the query and suffix-stems tokens on both sides ("researched" meets "research"). Dense search scores only vectors from the active embedding model's space. Reciprocal Rank Fusion merges the two lists (the constant k is MemoryConfig.rrf_k, env MEMORY_RRF_K; the default is tuned and may change between releases). A cross-encoder (cross-encoder/ms-marco-MiniLM-L-6-v2) then re-ranks the top recall_rerank_candidates and drops rows it scores below -8, except the top max(5, ceil(limit / 2)), which are always kept (5 rows at the default limit=10, 25 at limit=50). So recall(limit=N) can return fewer than N rows. There is no switch to turn re-ranking off; it is skipped only when sentence-transformers or the cached model is unavailable, and recall then keeps fusion order.
The pipeline degrades instead of failing: without BM25 only dense search runs, and the reverse; with neither, recall falls back to the store's built-in keyword search.
Candidates come from two places: the most recently updated rows of the namespace, plus older active rows that full-text search matches (since 3.0.0). The recency pool holds max(limit * 5, hybrid_search_candidate_pool_size) rows for MemoryClient.recall() and max(limit * 25, hybrid_search_candidate_pool_size) for the daemon's memory_recall and trw-mcp's trw_recall, which rank five times deeper; the pool-size default is 1000. An older row that shares no keyword with the query can still be missed, so an empty result is not evidence of absence. Raising MEMORY_HYBRID_SEARCH_CANDIDATE_POOL_SIZE widens the recency pool at a real cost: on a 6,500-row namespace, warm recall took 139.6 ms at 1000 and 1045.8 ms at 10000.
For the full, current layout, browse src/trw_memory/.
trw-memory-server # stdio transport trw-memory-server serve http # the per-user loopback daemon To wire it into an MCP client (Claude Code, Cursor, Claude Desktop and others use this shape):
{ "mcpServers": { "memory": { "command": "trw-memory-server" } } } The everyday tools:
Graph, sync, namespace-administration and import tools are also registered; REGISTERED_TOOL_NAMES in server.py is the complete list.
trw-memory-server serve http runs one process per operating-system user, serving the same MCP tools over streamable-http on 127.0.0.1, authenticated by per-checkout namespace grants. The port is ephemeral and published in a 0600 daemon.json beside the store, so clients discover it instead of hardcoding it. The daemon keeps every namespace in one store, by default ~/.trw/memory/memory.db ($XDG_DATA_HOME/trw/memory/ or $TRW_USER_DIR/memory/ when set). A memory client that finds no daemon starts one, and an idle daemon exits.
Trust boundary: a token reaches only its grant. trw-mcp memory token mints a token for the calling checkout's project namespace plus user:local. Without --namespace it grants the pinned project_namespace only when that pin matches the namespace derived from the checkout's location; for a moved checkout, name it with --namespace. The daemon keeps only the token's sha256 digest, in the 0600 daemon-grants.json; the raw token lives in that checkout's .trw/runtime/memory-token. Every namespaced call is checked against the grant before RBAC, so a request for any other namespace is refused even with RBAC off. A leftover Slice A daemon-token (one all-namespace bearer) makes the daemon refuse to start; trw-mcp memory token --migrate deletes it. These grants and the 0600/0700 file modes stop one checkout from accidentally reading another's namespace on the same machine; they are not a security boundary against another process running as the same OS user, which can read the token file and the store like any of its own files.
Security settings are daemon-wide. RBAC, the recall filter, canary, poisoning, trust-scoring and provenance settings come from the environment the daemon starts from.
Concurrency: four workers. Each memory_recall, memory_store and memory_maintain call runs its synchronous work in a bounded thread pool (OFFLOAD_MAX_WORKERS = 4), with its own SQLite connection. Four calls make progress at once; the fifth queues, and the queue is unbounded. A request cancelled after it starts still runs to completion; only the result is discarded.
Shutdown. On SIGTERM or SIGINT the daemon cancels queued calls that have not started, waits up to 5 seconds for running calls (OFFLOAD_SHUTDOWN_GRACE_SECONDS), then removes its discovery record whether or not they finished. It is a bounded wait, not a guaranteed drain. After a signal it re-delivers that signal with the default handler, which ends the process; after an idle shutdown there is no signal to re-deliver, so a call still running past the 5 seconds can keep the process alive until it returns. The record is removed only when it names this process and the start time this process wrote, so a slow exit cannot delete a successor's record.
Maintenance. A daemon has no session end, so decay, consolidation and WAL checkpointing never run on their own. memory_maintain(namespace) triggers them (trw-mcp calls it at delivery) and records last_attempted_at / last_maintained_at per namespace in maintenance.json. Consolidation is namespace-scoped; the decay pass and the WAL checkpoint act on the whole store.
trw-mcp is the MCP server of TRW Framework, and trw-memory is its memory backend. trw-mcp 6.1.0 requires trw-memory 3.1.0 or later 3.x.
trw-memory is local-first: all data lives in a local SQLite store (and an optional YAML sidecar), and at runtime it makes no outbound network calls by default. Models download once, when you fetch them; after that, recall and store never contact Hugging Face. Two opt-in features reach the network: remote sync and the decision judge. There is no usage tracking or content phone-home.
OpenTelemetry spans are off unless the host installs an SDK provider (for the daemon: TRW_OTEL_ENABLED=true). They carry ids, counts and enums, never memory content or query text: see OTEL.md.
learning_sharing_enabled governs learning-content publishing. Model downloads are not a runtime behaviour at all, so no consent flag gates them.
Without a cached embedding model, behaviour depends on the entry point. The daemon's memory_recall, memory_store and memory_consolidate (and so the CLI and trw-mcp) run keyword-only, store rows without vectors, and report "dense": "unavailable: " with trw-mcp models fetch as the fix. The in-process MemoryClient does the same for store and recall (keyword-only, logged once); only MemoryClient.reembed(), which cannot degrade, raises ModelNotCachedError naming the same command. Without the re-ranker, recall keeps fusion order. RemoteCodeNotPermittedError raises in both.
TRW_OFFLINE, HF_HUB_OFFLINE and local_only are gone in 4.0.0: runtime is always offline for models, and sync is opt-in. A leftover local_only, in any source (.trw/config.yaml, MEMORY_LOCAL_ONLY, dotenv) and at any value, stops startup with a ConfigError naming the key, so remove it.
Fetch the models once, in the environment that will run trw-memory (or copy a populated Hugging Face cache into it):
trw-mcp models fetch # standalone trw-memory: python -c "from trw_memory.embeddings import fetch_models; fetch_models()" Then keep the two opt-in network features off, which is the default:
export TRW_JEV_ENABLED=false # the decision judge # and leave sync_enabled / learning_sharing_enabled unset From then on nothing leaves the machine: model loads are cache-only, and there is no runtime download to block. To run keyword-only on purpose, omit the [embeddings] extra. Verify that the on-disk memory.db is mode 0600, that TRW_JEV_ENABLED / assess_enabled are not set in any layer, and that no outbound connection is attempted.
Every breaking change, including the new StorageBackend.get_many abstract method and the default store's move beside the project's .trw, is in the CHANGELOG.
If you use trw-memory through trw-mcp, upgrade both together (trw-mcp 7.0.0 needs trw-memory 4.x) and follow the trw-mcp README. For a standalone install:
The default embedding model has been BAAI/bge-small-en-v1.5 since 1.0.0 (384 dimensions, like the earlier all-MiniLM-L6-v2; queries carry the model's search instruction, stored documents do not). Vectors written by another model, or written before vectors recorded which model produced them, live in a different embedding space, so dense recall ignores them instead of scoring across spaces. Until they are re-encoded, BM25 still ranks those rows whenever they reach the recall candidate pool, and each recall logs one dense_vectors_excluded_embedding_space warning with the number of vectors held back.
Re-encode each namespace once (idempotent and resumable; rows already in the active space are skipped, and each batch commits on its own):
trw-memory reembed --namespace default # --batch-size 64, --format json async with MemoryClient(namespace="default") as client: counts = await client.reembed() trw-memory reembed works on a store the SDK opens in local mode (under your storage_path), and the CLI refuses to run while a daemon runs. For the daemon's store at ~/.trw/memory/memory.db, use the daemon's memory_reembed tool (trw-mcp memory reembed). Both are idempotent and resumable, and neither downloads a model, so fetch the new one first. To keep the previous model, set MEMORY_EMBEDDING_MODEL=all-MiniLM-L6-v2; a process only ever scores vectors from the space its embedder reports, so switching back and forth never mixes spaces.
Stop old-version writers first; they can regenerate retired vectors. Take a verified backup with SQLite's online backup API (the approach in storage/_schema_backup.py), not a copy of a live database without its WAL, and never overwrite canonical writes made since the snapshot to recover optional vectors.
This recipe is for an existing, disposable, unencrypted snapshot, not a live store. Choose its embedding dimension, namespace and parent IDs explicitly; opening SQLiteBackend can run normal schema initialization. apply = False only lists the selected vectors; True removes those derived vectors atomically. It never deletes canonical records or other namespaces, and "no vectors installed" means unavailable, not a successful cleanup.
from pathlib import Path from trw_memory.storage.sqlite_backend import SQLiteBackend snapshot = Path("/absolute/path/to/disposable-snapshot.db") if not snapshot.is_file(): raise FileNotFoundError(snapshot) namespace = "default" # explicitly selected, locally authorized namespace parents = ["selected-parent-id"] apply = False backend = SQLiteBackend(snapshot, dim=384) # use this snapshot's dimension try: if not backend.supports_vectors(): raise RuntimeError("legacy cleanup unavailable: sqlite-vec required") with backend.transaction(): for parent_id in parents: siblings = backend.hype_sibling_ids(parent_id, namespace=namespace) print(parent_id, siblings) if apply: backend.delete_hype_siblings(parent_id, namespace=namespace) finally: backend.close() Cleanup is idempotent, and an interruption rolls the transaction back. Rolling the package back can reopen the same canonical store; restoring the previous optional ranking also needs its matching derived-index snapshot.
trw-memory declares support for CPython 3.11 through 3.14; its CI runs the suite on 3.12 and the maintainers' local gates run on 3.14. One property of the interpreter matters beyond the version: its bundled SQLite. WAL space is only reclaimed on SQLite >= 3.51.3 (or the 3.44.6 / 3.50.7 backports). Below that, storage/_wal_checkpoint.py coerces resetting checkpoints to PASSIVE, which is safe but lets the -wal file grow without shrinking. Check yours with python -c "import sqlite3; print(sqlite3.sqlite_version)"; on macOS, Homebrew's current Python ships a qualifying build, and trw-mcp doctor names the qualifying interpreters it finds. The 3.1.0 fix for I/O errors during the integrity check reads sqlite_errorcode, so it needs Python 3.11+.
The SQLite engine is selected at import by storage/_dbapi.py, which ranks the interpreter's SQLite against an installed pysqlite3 on (carries the fix, version) and never replaces a newer engine with an older wheel. The optional [sqlite-fix] extra pulls pysqlite3-binary on x86_64 Linux only. No published wheel currently bundles a qualifying SQLite, so it is an engine override, not a fix.
pip install -e ".[dev]" # Full suite (>=85% coverage required; see fail_under in pyproject.toml) python -m pytest tests/ -v --cov=trw_memory --cov-report=term-missing # Type checking python -m mypy --strict src/trw_memory/ # Targeted runs python -m pytest tests/test_client_*.py -v python -m pytest tests/test_retrieval_*.py -v Optional dependencies Extra Packages Purpose [embeddings] sentence-transformers Dense vectors (BAAI/bge-small-en-v1.5 by default) and the cross-encoder re-ranker [all] embeddings The full retrieval stack (sqlite-vec and rank-bm25 are in the core install) [sqlite-fix] pysqlite3-binary (x86_64 Linux only) Optional SQLite engine override; see Supported interpreters [dev] pytest, mypy, ruff, coverage, pip-audit, vulture, deptry Testing and linting There is no [llm] extra and no LLM-backed consolidation.
A local-first memory engine for AI agents. It stores memories in SQLite and recalls them with keyword search plus, with the [embeddings] extra, local vector search and a cross-encoder re-ranker. It ships a Python SDK (MemoryClient), a CLI (trw-memory) and an MCP server (trw-memory-server). You do not need TRW Framework to use it.
Not by default. store_conversation() stores each turn's text as written (whitespace trimmed, speaker prefixed) and calls no generative model; the reader does the inference at recall time. If you enable the optional decision judge, each write also sends the entry's redacted text to it for a shadow poisoning check (see Telemetry and network behavior). Consolidation uses a heuristic, not an LLM. The embedding model and re-ranker are small local models from the [embeddings] extra.
On all 1,540 LOCOMO questions, run through mem0's own evaluation harness with the same reader and judge, trw-memory 2.0.0 answered 88.9% correctly against 84.1% for mem0 OSS 2.0.20: +4.8 points, statistically significant, and ahead in every conversation. trw-memory stores conversations without LLM calls, where mem0 runs an extraction call for every write. Method: Benchmarks.
Yes, always. All data is local, remote sync and the decision judge are off by default, and runtime never downloads a model. Fetch the models once for full recall. Without the embedding model the daemon, the CLI and the in-process MemoryClient run keyword-only (only MemoryClient.reembed() raises ModelNotCachedError); without the re-ranker, recall just skips re-ranking. See Telemetry and network behavior.
Not always on a very large namespace. Recall ranks the most recently updated rows (at least 1000 by default, more for a large limit) plus older active rows that full-text search matches. An older row that shares no keyword with the query can be missed, so an empty result is not evidence of absence. recall(limit=N) can also return fewer than N rows, because the re-ranker drops low-confidence results beyond the top max(5, ceil(N / 2)).
The Python SDK uses .memory/ under the current directory by default (MEMORY_STORAGE_PATH overrides it). The loopback daemon, which the CLI and trw-mcp use, keeps every namespace in one file, by default ~/.trw/memory/memory.db. Nothing leaves the machine unless you enable remote sync or the decision judge (see Telemetry and network behavior).
Business Source License 1.1: source-available, free for non-competing use, converting to Apache 2.0 on 2030-03-21. The package is alpha.
Built by Tyler Wall · TRW Framework · Documentation · License
ai-agents embeddings knowledge-management mcp memory retrieval semantic-search
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.




