1. Create a brain

A brain is a Git repository containing your memory. Keep it separate from the Serenity source checkout and the folder you will ingest.

mkdir -p ~/my-brain
cd ~/my-brain
serenity init
serenity doctor

init creates the directory layout and serenity.yml, initializes Git, and saves an authentication token in your OS keychain. An unavailable keychain makes initialization fail; check the troubleshooting guide if you run headless.

2. Connect one folder

Edit the generated serenity.yml. Use an absolute path to a directory of notes outside the brain repository:

connectors:
  file:
    path: /absolute/path/to/notes

Start with a small folder whose contents you know. That makes it easier to verify your first results.

serenity sync
serenity search "project priorities"
serenity status

sync imports sources and rebuilds the search index. It runs once. Files must have been unchanged for at least two seconds to be ingested. Full-text search does not require an API key or a model.

4. Select the brain explicitly

serenity -C ~/my-brain search "project priorities"

5. Start your agent in the brain repository

With Codex CLI already installed, open it from the brain directory:

cd ~/my-brain
codex

Ask the agent to read this brain’s configuration and use the documented Serenity CLI to search its sources. Starting an agent in the folder does not by itself configure MCP or enable models. See agents and embedding for the available interfaces.

Next: answers with citations

Search finds source text. To extract claims and compose answers, configure models and run extraction as a separate step.

Configure models →
Ask about Serenity