> ## Documentation Index
> Fetch the complete documentation index at: https://docs.entire.com/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.

## About entire-brain

entire-brain is a memory layer for your Git repository. It brings together saved agent sessions, checkpoints, project memories, documentation, and code context from [entire-graph](https://docs.entire.com/guides/graph/overview.md).

entire-graph maps how your code connects while entire-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.

[Entire Brain: Give Your Repository a Shared Memory](https://www.youtube.com/embed/c3ZCSBMD9wM)

## Context for Your Next Task

Brain gives a new agent session access to your project's recorded decisions,
rules, and lessons. Use that context when you return to a task or switch agents.

For example, ask Brain for earlier decisions about retries before changing how
failed requests are retried. Your agent can check those decisions before editing
the code.

## Use Brain in Your Project

* 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 memories, history, and documentation, including PDF, Word, Excel, and PowerPoint files under `docs/`.
* Record a project rule or decision for future sessions, or a global memory that applies in every repository.
* Browse what entire-brain knows in a local UI.
* Sync memories with your hosted Entire repository when you choose to connect it.

## Before You Start

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

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

### Install entire-brain

Install the released plugin:

```bash theme={null}
entire plugin install brain
entire brain version
```

The CLI verifies the release checksum and offers to install missing dependencies,
including [entire-graph](https://docs.entire.com/guides/graph/overview.md). Use `--yes` for an unattended
installation. Use `--no-deps` only when you manage dependencies separately.
See the [plugin reference](https://docs.entire.com/cli-reference/plugin.md#install-a-plugin) for installation options.

On macOS and Linux, you can also install the Brain binary with the script:

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

The script verifies the download and registers Brain with the installed Entire CLI.
It does not install Graph. If Graph is missing, install it separately:

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

Brain v0.5.1 works with Graph v0.5.0 and v0.6.0. Graph v0.4.0 does not support
the interface Brain needs to read its code index. Without Graph, sessions, docs,
and memory searches still work, but setup reports the code index as unavailable.

> [!NOTE]
>
> Read [Upgrade and Recover](https://docs.entire.com/guides/brain/upgrade.md) before updating an existing
> installation. Local migration is one-way. v0.5.1 removes verified
> legacy copies automatically; no migration or cleanup command is required.

Use Entire CLI 0.11.6 or later for hosted connection support. For Claude capture,
use [Claude Code 2.1.78 or later](https://docs.entire.com/agents/claude-code.md#version-and-capture-verification)
and verify capture after installing the hooks.

### Set Up Your Repository

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

From your project's root, run:

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

Setup builds the repository's memory, installs a background watcher to keep it current, and adds the instructions that tell your coding agent how to use entire-brain. Status shows what is ready and what needs attention.

Setup prints a short summary. Add `--verbose` to see the full report for each phase.

> [!NOTE]
>
> Setup asks before it extracts memories from past sessions, and the default answer is no. Memory extraction uses an available coding agent, can send session content to its model provider, and can add token charges. When setup runs without a terminal, for example in a script, it skips extraction unless you pass `--yes`.
>
> Setup remembers what you decline, so rerunning it does not ask again. To turn a declined step back on, pass `--backfill` for memory extraction, `--daemon` for the background watcher, or `--agent-hooks` for Claude Code hooks.
>
> To skip memory extraction and the background watcher entirely, use `entire brain setup --no-backfill --no-daemon`.

#### Agent Instructions

Setup regenerates `.entire/agent-guide.md` completely. Manual edits to that file
are lost. In `AGENTS.md` and `CLAUDE.md`, setup updates the managed reference
blocks and preserves your surrounding text.

| Flag | What it does |
| - | - |
| `--strict` | Saves strict guidance that makes using entire-brain's tools mandatory for your agent. |
| `--normal` | Resets the guide to normal guidance. |
| `--no-agent-hooks` | Writes the guide but does not add the entire-brain hook to Claude Code's settings. |
| `--agent-hooks` | Adds the Claude Code hook, even if an earlier run declined it. |

To preview the instructions without changing any files, run `entire brain agent-guide`.

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

The guide includes instructions for each product you have set up. The default setup includes both products, so also run `entire graph setup` to add the entire-graph instructions. You can run the two setups in either order.

#### Use Brain from Your Agent

Agents use the CLI commands in `.entire/agent-guide.md`. Restart the agent after
setup so it loads the updated instructions. For a new task, start with a brief:

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

Use `entire brain recall` for recorded decisions and `entire graph` to inspect
current code. Brain v0.5.1 does not provide the `entire brain mcp` command or its
previously documented HTTP listener. Use the CLI integration for this release.

## How to Use entire-brain

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

<video autoPlay loop muted playsInline poster="/images/videos/cli-brain-agent.jpg">
  <source src="https://mintcdn.com/entire/yKSEaBtqgPAkqkkW/images/videos/cli-brain-agent.mp4?fit=max&auto=format&n=yKSEaBtqgPAkqkkW&q=85&s=b07628126f1ecc2e5e9cc184dd2867f2" type="video/mp4" />
</video>

A coding agent using entire-brain memories while it works.

> [tab] CLI
>
> 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 recall "why did we choose this retry policy"
> ```
>
> Save a memory, 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
> ```
>
> If something needs attention, `entire brain doctor` reports the problem and the command that fixes it.
>
> See the [command reference](https://github.com/entireio/entire-brain/blob/main/docs/reference.md) for more options. To list every command, including developer commands hidden from the default help, run `entire brain --help-all`.

> [tab] UI
>
> Open entire-brain's local browser view from your repository:
>
> ```bash theme={null}
> entire brain viz
> ```
>
> Explore the graph to see code relationships, saved memories, sessions, history, and docs. This view runs on your machine and is read-only.
>
> [Explore entire-brain in the UI](https://customer-0x5hsk8lh27fm00g.cloudflarestream.com/988f4fb499040d1c5b3cc2417046e720/iframe)
>
> If you prefer to stay in your terminal, open the dashboard:
>
> ```bash theme={null}
> entire brain dash
> ```
>
> ![entire-brain terminal dashboard showing memory sources, session counts, saved memories, and working tree status.](https://mintcdn.com/entire/C8ICUvcRVo-DnEOP/images/brain-terminal-dashboard.png?fit=max\&auto=format\&n=C8ICUvcRVo-DnEOP\&q=85\&s=2c6b1fb2747bc2b01c577e7de66ac168)
>
> Use it to browse status, memories, sessions, history, and code records. Both views let you explore existing memory without making model calls.

> [tab] Agent Prompt
>
> To have your agent set up entire-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 --no-backfill` to build the project's memory
> and add the agent instructions. Preserve my existing instructions
> outside the managed blocks in AGENTS.md and CLAUDE.md.
> Ask me before running a memory backfill, because it uses a coding
> agent and can incur token charges.
>
> 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 entire-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.
> ```

## Pause Background Work

The background watcher and the session-end hook keep memory current and can call a coding agent to extract memories. To pause all background entire-brain work on your machine, run:

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

Work already in progress finishes first. Captured sessions are not lost; entire-brain picks them up when you resume:

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

To remove the watcher instead, run `entire brain setup --uninstall-daemon`.

## Sync Memories with Entire

<video autoPlay loop muted playsInline poster="/images/videos/trail-memories.jpg">
  <source src="https://mintcdn.com/entire/yKSEaBtqgPAkqkkW/images/videos/trail-memories.mp4?fit=max&auto=format&n=yKSEaBtqgPAkqkkW&q=85&s=2b93a6dae96fac00c9b92f03cda901fe" type="video/mp4" />
</video>

Memories shown on a Trail in entire.com.

Memories stay on your machine by default. A repository starts syncing only when you connect it to its hosted Entire repository:

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

`connect` records the hosted repository and attempts a sync immediately.
After connection, Brain can sync when memory extraction finishes, when you commit
or push, and during background maintenance. You do not need to run a sync command
after each change.

To stop syncing, run:

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

You can also sync on demand with `entire brain memories sync`. Without a connection,
a plain sync fails and tells you to run `connect`. Scripts can also provide an
explicit hosted target.

See [Storage and Sync](https://docs.entire.com/guides/brain/storage-and-sync.md) for memory scope, explicit
targets, network controls, and background writer behavior.
