The Problem
Every time you fire up an AI assistant, it’s like starting from scratch. Your preferences, project decisions, and context vanish as soon as the session ends. This fragmented memory leads to repetitive explanations and frustration. You want your AI to remember, but the default setups just don’t cut it.
What This Does
Enter SharedContext, a memory layer for AI agents that actually remembers stuff. Located in the src/ directory, it utilizes TypeScript for type safety and React for any UI components, although it looks like the UI part is still in the works. The main entry point is src/index.ts, which kicks everything off, while the src/mcp/server.ts handles the Model Context Protocol (MCP) server that the AI clients connect to.
Data is stored locally in an SQLite database, structured into three tables: facts, which holds your memory; pending_deletes, for anything you want to erase; and meta, tracking sync states. The background watcher syncs this data to Arweave for permanent storage, ensuring you can restore your context with a simple recovery phrase when switching machines.
Real-World Use
Imagine you’re working with Claude and Codex on a project. You have specific coding standards and architectural decisions that you want to persist. Instead of repeating yourself every session, you initialize SharedContext with src/cli/init.ts, which sets up the memory layer automatically. Anytime you want to recall your past discussions, you just call a function from the MCP, and boom—your context is back. You can even share specific conversations via encrypted links.
The Bottom Line
SharedContext is a solid start for anyone tired of their AI forgetting everything. It’s still in early development, so expect some rough edges; you won’t want to rely on it for mission-critical tasks just yet. If you frequently juggle multiple AI tools and want a unified memory, this is worth checking out. Just be prepared to do a bit of tinkering.