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

Repogithub.com/Gentleman-Programming/engram
LanguageGo (1.25+), pure-Go SQLite (no CGO)
InterfacesMCP stdio server (13 tools), HTTP REST API (port 7437), CLI, Bubbletea TUI
StorageSQLite + FTS5 full-text search, single ~/.engram/engram.db
Maturity118 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

Repogithub.com/volcengine/OpenViking
LanguagePython (core) + Rust (CLI with ratatui TUI) + C++ (vector index) + Go (AGFS filesystem)
OriginByteDance/Volcengine (corporate-backed)
StorageVirtual filesystem (viking:// URIs) + C++ vector index for embeddings
Maturity389 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

Repoclawvault on npm
LanguageTypeScript (Node.js) + Python SDK
StorageObsidian-compatible markdown files in a local vault
SearchHybrid BM25 + semantic embeddings + cross-encoder reranking
Maturity680 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/recover for 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

EngramOpenVikingClawVault
LanguageGoPython+Rust+C+++GoTypeScript
StorageSQLite + FTS5Virtual FS + vector indexObsidian markdown
SearchFull-text (FTS5)Hierarchical semanticHybrid BM25+semantic
MCP serverYes (13 tools)Yes (via AGFS)No (CLI only)
TUIBubbletea (read-only)ratatui (file explorer)None
Token efficiencyDedup, privacy strippingTiered L0/L1/L2 loadingContext profiles
Cross-machine syncGit export/importNone built-inTailscale + WebDAV
BackingCommunity (3 devs)ByteDanceCommunity (6 devs)
Obsidian compatibleNoNoYes (native)