Agent Memory and Context Tools
Tools that provide persistent memory, knowledge graphs, and context management for AI coding agents across sessions.
Parent: Agentic Development Tools
These solve context death — the problem of agents losing all knowledge when a session ends or context compacts. They are complementary to Session Orchestration Tools, not replacements.
Engram
| Repo | github.com/Gentleman-Programming/engram |
| Language | Go (1.25+), pure-Go SQLite (no CGO) |
| Interfaces | MCP stdio server (13 tools), HTTP REST API (port 7437), CLI, Bubbletea TUI |
| Storage | SQLite + FTS5 full-text search, single ~/.engram/engram.db |
| Maturity | 118 commits, ~1 month old, MIT license, 3+ contributors, Homebrew tap |
Core concept
Agents call mem_save via MCP to store structured observations. Next session, mem_context or mem_search retrieves relevant past work. Topic keys support upserts for evolving decisions.
Notable features
- 13 MCP tools for memory CRUD (save, search, update, delete, context, timeline)
- TUI (Bubbletea + Lipgloss, Catppuccin Mocha): dashboard, search, timeline, sessions — read-only browser
- Deduplication within rolling time window
- Privacy:
<private>tag stripping at two layers - Git sync: export as gzipped JSONL chunks, import on another machine
- Agent plugins for Claude Code (hooks + MCP + skill) and OpenCode
- Setup wizard for 6+ agents (Claude Code, Gemini CLI, Codex, VS Code, Cursor, Windsurf)
- Compaction survival: system prompt injection ensures agents recover memory after context reset
Relevance
Go-native, same stack as ws. The Bubbletea TUI is a good reference for how to build a read-only memory browser. Could integrate with ws-managed sessions — each Claude Code instance gets engram as an MCP server.
OpenViking
| Repo | github.com/volcengine/OpenViking |
| Language | Python (core) + Rust (CLI with ratatui TUI) + C++ (vector index) + Go (AGFS filesystem) |
| Origin | ByteDance/Volcengine (corporate-backed) |
| Storage | Virtual filesystem (viking:// URIs) + C++ vector index for embeddings |
| Maturity | 389 commits, ~10 contributors, alpha, GitHub trending |
Core concept
A structured context database organized as a virtual filesystem. Documents, memories, skills live under viking:// paths. Hierarchical semantic search (not flat vector search) — intent analysis followed by directory-level drill-down.
Notable features
- Tiered context loading (L0 abstract / L1 overview / L2 full detail) — controls token spend
- Session memory extraction: conversations are compressed, key memories auto-extracted to the filesystem
- ratatui TUI (Rust): two-panel file explorer for
viking://URIs — useful reference for Rust TUI patterns - Document parsing: PDF, Markdown, HTML, DOCX, PPTX, XLSX, EPUB, source code (tree-sitter)
- Semantic retrieval: hybrid BM25 + embedding search with reranking
- VikingBot: multi-channel chatbot framework (Telegram, Slack, WeChat, etc.)
- AGFS: Go-based agent filesystem with MCP exposure
- tmux skill: teaches bot to remote-control tmux sessions (demo-level, not a management system)
Relevance
The tiered context loading (L0/L1/L2) is particularly interesting for the limited-tokens home setup. Corporate backing (ByteDance) suggests longer-term sustainability than single-dev projects. The ratatui TUI code in the Rust CLI is a good reference for building Rust terminal UIs.
ClawVault
| Repo | clawvault on npm |
| Language | TypeScript (Node.js) + Python SDK |
| Storage | Obsidian-compatible markdown files in a local vault |
| Search | Hybrid BM25 + semantic embeddings + cross-encoder reranking |
| Maturity | 680 commits, v3.5.0, 6 contributors, ~6 weeks old |
Core concept
Stores memories as Obsidian-compatible markdown in folders: decisions/, lessons/, people/, projects/, tasks/, handoffs/. Builds a knowledge graph from wiki-links, tags, and frontmatter.
Notable features
- Obsidian-native: memories are markdown files you can browse in Obsidian
- Knowledge graph: web dashboard with force-graph visualization (port 3377)
- Session lifecycle:
wake/sleep/checkpoint/recoverfor crash resilience - Observer pipeline: watches session transcripts, compresses via LLM, routes to vault categories
- Fact extraction: structured facts with conflict resolution
- Tailscale sync: vault sync across machines via WebDAV
Relevance
The Obsidian-native approach is interesting given you already use Obsidian for PKM (~/code/pkm). Agent memories could live alongside your existing notes. The Tailscale sync could bridge the work/home dual setup.
Comparison
| Engram | OpenViking | ClawVault | |
|---|---|---|---|
| Language | Go | Python+Rust+C+++Go | TypeScript |
| Storage | SQLite + FTS5 | Virtual FS + vector index | Obsidian markdown |
| Search | Full-text (FTS5) | Hierarchical semantic | Hybrid BM25+semantic |
| MCP server | Yes (13 tools) | Yes (via AGFS) | No (CLI only) |
| TUI | Bubbletea (read-only) | ratatui (file explorer) | None |
| Token efficiency | Dedup, privacy stripping | Tiered L0/L1/L2 loading | Context profiles |
| Cross-machine sync | Git export/import | None built-in | Tailscale + WebDAV |
| Backing | Community (3 devs) | ByteDance | Community (6 devs) |
| Obsidian compatible | No | No | Yes (native) |