> ## Documentation Index
> Fetch the complete documentation index at: https://docs.entire.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Give your coding agents shared memory of your project, past decisions, and lessons learned.

## What Is Brain?

Entire Brain is a memory layer for your Git repository. It brings together saved agent sessions, checkpoints, project facts, documentation, and code structure from [Entire Graph](/guides/graph/overview).

Graph maps how your code connects while Brain adds the context behind it: why a decision was made, what was tried before, and what your team learned.

That memory belongs to the project and different coding agents can use it. For example,you can move from Claude Code to Codex and give the next agent context from earlier work.

## How Does It Help?

Brain is great for team collaboration and individual work when you are context switching across tasks and agents. It helps you spend less time explaining your project and repeating earlier research. A new agent session can start with the decisions, rules, and lessons that has already been recorded.

For example, before changing how failed requests are retried, you can ask Brain for earlier decisions about retries. Your agent can use that context to understand the current approach before editing the code.

## What Can You Do with Brain?

* Understand a project to get an overview of its structure and how it works.
* Prepare for a task and find relevant decisions, code locations, and possible tests.
* Find earlier work by searching through saved facts, history, and documentation.
* Record a project rule or decision for future sessions.
* Use memory to browse what Brain knows in a local UI.

## Before You Start

Use a local Git repository with at least one commit. Install the [Entire CLI](/installation) and Git 2.36 or later.

To give Brain access to future agent sessions, [enable Entire in your repository](/quickstart). Brain can also work from code, docs, and Git history when no saved sessions are available and make sure to commit your intended changes before setup.

### Install Brain

Run this once on your machine:

```bash theme={null}
curl -fsSL https://raw.githubusercontent.com/entireio/entire-brain/main/scripts/get-brain.sh | bash
```

The installer downloads a prebuilt binary, checks its checksum, and registers the `entire brain` command.

Install Graph for code analysis:

```bash theme={null}
entire plugin install graph
```

Without Graph, Brain can still use sessions, docs, and facts, but its code index is unavailable.

### Set Up Your Repository

Open the project repository where you want to use Brain. If you installed Brain from source, switch from the `entire-brain` source directory to your project first.

From your project's root, build its memory:

```bash theme={null}
entire brain setup
entire brain status
```

Setup builds the repository's memory. Status shows what is ready and what needs attention.

<Note>
  By default, setup also extracts facts from past sessions and installs a background
  watcher on supported macOS and Linux systems. Fact extraction uses an available
  coding agent, can send session content to its model provider, and can incur token
  charges. The watcher can continue extracting facts over time.

  To skip the initial fact extraction and watcher installation, use
  `entire brain setup --no-backfill --no-daemon` instead.
</Note>

Next, add the instructions that tell your coding agent how to use Brain:

```bash theme={null}
entire brain init-agents
```

This creates or updates `.entire/agent-guide.md` and adds references to it in `AGENTS.md` and `CLAUDE.md`. Text outside the managed blocks is preserved. Rerunning the command replaces the generated guide.

Review and commit these three files to share the instructions with your team. Restart your agent or reload its repository instructions so it picks up the guide.

When Graph is installed, the guide tells your agent to use Brain for earlier decisions and Graph to find and inspect code.

#### Connect an MCP Client

If your agent uses MCP, print the configuration from your project repository:

```bash theme={null}
entire brain mcp --print-config
```

Add that configuration to your MCP client. For Claude Code, you can register Brain with:

```bash theme={null}
claude mcp add entire-brain -- entire brain mcp
```

## How to Use Brain

Use Brain from the CLI or UI after setup, or use the agent prompt to have your agent set it up for you.

<Tabs>
  <Tab title="CLI" icon="terminal">
    Run these commands from your repository.

    Get a project overview:

    ```bash theme={null}
    entire brain overview
    ```

    Get context for a task:

    ```bash theme={null}
    entire brain brief "update the retry policy"
    ```

    Search earlier decisions:

    ```bash theme={null}
    entire brain query "why did we choose this retry policy"
    ```

    Save a fact, then find it again. Replace the example with a rule that is true for your project:

    ```bash theme={null}
    entire brain remember "Retry failed requests at most three times." --path constraints.retry.policy
    entire brain recall "retry policy"
    ```

    Check whether memory is current:

    ```bash theme={null}
    entire brain status
    ```

    See the [command reference](https://github.com/entireio/entire-brain/blob/main/docs/reference.md) for more options.
  </Tab>

  <Tab title="UI" icon="browser">
    Open Brain's local browser view from your repository:

    ```bash theme={null}
    entire brain viz
    ```

    Explore the graph to see code relationships, saved facts, sessions, history, and docs. This view runs on your machine and is read-only.

    <div style={{ position: "relative", paddingTop: "56.25%" }}>
      <iframe
        src="https://customer-0x5hsk8lh27fm00g.cloudflarestream.com/988f4fb499040d1c5b3cc2417046e720/iframe"
        title="Explore Brain in the UI"
        loading="lazy"
        style={{
      border: "none",
      position: "absolute",
      top: 0,
      left: 0,
      height: "100%",
      width: "100%",
    }}
        allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;"
        allowFullScreen
      />
    </div>

    If you prefer to stay in your terminal, open the dashboard:

    ```bash theme={null}
    entire brain dash
    ```

    <img src="https://mintcdn.com/entire/C8ICUvcRVo-DnEOP/images/brain-terminal-dashboard.png?fit=max&auto=format&n=C8ICUvcRVo-DnEOP&q=85&s=2c6b1fb2747bc2b01c577e7de66ac168" alt="Brain terminal dashboard showing memory sources, session counts, saved facts, and working tree status." width="1722" height="964" data-path="images/brain-terminal-dashboard.png" />

    Use it to browse status, facts, sessions, history, and code records. Both views let you explore existing memory without making model calls.
  </Tab>

  <Tab title="Agent Prompt" icon="robot">
    To have your agent set up Brain for you, open it in your repository and send this prompt:

    ```text theme={null}
    Set up Entire Brain in this repository and start using it for our work.

    Check that the Entire CLI, Git 2.36 or later, and Entire Graph are
    installed. Install any missing tools using the official instructions
    at https://github.com/entireio/entire-brain#install.

    Make sure this is a Git repository with at least one commit. If there
    are uncommitted changes that block setup, tell me what needs attention.

    Run `entire brain setup` to build the project's memory, then run
    `entire brain init-agents` to add the agent instructions. Preserve my
    existing instructions outside the managed blocks.

    Run `entire brain status --verbose` and explain anything missing or
    out of date. Read `.entire/agent-guide.md`, then run
    `entire brain overview` and summarize what Brain knows about this project.

    For my next task, use `entire brain brief` to gather relevant context
    before making changes. Check the supporting sources and use Entire
    Graph to find and inspect the code.
    ```
  </Tab>
</Tabs>
