athena-diary
Provides a SQLite-backed off-context diary for Letta agents with MCP tools for journaling and retrieval, keeping core memory uncluttered. Supports embedding summaries and FTS fallback for semantic search.
README
Athena Diary
SanctumOS
Off-context diary for Letta (and other MCP) agents: a SQLite journal plus MCP tools so the urge to remember does not stuff narrative into core memory.
Name: Athena Diary is named after Athena, Sanctum’s first long-running agent (user #1 of this pattern)—not because the product is Athena-only. Any Letta agent (or MCP client) can run its own diary instance.
What this is
Agents over-journal into core memory blocks. On a large context window that burns budget and crowds out short-term recall. The impulse to write is good; core is the wrong surface.
Athena Diary gives the agent a rest bucket outside the context window:
- Write freely — volume belongs in the diary, not in core.
- Retrieve on demand — search returns pointers (ids + summaries); load full bodies only when needed.
- Embed summaries — vector search over gists (
sqlite-vecwhen available), with FTS on body/summary so a bad summary cannot hide an entry. - Sleeptime clerk — tags, lesson-family, templated summaries, and re-embeds run on turn-based sleeptime passes (not a wall-clock “night”).
- Sensitive material stays out — intimate / medical / human-gated content belongs in Broca (or your equivalent) human blocks, not the diary. Privacy in v1 is instructional (same discipline as human-block practice), not ACL theater.
Same architectural shape as origin_conversation: SQLite source of truth + MCP wrapper.
Full product story: docs/OVERVIEW.md.
Tools (MCP)
| Tool | Role |
|---|---|
diary_write |
Append an entry (body required; optional summary / metadata) |
diary_get |
Fetch one entry by id (full body) |
diary_search |
Keyword / semantic search over summaries (pointers, not bodies) |
diary_sleeptime_pass |
Clerk batch: tag, summarize, link near-dupes, re-embed |
Full API: docs/TOOL_REFERENCE.md.
Quick start
git clone https://github.com/sanctumos/athena-diary.git
cd athena-diary
python3 -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e '.[mcp,dev]'
# Optional vector extension:
# pip install -e '.[vec]'
cp .env.example .env # set DIARY_DB / embed mode as needed
athena-diary-mcp --version
athena-diary-mcp --describe
athena-diary-mcp health
# MCP stdio (what Letta / Cursor usually spawn):
athena-diary-mcp serve
Wire the server into your MCP client: docs/MCP_CLIENTS.md (ChatGPT, Claude Code, Cursor, Letta, others).
Legacy Letta / Sanctum bootstrap: docs/LETTA_BOOTSTRAP.md.
Step-by-step install: docs/GETTING_STARTED.md.
Documentation
| Doc | Description |
|---|---|
| docs/README.md | Documentation index |
| docs/OVERVIEW.md | Purpose, naming, architecture, what belongs where |
| docs/GETTING_STARTED.md | Install, first entry, attach to an agent |
| docs/LETTA_BOOTSTRAP.md | Bootstrapping onto a legacy Letta hot + sleeptime instance |
| docs/MCP_CLIENTS.md | ChatGPT, Claude Code / Desktop, Cursor, Letta, other MCP hosts |
| docs/TOOL_REFERENCE.md | Full MCP tool contracts and examples |
| docs/CONFIGURATION.md | Env vars, embed modes, DB path, transports |
| docs/AGENTS.md | Short summary for agent / AI readers |
| docs/COVERAGE.md | ≥90% coverage gate for contributors |
Design principles (v1)
- Diary first, core ruthlessly thin — never paste diary bodies into core; core may hold skinny pointers (e.g. lesson-family → search).
- No write gates — clerk cost is controlled by batched sleeptime, not by blocking capture.
- Summaries for vectors; FTS for safety — search remains useful even when summaries drift.
- One mixed diary store — per-human vaults and dual “discreet” DBs are deferred (leak / ops risk).
- Complements Letta archival — experiential / first-person noticing → diary; reference facts may still use archival.
Out of scope for v1: multi-tenant vaults, soft ACL over intimate text, auto-promotion into core, replacing archival entirely.
License
- Source code: GNU Affero General Public License v3.0 (AGPL-3.0)
- Documentation and non-code: Creative Commons Attribution-ShareAlike 4.0 International (CC-BY-SA 4.0)
See NOTICE and LICENSES/README.md.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。