TrueMemory

作者 buildingjoshbetter已验证

The memory your AI should have had from the start. Automatic capture, automatic recall, 100% local. One SQLite file, zero cloud. Works with Claude Code, Claude CLI, Cursor, Codex CLI, Gemini CLI.

373
Stars
47
Forks
Python
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/buildingjoshbetter/TrueMemory

快速入门

使用 TrueMemory 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

TrueMemory

Stars PyPI Installs  –  简体中文 Русский  –  arXiv Discord

LoCoMo LongMemEval BEAM-1M

Why · Quick Start · Compare · Tiers · Benchmarks · API · Docs · FAQ · Discord

TrueMemory terminal demo


Why TrueMemory

It finds signal in the noise. Your AI sees thousands of messages. TrueMemory figures out which ones actually matter and throws away the rest. No manual tagging, no prompt engineering. It just knows.

It gets sharper over time. It's not a static database. It's a living memory that grows with you. It resolves contradictions when you change your mind, updates stale facts, and consolidates what it knows. The longer you use it, the better it gets.

It works without you thinking about it. TrueMemory automatically captures memories from your conversations and automatically injects the right ones into your next session. You never have to store or search for anything manually. It just happens.

It's 100% local. One SQLite file on your machine. Your memories never leave your device. No cloud, no API keys needed. Your data is yours. (Anonymous usage telemetry is the only exception — never memory content — and one env var turns it off. Details.)

Without TrueMemory: "What framework are we using?" Asked for the 12th time this week. Your agent starts every session with amnesia. It doesn't know your name, your stack, or anything you told it yesterday.

With TrueMemory: Your agent already knows you use FastAPI, prefer Pydantic v2, and that your auth middleware lives in src/auth/. It remembers your corrections, your preferences, and your decisions. Across every session, forever.

Join the Discord to see what others are building with TrueMemory.


How TrueMemory Compares

SystemLoCoMoLongMemEvalLocal-firstAuto-captureLicense
TrueMemory Pro93.0%92.0%AGPL-3.0
TrueMemory Base92.0%84.1%AGPL-3.0
Mem061.4%PartialApache-2.0
Supermemory65.4%Cloud API
MemOS75.8%Apache-2.0
ReadAgent79.5%Research

All benchmarks independently reproducible. Scripts included in benchmarks/.


Quick Start

For Claude Code / Claude CLI / Cursor / Codex CLI / Gemini CLI

curl -LsSf https://raw.githubusercontent.com/buildingjoshbetter/TrueMemory/main/install.sh | sh

Installs everything in an isolated environment. Downloads ~1.5GB of AI models. No data leaves your machine. No sudo required.

New to the terminal? Click here for step-by-step instructions.
  1. Open a terminal: Mac: Cmd + Space, type Terminal. Linux: Ctrl + Alt + T. Windows: open PowerShell.
  2. Paste the command above and press Enter.
  3. Wait 3-5 minutes for models to download.
  4. Quit your AI tool completely and reopen it (Mac: Cmd+Q).
  5. Type "Set up TrueMemory" and pick a tier.

Windows (PowerShell):

irm https://raw.githubusercontent.com/buildingjoshbetter/TrueMemory/main/install.ps1 | iex

That's it. TrueMemory remembers your conversations automatically from here. Need help? Join our Discord.

If TrueMemory saves you time, a ⭐ helps other devs find it.

For developers (Python library)

pip install truememory
from truememory import Memory

m = Memory()
m.add("Prefers dark mode and TypeScript", user_id="alex")
print(m.search("preferences", user_id="alex"))

Tiers

Same architecture, three tiers. All included in a single install. Switch anytime by saying "switch to Pro" or "switch to Base."

EdgeBasePro
LoCoMo89.6%92.0%93.0%
LongMemEval92.0%
BEAM-1M76.6% (SOTA)
Embedding model8 MB lightweight600 MB high-accuracy600 MB high-accuracy
Reranker22M params149M params149M params
HyDE search✅ (requires LLM API key)
Runs onAny machine, CPU only4 GB+ RAM4 GB+ RAM + API key

Edge works everywhere. Base is the strongest fully-offline tier. Pro adds AI-powered query expansion for the highest scores.


Benchmarks

Benchmark Leaderboard

Tested across three major benchmarks with all systems sharing the same answer model (GPT-4.1-mini), judge (GPT-4o-mini, 3x majority vote), and scoring pipeline.

BenchmarkWhat it testsTrueMemory Pro
LoCoMo1,540 questions across 10 conversations93.0%
LongMemEval500 multi-session questions92.0%
BEAM-1M700 questions at 1M+ tokens76.6% (SOTA)
BEAM-10M200 questions at 10M tokens65.0%

