Skip to main content
Glama

Berry Brain

Shared, private memory for AI agents. Use it with Codex, Claude Code, or another client that supports MCP, the Model Context Protocol.

The brain saves task state and checked results. Agents can use this memory to resume work and test lessons from past tasks. Each new installation starts empty.

How it works

flowchart LR
    Codex <--> Brain[Brain tools]
    Claude[Claude Code] <--> Brain
    Other[Other MCP clients] <--> Brain
    Brain <--> Data[(Private database)]
  1. An agent reads saved state and finds lessons that match the task.

  2. It checks current facts and does the work.

  3. It saves the result and its evidence.

  4. It can propose a lesson and test it on later tasks.

A lesson needs helpful results from two new tasks before normal recall can return it. Each test must have distinct evidence. Harmful feedback stops reuse.

Memory changes the context given to the model. It does not train the model or ensure better answers. Saved text is evidence. It cannot grant permission or replace instructions.

Related MCP server: NotNessie MCP Server

Set it up

You need Python 3.11 or later with SQLite FTS5 support. Install your AI clients first. The Codex command must be on your PATH.

Download or clone this repository. Open a terminal in its directory.

On Linux or macOS:

python3 -m venv .venv
.venv/bin/python -m pip install .
.venv/bin/berry-brain-configure codex --local
.venv/bin/berry-brain-configure claude --local

Run the setup command for each client you use. For Windows commands, see Setup and data.

Reopen the client sessions. Ask an agent to recall a task, then save a checked result. Both clients use the same local database.

Setup adds the brain tools and a short reminder to the client's global instructions. It does not need a separate brain account, model key, or server.

Keep .venv at this path. After an update, run the install and setup commands again. Saved data stays outside the source directory.

Read more

Guide

What it covers

Setup and data

Client setup, data paths, privacy, backup, and faults

Learning and skills

Recall, evidence, lesson tests, and skill updates

Development

Source files, tests, host access, and upgrades

Local mode makes no network requests. The AI client can send recalled text to its model provider. Keep private data and credentials out of Git.

Released under the MIT license.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides persistent cross-session memory for Claude Code, enabling it to remember user preferences, decisions, and project context across new sessions.
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables Claude Code to persist and retrieve project memory across sessions, including decisions, constraints, verified commands, and context packs, via nine MCP tools.
    2
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to capture, store, and retrieve durable learnings from projects via MCP tools, providing a queryable memory of product and technical lessons across repos.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables multiple MCP-compatible AI clients to share persistent, versioned project knowledge across sessions with conflict-safe updates, provenance, hybrid retrieval, stale-memory handling, and context-budgeted recall.
    MIT