Skip to main content

memory for AI agents

A second brain your agents can read too

Your notes stay in Markdown, in a git repository you own. AI agents read and write them over MCP, and everything they do becomes a commit you can undo with one command.

npm i -g cabecao

Node.js 22.16+ · git 2.38+ · MIT license · version 1.0.0

what it is

Markdown and git underneath, MCP on top

  • Your Markdown and git

    Notes are .md files in a regular folder. You read and edit them in Obsidian or any editor. There is no database that only Cabeção understands.

  • Any provider

    GitHub, GitLab, Bitbucket, Gitea, your own server or just your machine. Cabeção uses the git and the credentials you already have; it does not depend on any provider's API.

  • Agents over MCP

    A local MCP server gives agents search, a graph, facts with time validity and tools to save memories, with rules they cannot get around.

  • Everything is reversible

    Every write is an identified commit. cabecao undo reverts one operation or an agent's whole session, without rewriting history.

in practice

From init to the next session

  1. Create the brain

    One command, no questions: it creates the structure in the empty repository, builds the local index and registers the MCP server in the AI clients it finds. The CLI prints its messages in Portuguese for now.

    $ cabecao init git@github.com:voce/cerebro.git --machine notebook
    Pronto. Seu cérebro está em ~/cabecao (máquina notebook) e em git@github.com:voce/cerebro.git.

    Repositório vazio: estrutura do cérebro criada na branch main e enviada para git@github.com:voce/cerebro.git.
    Índice local: 0 notas indexadas em 2 ms.

    Agentes:
    Codex servidor MCP registrado em ~/.codex/config.toml
    Cursor servidor MCP registrado em ~/.cursor/mcp.json
    Reinicie os agentes que estiverem abertos para eles enxergarem o Cabeção.
  2. The agent remembers

    In a Claude Code session, you ask it to "remember that the payment tests only pass with TZ=UTC". The agent calls the remember tool, and the answer is a new note and a commit.

    remember
    {
    "op": "01M79DRQR9648E1JZ60MF0EBNN",
    "path": "memory/gotchas/testes-de-pagamento-precisam-do-fuso-fixo.md",
    "action": "add",
    "commit": "1af64e1dc48f5627dd086474c571b22326eaa3c0"
    }
  3. It comes back when needed

    In the next session, on any machine, the note comes back in the agent's recall. And from the terminal too, in search.

    $ cabecao search "testes pagamento"
    1 resultado(s) para "testes pagamento", com todos os termos (validade em 2026-11-13):

    1. Testes de pagamento precisam do fuso fixo [gotcha · project:pagamentos] vigente
    memory/gotchas/testes-de-pagamento-precisam-do-fuso-fixo.md
    Os «testes» do serviço de pagamentos falham perto da meia-noite se o fuso não for fixo. Rode com `TZ=UTC npm test`.

how it works

Files, git and an MCP server on your machine

Notes live in a regular folder, versioned with git. Agents read and write through an MCP server that runs on your machine, and every write becomes a commit. Sync takes everything to your repository and from there to your other machines.

Obsidian or an editorreads and edits the .mdClaude CodeCodexCursorand other MCP clientsNotes in Markdownmemories, notes, rulesLocal MCP servercabecao mcp · stdioLocal indexsearch, graph and factsYour private repositoryGitHub, GitLab, Gitea…~/cabecaothe same brain// you// AI agents// this machine · ~/cabecao// git remote// another machineMCPsyncsyncgit: one commit per writeObsidian or an editorreads and edits the .mdClaude CodeCodexCursorand other MCP clientsLocal MCP servercabecao mcp · stdioNotes in Markdownmemories, notes, rulesLocal indexsearch, graph and factsYour private repositoryGitHub, GitLab, Gitea…~/cabecaothe same brain// you// AI agents// this machine · ~/cabecao// git remote// another machineMCPsyncsyncgit: one commit per write

who it is for

For people who work with AI agents

For people who work with AI agents (Claude Code, Codex, Cursor and others) and are tired of repeating the same preferences, decisions and gotchas in every new session. What you teach in one conversation is saved and comes back in the next one, in any client and on any machine.

Clients that init registers

  • Claude Code
  • Claude Desktop
  • Codex
  • Cursor
  • VS Code
  • Antigravity
  • Gemini CLI

get started

In three commands