Reproduce any result yourself

Every benchmark script is self-contained and runs on Modal.

All benchmarks use the same eval pipeline. Nothing is hidden. Full details: LoCoMo | LongMemEval | BEAM


Works With

Claude Code · Claude CLI · Cursor · Codex CLI · Gemini CLI · Claude Desktop

Lifecycle hooks capture conversations automatically. No manual work needed. Your memories stay local in a single SQLite file.


Python API

from truememory import Memory

m = Memory()

m.add("Prefers dark mode and TypeScript", user_id="alex")
m.add("Works at Anthropic as a senior engineer", user_id="alex")
m.add("Always sign commits with GPG", directive=True)  # directives auto-load every session

results = m.search("What are Alex's preferences?", user_id="alex")
results = m.search_deep("career history?", user_id="alex")  # multi-round, higher accuracy
MethodDescription
m.add(content, user_id)Store a memory (directive=True for standing instructions that auto-load at the start of every session)
m.search(query, user_id)Search (6-layer pipeline + reranker)
m.search_deep(query, user_id)Multi-round agentic search
m.get(id) / m.get_all(user_id)Retrieve memories
m.update(id, content) / m.delete(id)Modify or remove
m.stats()System statistics

Full API reference →


Docs

Getting StartedInstall to first memory
Python API ReferenceFull Memory class reference
MCP Tool ReferenceAll 11 MCP tools
CLI Referencetruememory-mcp and truememory-ingest
Environment VariablesAll TRUEMEMORY_* config options
Architecture Deep Dive6-layer retrieval pipeline, encoding gate
Tier Selection GuideEdge vs Base vs Pro
DebuggingLogs, traces, common issues

FAQ

Where is my data stored? Is anything sent to the cloud?

Everything lives locally in ~/.truememory/memories.db. Edge and Base tiers make zero external calls. Pro sends only your search query text to an LLM for query expansion. Your memories are never transmitted.

Do I need Python installed?

No. The installer uses uv to manage a sandboxed Python 3.12. Your system Python is never touched.

Why not just use a bigger context window?

Context windows are expensive, slow, and empty at the start of every session. TrueMemory gives instant recall for zero tokens of context, in under 200ms.

Does TrueMemory collect telemetry?

Anonymous usage telemetry (tool calls, session counts, platform info) is on by default. We never track memory content, queries, file paths, or API keys. Opt out: export TRUEMEMORY_TELEMETRY=off


Get Started in 60 Seconds

For Claude Code, Claude CLI, Cursor, Codex CLI, or Gemini CLI:

curl -LsSf https://raw.githubusercontent.com/buildingjoshbetter/TrueMemory/main/install.sh | sh

Using it as a Python library instead? pip install truememory

Questions? Join our Discord or open a Discussion. If TrueMemory saves you time, give us a ⭐


Thanks to Our Contributors


Research

TrueMemory is backed by a research paper (arXiv preprint) on retrieval-centered agent memory.

Storage Is Not Memory: A Retrieval-Centered Architecture for Agent Recall (arXiv 2605.04897)

@article{sauronlabs2026storage,
  title   = {Storage Is Not Memory: A Retrieval-Centered Architecture for Agent Recall},
  author  = {Sauron Labs},
  journal = {arXiv preprint arXiv:2605.04897},
  year    = {2026},
  url     = {https://arxiv.org/abs/2605.04897}
}

Community

If TrueMemory saves you time, give us a ⭐


Translations

Read this in: 简体中文 · हिन्दी · Español · Français · العربية · বাংলা · Português · Русский · 日本語 · 한국어 · Deutsch · Bahasa Indonesia · Tiếng Việt · Türkçe · Italiano · ไทย · Polski · Українська · Nederlands


License

AGPL-3.0. Free for personal and research use. Commercial use requires a separate license. Contact josh@sauronlabs.ai.


TrueMemory, a sauron company

常见问题

What is TrueMemory?

TrueMemory is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by buildingjoshbetter. The memory your AI should have had from the start. Automatic capture, automatic recall, 100% local. One SQLite file, zero cloud. Works with Claude Code, Claude CLI, Cursor, Codex CLI, Gemini CLI. It has 373 GitHub stars.

Is TrueMemory safe to use?

Yes. TrueMemory passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install TrueMemory?

Clone the repository with "git clone https://github.com/buildingjoshbetter/TrueMemory" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is TrueMemory written in?

TrueMemory is primarily written in Python. It is open-source under buildingjoshbetter on GitHub, so you can review or fork the full source.

Are there alternatives to TrueMemory?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh TrueMemory against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情