Skip to main content
You can use Brain to find earlier decisions, save lessons, and give your agent context before it starts work. Below are some way to use Brain in your project. Install Brain and set up your repository first. Run these commands from the repository, and replace the example questions and rules with your own.

Get to Know a Project

If you are joining a project or returning after a break, you can ask Brain for an overview of its structure, tools, and conventions.

Get Context Before Starting a Task

Describe what you want to build or change. Brain gathers relevant facts, earlier work, code locations, and possible tests into a brief.
You can now use the brief to plan your work or give your coding agent a starting point.

Find Out Why a Decision Was Made

Search earlier work before reopening a decision or trying an approach your team has already explored.
This helps you read the supporting sources to understand the decision and whether it still applies.

Search for a Topic

If you are searching for a topic and know the keyword, you can use it with the command below:
And if you know the problem but not the exact words, you can search by meaning:
Without either flag, query combines keyword and meaning-based search. Make sure to use only one of these flags at a time.

Save a Rule for Future Work

You can also record a decision or lesson so another session can find it. It is advisable to only save rules that are true for your project.
The path flag groups the fact under a topic. This lets you save the fact without asking an agent to choose a category.

Look Up Saved Rules

Before changing behavior, you can check what your project has already recorded about it.
Use recall for saved facts and query for a broader search across facts, history, and docs.

Check What a Code Change Could Affect

With Entire Graph installed, inspect the impact of changing a function or type. Replace ValidateToken with a symbol from your code.
You can also inspect changes since the last index:

Check Whether Memory Is Current

You can see which sources are available, missing, or out of date, using:
Check whether saved facts still point to matching sources:
A fact entered by hand can show unverifiable-here because it has no source reference. Verification checks references, not whether a fact is correct.