SHAHRIAR LABSIntelligence in Motion
    Back to Blog
    AI SkillsJune 11, 2026

    common-knowledge: Cross-Session Memory for AI Agents

    common-knowledge is a Git-backed knowledge store that keeps AI agents in context across sessions and projects — persistent, readable by any agent.

    common-knowledge is a Git-backed knowledge store that keeps AI coding agents in context across sessions and projects. Built by Shahriar Labs, it solves the persistent amnesia problem: every new agent session starts cold, forcing repeated context setup. common-knowledge makes that context persistent, searchable, and shareable across agents.

    The Agent Amnesia Problem

    Every time you start a new Claude Code, Cursor, or Cline session, the agent starts fresh. You re-explain your project's architecture, your code style preferences, the decisions you made last week and why. This context re-establishment overhead accumulates — 5–10 minutes per session, compounded across dozens of sessions.

    common-knowledge saves this knowledge once and retrieves it on demand. /ck save "prefer Zod over Yup for schema validation; faster and better TS integration" stores the decision. Next session: /ck load puts it back in context in seconds.

    Storage Format: Git + Markdown

    Knowledge is stored as Markdown files in a local Git repository at ~/.common-knowledge/. Every save is a commit. The format is intentionally simple — no database, no binary formats, no cloud dependency. Human-readable, grep-able, and readable by any AI agent as plain files without needing the skill installed.

    Supported operations: save (store a fact), load (retrieve context for current project), search (semantic search across stored knowledge), map (visualize knowledge graph), sync (push/pull to shared remote for team use), and link (connect related knowledge entries).

    Relationship to Agent Memory Architecture

    common-knowledge implements the "long-term memory" tier of the agent memory model described in our RAG and agent memory post. It's designed for the coding agent use case specifically: lightweight, Git-native, zero infrastructure. For production agent systems with high-volume memory requirements, pair it with a vector database (Qdrant, pgvector). For the full memory architecture, see our production agent guide.

    Frequently Asked Questions

    What is common-knowledge?
    A Git-backed knowledge store that keeps AI agents in context across sessions — saves and retrieves persistent knowledge as plain Markdown.
    How does it store data?
    Markdown + JSON files in a local Git repo. Every save is a git commit. Human-readable, offline, any agent can read.
    What should go in common-knowledge vs CLAUDE.md?
    CLAUDE.md: per-project instructions. common-knowledge: cross-project user/org knowledge, preferences, decisions.
    Compatible with all AI agents?
    Yes — plain Markdown files. Claude Code, Cursor, Cline, Copilot all can read them directly.

    Written by Shihab Shahriar Antor — AI Engineer & Founder of Shahriar Labs. Building LetX, QuantumSketch, and open-source AI agent skills.