Skip to main content Switch to mobile version loop-memory 0.4.22 A general-purpose, local memory system for every AI agent you run. Loop Memory auto-captures conversations from Codex / Claude / Hermes / OpenClaw, scores them by importance × recency × usage × feedback, distils them into a curated wiki, and serves everything from a single web UI.
pip install loop-memory==0.4.22 Copy PIP instructions
A general-purpose, local-first memory system that closes the agent loop for every AI agent you run.
Point Loop Memory at any agent's transcript directory and it quietly catches every conversation, scores it, distils the long tail into a tight wiki of stable knowledge, and re-injects the relevant pieces into the next session. Out of the box: hooks for Codex, Claude, Hermes, and OpenClaw; an SDK + generic watcher CLI cover everything else.
What's new in 0.4.22 — the agent-namespace filter now works, and it is enforced in the query instead of on top of the answer (audit 2026-11-15, weekly ecosystem sync). The audit for this release (2026-11-15) turned up a real hole rather than a hypothetical one. GET /api/v1/recall?agent_id=X was documented as "Unified recall filtered to a single Agent namespace" — but the filter was applied to the store's output, and it had two separate failure modes. On the legacy path it was a silent no-op: MemoryStore.recall() never returned the agent_id / user_id columns, so the route's predicate read None/None for every row, decided every row was "global", and let all of them through — an agent that explicitly asked for its own namespace was handed every other agent's memories as well. On the hybrid path it ran after the LIMIT: the filter worked, but it ran on the store's already-trimmed result set, so a foreign namespace could spend the caller's entire result budget — an agent asking for 5 hits could get zero, while its own matching rows sat further down the ranking. Both failures have the same root cause: the predicate was in the caller instead of in the query — exactly what the upstream projects in this window converged on. plastic-labs/honcho v3.6.0 (2026-11-10, AGPL-3.0) made tenant_id lead every primary key, with Postgres row-level security scoping every read and write, and refused to hand a tenant an empty namespace; EverMind-AI/EverOS v1.6.0 (2026-11-11) made deletion owner-scoped and answered 503 SESSION_BUSY rather than deleting half of a session; thedotmack/claude-mem (v15.16.x) gave each scope its own project by default and made "an explicitly empty project selection show nothing instead of observations from every project" (#5866); vectorize-io/hindsight v1.2.1 stopped a bank clone from taking over another bank's alias (#6280) — pattern references only, no code copied, and the two AGPL-3.0 projects contributed nothing but an idea. What shipped: a single predicate builder (_scope_clause()) that every retrieval channel builds its query from, so the namespace lives in the SQL of the BM25 channel (both the FTS5 query and the LIKE backstop), the semantic channel, the entity channel, recall(), recall_hybrid() and recall_as_of() — the fused ranking, and the limit that trims it, now only ever sees the caller's own rows; every hit now reports its agent_id / user_id, which is what makes the legacy no-op impossible to reintroduce silently; all four public surfaces expose it — GET /api/v1/recall and GET /api/recall accept agent_id / user_id, the MCP recall tool scopes to LOOP_MEMORY_AGENT_ID / LOOP_MEMORY_USER_ID (the MCP server is started once per client, so the environment already identifies the caller) and accepts explicit overrides, and loop-memory recall gained --agent-id / --user-id; and a client that writes into a namespace now reads from it — MemoryClient.memory(store, agent_id="x") and MemoryClient.http(url, agent_id="x") fall back to that identity on recall(), which is precisely the asymmetry that hid the leak (pass agent_id="" for the explicit escape hatch). A memory with no agent_id stays global and visible to everyone, because the ingest pipeline, the consolidator and the dream job all write global rows. 43 new regression cases; suite at 1084 passed / 4 skipped. See docs/namespace-isolation.md for the full contract. Full CHANGELOG →
Why Loop Memory vs. every other agent-memory project
After install: 30-second setup
Auto-capture (after every conversation)
Dashboard + Evolution consolidator
Auto-feedback into every LLM client
Wiki scope auto-classification
Using distilled knowledge in your clients
Loop Memory gives every agent you use a single, persistent brain that outlives any one conversation. Any agent that drops transcripts on disk — Codex CLI, Claude Code, Hermes, OpenClaw / clawx, Aider, Cursor, … — works; the shipped hooks cover the popular ones and a generic watcher CLI (loop-memory hook --source --watch ) accepts anything else. Loop Memory quietly catches every fragment, scores it by importance × recency × usage × feedback, distils the long tail into a curated wiki, and re-injects the relevant pieces into the next session.
flowchart LR subgraph Capture A1[Codex CLI] --> Store A2[Claude Code] --> Store A3[Hermes] --> Store A4[OpenClaw / clawx] --> Store A5[Any watcher] --> Store end Store[(SQLite sessions + memories)] Store --> Score[Signal-aware scoring] Score --> Cluster[Semantic clustering] Cluster --> Distill[Per-cluster distillation] Distill --> Wiki[(Curated wiki preferences / decisions / projects / domain)] Wiki --> Recall[Next-session recall via MCP / hooks] Recall --> A1 Recall --> A2 Recall --> A3 Recall --> A4 One loop, many agents, one evolving wiki.
The shipped hooks are the four popular agents we maintain in-tree. The generic watcher CLI is the supported extension point for every other agent — Aider, Cursor, Copilot, Cline, Continue, Goose, your own home-grown CLI, anything that drops JSON/JSONL on disk.
pip install loop-memory # core: zero deps pip install 'loop-memory[serve]' # + FastAPI web UI pip install 'loop-memory[openai]' # + OpenAI client pip install 'loop-memory[all]' # everything Quickstart
# 1. Import everything that already lives on your disk loop-memory ingest codex # ~/.codex/sessions/*.json loop-memory ingest claude # ~/.claude/**/*.jsonl loop-memory ingest hermes # ~/.hermes/**/*.jsonl # 2. Look at it loop-memory serve --port 7767 # open http://127.0.0.1:7767 # 3. Make it run on a timer # (see docs/auto-capture.md for launchd / systemd / cron snippets) loop-memory consolidate # rescore + GC + dedupe # 4. Optional: sleep-time consolidation (soft expiry, never deletes) loop-memory dream # dry run -- what would expire / merge loop-memory dream --apply # write it (soft-expire + supersede) # 5. Optional: measure the retrieval quality (offline, no API calls) loop-memory bench # recall@k / MRR / nDCG over a fixed fixture Why Loop Memory vs. every other agent-memory project
We surveyed the open-source memory systems for AI agents that came up in 2026 (Mem0, Hindsight, OpenViking, A-MEM) and kept what worked. Loop Memory is the smallest system that still ships all of the following — every other project we looked at lacks at least one:
The honest gap: we don't have Mem0's hosted platform (managed multi-tenant scaling, byte-benchmarked vector indexes), and we don't ship OpenViking's companion desktop app. What we do ship is the smallest set of moving parts that lets you run the same memory loop across every locally-installed agent without sending your transcripts anywhere.
If you want raw scale, Mem0's cloud SKU will beat us. If you want a local-first single-user brain that every offline agent (Codex, Claude, Hermes, clawx) can read and write, we built this for you.
The live interactive OpenAPI document is at http://127.0.0.1:7767/docs once the server is running.
# Show me what's installed, what's wired, what's broken. loop-memory doctor # Auto-configure MCP + SessionStart hooks for every detected CLI # (Codex CLI, Claude Code, Hermes). loop-memory install-hooks # Install the openclaw/clawx auto-ingest watcher (launchd on macOS). loop-memory openclaw-setup # Run it on a schedule — web UI → ⚙ Model → set "every day 03:00". loop-memory serve --port 7767 # → http://127.0.0.1:7767 The web UI also has a 🔍 Run doctor panel under the kebab menu (⌘D) that shows the same green/red diagnostic screen inline.
A new conversation ends → its transcript file lands in a watched directory → the watcher ingests it → it shows up in the UI. Three flavors:
Three of these in a tmux session, or persisted via launchd, keeps your memory store fresh without any clicks. Run loop-memory consolidate on an hourly cron to keep the scoring healthy.
See docs/auto-capture.md for ready-to-paste launchd + systemd + cron snippets.
The Dashboard tab gives you a live, at-a-glance view of the memory pipeline and lets you steer it.
4 KPI cards — raw memory count, distilled wiki count, average score, total recall events (real-time, auto-refresh every 8s).
5-stage data-flow animation — score → cluster → distill → wiki → memo. Click any node to drill into the items that flowed through it last run. The wave path on top pulses to suggest motion; nodes pulse on hover.
Drill-down panel — every item has 👍 / 👎 buttons that feed the evolution loop. Negative feedback lowers the memory's importance; positive bumps it. Both update the "most recalled memories" list.
Evolution run button — invokes the 5-stage Evolution Consolidator with whatever provider is currently configured.
Evolution Consolidator (replaces the old single-pass one)
A hierarchical, signal-aware distillation pipeline designed to keep your knowledge base tight and increasingly aligned with your real preferences over time.
loop-memory consolidate # legacy single-pass curl -X POST http://127.0.0.1:7767/api/admin/evolution/run # 5-stage Scoring v2: time × usage × feedback
The score of every memory is a weighted blend of four components, not just importance × recency:
The blend is normalised to [0, 1]. What this means in practice: recent + useful memories float up; old + unused memories sink; memories the user explicitly 👍 stay high; 👎 ones stay low even if they were popular once.
API endpoints to inspect the breakdown:
curl localhost:7767/api/memories/ /score # 4 components curl localhost:7767/api/pipeline/score-distribution # 10-bin histogram curl localhost:7767/api/pipeline/decay-stats # age buckets × avg score curl -XPOST 'localhost:7767/api/admin/bump-recall?ids= ' # simulate LLM recall Dashboard v2: real animation, real charts
The Dashboard tab has been rebuilt end-to-end:
5 KPI cards with live sparklines (60-sample rolling history).
Active-stage card — shows the pipeline stage currently running, switching automatically as pipeline_runs update.
Animated data flow — particle dots travel left-to-right along the SVG path whenever a stage is running; nodes pulse with the active stage highlighted. Click any node to drill down.
Score distribution histogram — 10 bins of v2 score, hover for exact counts.
Time-decay chart — bars are count per age bucket, the line on top plots average score so you can see the decay curve.
Per-memory score breakdown — every drill-down item has a "why?" button that expands a 4-bar breakdown (importance / recency / usage / feedback).
↻ bump button on each item — lets you mark a memory as "just consulted by the LLM" so its usage component goes up and it ranks higher next time.
User signals close the loop:
👍 on a drill-down item → positive++, importance += 0.05
👎 → negative++, importance -= 0.05
Every recall() / search bumps recall_count on the returned rows so the next Stage-1 ranks them higher.
Dream: sleep-time consolidation (0.4.16)
loop-memory dream [--apply] is the non-destructive counterpart to loop-memory cognitive-sleep --apply:
The utility blend is 0.45 × importance + 0.30 × usage + 0.25 × recency, so a rarely-stated-but-constantly-recalled fact is protected while a never-used stale row is expired. Age alone never decides — that is the whole point of "In Defense of Forgotten" (arXiv 2605.27366).
The pass is a dry run by default: --apply (CLI) or "apply": true (HTTP) is what actually writes. A dry run changes no memory data -- no expiry, no supersession, no rescore -- it only appends a cognitive_audit row per proposed action (action="suggest"), which is the reviewable plan the dashboard shows before you commit.
loop-memory dream --json # machine-readable dry run loop-memory dream --apply --ttl-days 60 # tighter horizon loop-memory dream --apply --utility 0.2 # expire more aggressively curl -X POST http://127.0.0.1:7767/api/v1/dream -d '{"apply": true}' After a dream pass, ask for the current truth explicitly:
loop-memory recall "editor preference" --latest-only --latest-only (Mem0 v2 latest_only parity) drops rows outside their validity window at now, collapses a subject-key slot to its newest live row, and collapses near-duplicate paraphrases to the newest one.
loop-memory cognitive-sleep [--apply] runs an auditable cleanup pass over the store:
Surfaces contradictions between memories (e.g. "user prefers X" vs. "user prefers Y") so you can resolve them in one click rather than chasing them across sessions.
Drops items that are below the configurable floor (min_score) and older than the floor age.
Merges near-duplicate memories (cosine ≥ 0.95 with MergeableBy rules).
Emits a full audit row per action — visible in the Dashboard → Audit tab and reachable via the MCP audit tool, so every byte the consolidator ever touches is traceable.
Dry-run by default; pass --apply to commit.
Observability (since 0.4.3). The report carries per-stage timings (scan, stale, merge, contradict, apply, audit) and an explicit aborted flag with an abort_reason that names the stage the budget fired in. Pass --deadline-seconds (HTTP: POST /api/v1/cognitive/sleep with {"deadline_seconds": N}; SDK: client.cognitive_sleep(deadline_seconds=N)) to bound the sweep — useful for nightly cron, where a stuck sweep should leave a loud trace instead of a silent spinner.
loop-memory graph-rebuild extracts entities from every distilled wiki page and every long-term memory, then materialises a typed relation graph:
Visible as the Knowledge graph globe tab in the web UI.
Queryable via the MCP subgraph and remember_edge tools.
Re-built by the Evolution Consolidator's Stage-5 evolution memo, so the graph evolves alongside the wiki.
Distilled knowledge is only useful if your LLM tools can actually read it. Loop Memory ships with three zero-dep commands that wire the memory store into Codex CLI, Claude Code and Hermes automatically:
Quick setup on a fresh machine:
pip install loop-memory loop-memory install-hooks # writes ~/.codex/config.toml + ~/.claude/{mcp.json,settings.json} + ~/.hermes/mcp.json # restart Codex / Claude Code / Hermes and the next session will: # 1) auto-inject the distilled wiki as the first user message (SessionStart hook) # 2) expose `recall` / `list_wiki` / `get_wiki` MCP tools so the model can pull more on demand Manual smoke-test without restarting the client:
# one-shot: install the memory-discipline block into the agent's # rule file so the client calls `recall` on every task start. loop-memory rules --agent codex --write # writes ./AGENTS.md (append, never overwrite) loop-memory rules --agent claude --write # writes ./CLAUDE.md loop-memory inject # dumps the warm-start block to stdout printf '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}\n{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"wiki_summary"}}\n' \ | loop-memory mcp # round-trips JSON-RPC over stdio The MCP server speaks JSON-RPC 2.0 over newline-delimited stdin/stdout, uses no third-party deps, and is safe to launch per-client (Claude Code, Codex CLI, Hermes each spawn their own process). OpenClaw is detected but currently needs loop-memory hook --source openclaw --watch ~/.openclaw/sessions & to start its watcher.
loop-memory serve opens a small local page at http://127.0.0.1:7767 with four primary views:
Timeline: searchable session history and scored memories from every client.
Dashboard: lifecycle, source health, distillation progress, weekly report, contradictions, audit data, and the end-to-end memory architecture.
Wiki: distilled, editable knowledge pages with export and Ask workflows.
Knowledge graph: an interactive globe built from distilled Wiki knowledge.
Top-right actions provide one-click import, re-scoring, AI consolidation, model configuration, scheduling, language switching, and light/dark themes.
from loop_memory import MemoryStore from loop_memory.ingest.loader import get_loader from loop_memory.ingest.pipeline import MemoryPipeline from loop_memory.backends.embedding import HashingEmbedder from loop_memory.jobs.consolidate import Consolidator store = MemoryStore("~/.loop_memory/loop_memory.db") pipeline = MemoryPipeline(store, embedder=HashingEmbedder(dim=128)) loader = get_loader("claude") for path in loader.discover(): session = loader.load_one(path) if session: pipeline.run(session) # background-style consolidation report = Consolidator(store, embedder=HashingEmbedder(dim=128)).run() print(report) # ConsolidateReport(rescored=15, gc_removed=0, merged=0, elapsed_ms=2.88) Or just keep using the engine inside a Python process:
from loop_memory import LoopEngine, EchoLLM, HashingEmbedder engine = LoopEngine(llm=EchoLLM(), embedder=HashingEmbedder(dim=128)) print(engine.turn("Hi! I'm Mia and I love matcha.").reply) The four-stage loop
Even though v0.2 is built around local storage, the original Retrieve → Generate → Reflect → Store loop engine is still here:
loop_memory/ loop_memory/ cli/main.py # CLI entrypoint + COMMAND_HELP table + `--version` ingest/ # Codex / Claude / Hermes / OpenClaw / generic loaders wiki/ # distillation, classifier, scope auto-promotion graph/ # entity extraction + knowledge-graph build jobs/ # consolidate / evolve / cognitive-sleep / dream / scheduler / contradiction / graph llm/ # provider protocol + OpenAI / Anthropic / Ollama / rule-based backends/ # embedding (hashing / sentence-transformers) + vector store (memory / chroma) storage/ # SQLite-backed MemoryStore + migrations privacy/ # stripping + regex redaction security/ # Keychain / 0600-file secrets wrapper + the transport guard mcp/ # stdio JSON-RPC MCP server serve/ # FastAPI app, watcher, web UI (Timeline / Dashboard / Wiki / Graph) export/ # markdown + v7 portable bundle export/import sdk.py # four-verb stable API: remember / recall / forget / feedback sdk_extensions.py # optional high-level helpers (graph edges, wiki pages) engine/loop.py # Retrieve → Generate → Reflect → Store loop memory/types.py # MemoryItem + 4 tiers examples/demo.py # runnable, zero-API-key demo py.typed tests/ # 1084 unit tests across memory / SDK / serve / CLI / scripts docs/ auto-capture.md # launchd / systemd / cron recipes architecture.md # layered view + 5-stage evolution pipeline api.md # HTTP API reference transport-security.md # how a remote client may talk to `serve` (0.4.21) namespace-isolation.md # who may read which memory (0.4.22) agent-memory-api.md # four-verb SDK / HTTP / MCP contract universal-agent-memory.md # v7 graph memory + cognitive sleep + bundles providers.md # LLM provider reference settings.md # settings table + secrets file weekly-research-automation.md # how the project auto-evolves from upstream research research/ # the weekly ecosystem notes each release is based on Security & auth token
Loop Memory ships with a CSP deny-all + Origin-bound CSRF policy on every state-changing request, parameterised SQL throughout, and a Keychain-backed secret store (~/.loop_memory/secrets.json mode 0600 on Linux). The web UI also auto-sanitises any markdown it renders (DOMParser + tag allowlist + URL scheme scrubber — see loop_memory/serve/static/js/lib/sanitize.js).
Auth token (recommended on first run):
# Generates a 256-bit URL-safe token, stored hashed in the settings table. # The server stays authenticated forever — there is no "disable" path. curl -X POST http://127.0.0.1:7767/api/admin/auth/token | tee token.txt # Rotate later (use this when you suspect the token has leaked): curl -X DELETE http://127.0.0.1:7767/api/admin/auth/token \ -H "Authorization: Bearer $(cat token.txt)" | tee token.txt Pass the token as Authorization: Bearer … header on every admin call. The web UI stores it in localStorage under loop_auth_token and attaches it automatically; non-browser clients (curl, MCP, SDK) must opt in by passing it explicitly.
Remote clients (SDK): the HTTP SDK can send the token for you, and it refuses to send it — or any memory text — over an unencrypted connection to a remote host:
client = MemoryClient.http( "https://memory.example.com", token=open("token.txt").read().strip(), # Authorization: Bearer … ) client.remember("deploys go out on Tuesdays") Plain http:// is still fine for 127.0.0.1 / localhost / ::1 (the traffic never leaves the machine — that is the default deployment), but plain http:// to any other host is refused: the memory text and the bearer token would cross the network in cleartext. A private tunnel or a VPN'd LAN is a legitimate deployment, so allow_insecure=True (or LOOP_MEMORY_ALLOW_INSECURE=1) exists — but it is never silent, it warns on every construction. Redirects that downgrade https:// → http://, and cross-origin redirects that would replay the token, are refused too. The full contract is in docs/transport-security.md.
Server side: loop-memory serve --host prints a warning and records the bind address, so loop-memory doctor reports it as a plaintext_exposure warning — the API is reachable from the network over plaintext.
✅ Always, even on loopback. The default of "no token" exists only as a TOFU bootstrap path; an unconfigured server trusts any browser on localhost to mutate state (CSRF still rejects cross-origin POSTs from a remote page, but a malicious local app can still call the API).
✅ Especially if you ever bind to anything other than 127.0.0.1 (loop-memory serve --host 0.0.0.0 now prints a security warning).
❌ Never DELETE /api/admin/auth/token to "disable" auth — it rotates to a fresh token instead (the audit found that fully disabling auth was the easiest way back to the no-token state).
install-hooks runs Python that touches ~/.* — it's gated by the bearer token like every other POST /api/admin/* route.
A remote client cannot leak memory text to the network in cleartext: the SDK refuses a plaintext http:// base URL that is not loopback, refuses a URL with embedded credentials, and refuses redirects that downgrade the scheme or would replay the Authorization header (audit 2026-11-08, 0.4.21 — see docs/transport-security.md).
The ... span stripping in the privacy layer keeps user-marked secrets out of long-term storage; the regex redaction layer then catches API keys / tokens / private keys / JWTs / generic high-entropy blobs before they reach SQLite.
The bundled weekly-report Markdown is rendered through the sanitizeHtml sanitizer (see tests-js/test_sanitize.test.mjs for the bypass coverage).
New wiki pages use a local, deterministic scope evaluator by default:
Universal security guidance (for example, rotating API keys, never pasting secrets, or using parameterised SQL) is automatically promoted to scope="global" when the classifier has enough security and cross-client signals.
Preferences, personal facts, project incidents, and other knowledge default to the client that supplied the evidence (codex, claude, hermes, or openclaw). Pages with no source metadata use the privacy-preserving codex fallback rather than being shared with every client.
An explicit scope always wins. Use scope="auto" (or omit it) to ask the evaluator for a recommendation. Existing pages are not migrated, and an update that omits scope preserves its current manual scope.
Every decision is stored in the page's auto_classification audit object; inspect it with GET /api/wiki/{page_id}/classification-history or preview a decision with POST /api/wiki/classify.
The behavior is controlled by GET/PUT /api/admin/wiki/scope: {"enabled": true, "mode": "pattern"} is the default. mode="off" keeps new pages client-scoped without automatic global promotion. The classifier is local and makes no model or network request on a wiki write.
The OpenAI-compat / Anthropic / Ollama providers (and the optional openai adapter) honour two env-var knobs so you can pin distillation deterministically without touching the behaviour config:
LLM_TEMPERATURE — float, defaults to 0.3 (or the explicit kwargs.temperature). Invalid values are ignored with a warning.
LLM_SEED — int, sent as seed for OpenAI / Anthropic / Ollama where supported. Omitting it preserves the existing "no seed" behaviour so older call sites do not need to migrate.
Both env vars are read at every complete() call, so a single export LLM_SEED=42 plus a nightly cron makes wiki distillation reproducible. Pinned by 11 cases in tests/test_llm_providers.py::LLMEnvVarTests.
Q: pip install loop-memory succeeds but loop-memory serve says ModuleNotFoundError: No module named 'fastapi'. A: fastapi is the optional [serve] extra. Install it explicitly: pip install 'loop-memory[serve]' (or 'loop-memory[all]' for everything).
Q: My ~/.codex/sessions/ is empty / nothing appears in the UI. A: Run loop-memory doctor — it prints per-source paths, last-seen mtime, and whether the watcher is running. Then check loop-memory hook --source codex --watch ~/.codex/sessions is alive in another shell (or via launchd — see docs/auto-capture.md).
Q: Distillation never finishes / wiki stays empty. A: You need an LLM provider configured. Open the web UI → ⚙ Model, pick a provider, paste an API key, and click Save. Then either wait for the scheduler or hit � Run now. Zero-deps installs ship with a rule-based provider as a placeholder so the loop never blocks on a missing key.
Q: loop-memory install-hooks warns that the token file already exists. A: That's expected — it's idempotent. To force a rewrite, delete the target files (~/.codex/config.toml, ~/.claude/mcp.json, ~/.hermes/mcp.json) and re-run. The tool also refuses to touch non-loop-memory config keys.
Q: How big can the SQLite store get before I should worry? A: Practical floor: 100k memories / 10k wiki pages stays under ~80 MB and recall() returns in <100 ms. The Evolution Consolidator is designed to keep the wiki tight (~hundreds of pages) rather than let it grow unbounded. Run loop-memory cognitive-sleep --apply weekly to drop the long tail.
Q: Can I sync the store across machines? A: The SQLite file is git-friendly and copy-friendly. The MEMORY.md
graph + memories + metadata bundle (`loop-memory export
Q: Is there a hosted / cloud version? A: No. Loop Memory is MIT-licensed and 100% local; the SQLite file lives under ~/.loop_memory/. The web UI is bound to loopback by default; binding to 0.0.0.0 prints a security warning and requires an auth token.
Q: Where do secrets / API keys live? A: Two places. Provider keys you set in the ⚙ Model UI are written to ~/.loop_memory/secrets.json (mode 0600) via the loop_memory.security.secrets wrapper, which prefers the macOS Keychain on Darwin and falls back to the encrypted file on Linux. The auth token used by the web UI is hashed in the SQLite settings table — never stored in plaintext.
Q: I see "no version" / "package not found" on the PyPI badge. A: shields.io pulls from a separate data source that lags PyPI by a few minutes after a new release. Re-publish the badge warmer step in .github/workflows/publish.yml to force a refresh, or wait ~30 minutes for shields.io to catch up.
# Python suite (memory + SDK + serve + CLI) python -m pytest -q python -m unittest discover -s tests -v # Frontend sanitizer bypass suite (jsdom) npm test Using distilled knowledge in your clients
After running loop-memory consolidate (or letting the scheduler do it), your memories get distilled into durable wiki pages. Three ways to use them in Claude / Codex / Hermes / OpenClaw:
1. Quick paste — loop-memory ask
Works from any terminal, no server required:
loop-memory ask "what does the user prefer for X?" Prints a paste-ready context block to stdout. Put it as the first message of a new session in any LLM client.
# Legacy single-file markdown export (kept for existing scripts) loop-memory export loop-memory export --out ~/Notes/user.md --q "preferences" # v7 portable bundle: MEMORY.md + pages + memories + graph + metadata loop-memory export ~/Notes/loop-memory-bundle loop-memory export-bundle ~/Notes/loop-memory-bundle Or in the UI: open the Wiki tab → click ⇩ Export. A markdown file downloads; paste it into your daily journal or as a system prompt.
3. Per-page "Copy as context" in the UI
Each wiki card has a ⎘ button that copies a single distilled page formatted as background context — ready to paste as the system prompt of a fresh Codex / Claude / Hermes session.
4. Auto-context (MCP-aware clients)
If you ran loop-memory install-hooks, Codex / Claude Code / Hermes will automatically pull relevant memories via the MCP server. OpenClaw does not support MCP — use loop-memory ask instead.
Click the ⚡ Run now button (top-right) or run:
loop-memory consolidate-now # ask the running server to start a pass right now This uses your configured model, batch size, and provider — same as the scheduled runs.
Author: Loop Memory contributors
Both files in this release have provenance metadata.
MIT View SPDX License List
openai chroma sentence serve dev all
llm memory agent agents rag long-term-memory memory-system codex claude hermes openclaw clawx
Development Status 4 - Beta
Intended Audience Developers
Programming Language Python :: 3
Topic Scientific/Engineering :: Artificial Intelligence
Release files for loop-memory 0.4.22
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 1.4 MB
Release files / loop_memory-0.4.22.tar.gz
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 Nov 15, 2026.
Release files / loop_memory-0.4.22-py3-none-any.whl
Security for loop-memory 0.4.22
Both files in this release have been uploaded with provenance metadata.
With provenance loop_memory-0.4.22.tar.gz Nov 15, 2026
With provenance loop_memory-0.4.22-py3-none-any.whl Nov 15, 2026
Attestation for loop_memory-0.4.22.tar.gz
Attestation for loop_memory-0.4.22-py3-none-any.whl
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Nov 30, 2026 2 release files Full provenance
Nov 22, 2026 2 release files Full provenance
Nov 15, 2026 2 release files Full provenance
Nov 8, 2026 2 release files Full provenance
Nov 1, 2026 2 release files Full provenance
Oct 25, 2026 2 release files Full provenance
Oct 18, 2026 2 release files Full provenance
Oct 12, 2026 2 release files Full provenance
Oct 4, 2026 2 release files Full provenance
Sep 27, 2026 2 release files Full provenance
Sep 23, 2026 2 release files Full provenance
Sep 20, 2026 2 release files Full provenance
Sep 13, 2026 2 release files Full provenance
Sep 7, 2026 2 release files Full provenance
Aug 31, 2026 2 release files Full provenance
Aug 23, 2026 2 release files Full provenance
Aug 16, 2026 2 release files Full provenance
Aug 9, 2026 2 release files Full provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation




