A pattern for personal AI memory that follows you across tools, learns from how you work, and stays under your control.
AlterEgo is a specification, not an implementation. It describes a pattern for a local, cross-vendor memory layer that captures events from AI tools (opencode, Claude Code, Cursor, Gemini, Codex, and others), distills them into typed, time-aware memories, and injects compact context back into new sessions.
Read the full spec: SPEC.md — also available as Gist for easy sharing.
- Your AI tools forget you between sessions.
- Vendor memory is opaque, server-side, and locked to one vendor.
- Manual context files (
CLAUDE.md,AGENTS.md) go stale. - No one is building a cross-tool, observation-based, user-owned memory layer.
This document defines what that layer would look like.
- SPEC.md — the full specification (also available as Gist)
- ADAPTERS.md — per-platform implementation reference (18 AI tools)
- MEMORY-TYPES.md — the eight base memory types, expanded
- CONSTITUTION-TEMPLATE.md — template for
~/.alterego/schema/manifest.md
- examples/f0-extractor/ — runnable deterministic-first
reference implementation in Python 3 (stdlib only). Reads canonical events JSONL,
produces a
me.mdprofile. Ships with 93 synthetic events and a sample output.
Phase 0: specification. No code yet. The document is intended to be shared with an LLM agent and instantiated against your specific tools and domain.
If you build an implementation, an adapter, or a fork — open an issue (use the Adapter Proposal template) or PR linking to it. The pattern grows by accumulation.
- Karpathy's LLM Wiki — observational knowledge maintained by an LLM
- Spacebot — typed memory graph + cortex pattern
- OpenClaw — local-first personal AI assistant
- graphify — cross-platform install model
- Andy Matuschak's evergreen notes — atomic, densely linked, permanent
CC0 1.0 Universal. Copy, fork, modify, redistribute without attribution.