Connect your agent
This page says what rb installs for each coding agent, how to add it later, and what stays yours whichever agent writes.
rb init, run in your own terminal, installs rb’s instructions for each agent it finds in the repository. It makes the files that are not there, and says what it wrote. A file that was there before, an AGENTS.md, a .mcp.json or an agent’s hook file, changes only once you agree: rb asks once, shows exactly what it would add, and anything but y or yes keeps the file as it is. --yes answers up front, for a script. Where rb cannot ask, it leaves the file as it is and names the command that adds its part.
rb init --dry-run lists every file rb init would write, and writes nothing. rb with Claude Code, Codex and Cursor shows both with real output.
When it finds .claude/, CLAUDE.md or a Claude Code session, rb init installs three things:
- the skill, in
.claude/skills/rabbit-brain/SKILL.md; - rb’s MCP server, as one entry in
.mcp.json; - rb’s session hook,
SessionStartandStopin.claude/settings.json.
To add them later, or to a repository rb did not set up, run what rb init names:
rb skill add --claude --projectclaude mcp add --scope project rabbit-brain -- rb mcprb skill add with no flag installs the skill once for all your projects, in ~/.claude/skills/rabbit-brain/. A session that is already running loads no skill or MCP server added during it: start a new session after you install.
Codex reads AGENTS.md. rb adds a marked section at its end, between two marker lines, when the file exists or Codex runs rb init:
rb skill add --agents-mdIn your own terminal it asks once before it changes an AGENTS.md that is there. --yes adds the section without asking. Any other agent that reads AGENTS.md gets the same instructions.
When .codex/ is there or Codex runs it, rb also adds its session hook, SessionStart and Stop in .codex/hooks.json. Codex runs a project’s hooks once it is trusted, in /hooks.
When it finds .cursor/ or .cursorrules, rb adds a rule for Cursor’s agent in .cursor/rules/rabbit-brain.mdc, and its session hook, sessionStart and stop in .cursor/hooks.json:
rb skill add --cursorYou need no agent at all. Every write an agent makes is an ordinary rb command you can type:
rb init "INT8 ResNet-20 on CIFAR-10"rb question add "Does INT8 lose at most 0.5 points of top-1 against FP32?" --id q-int8rb experiment add "INT8 post-training quantization" --id int8-ptq -q q-int8 --baseline fp32 --candidate int8 --varies precisionrb spec set int8-ptq int8.precision int8 --source configs/int8.yaml#precisionrb metric add top1 --unit % --maximizerb criterion add "INT8 loses at most 0.5 points of top-1 against FP32" -e int8-ptq -q q-int8 --metric change.top1 --at-least -0.5rb journal run -- python eval.py --seed 1rb run add int8-ptq --from results/int8-ptq/seed1/metrics.json --set seed=1rb statusTo read the record: rb status and rb show <id> in the terminal; rb ui, a screen in the terminal; rb open, the same record in your browser, served on your machine only; and rb page, one HTML file you can send. The CLI lists every command.
What every agent gets
Section titled “What every agent gets”rb context: the record as one briefing a fresh session reads first, instead of anyone’s summary. The skill tells the agent to runrb context --model <your model id>before anything else in a project with.rb/. rb keeps that model with the session’s writes.rb docs: the whole manual, built into rb, so it always matches the installed version.rb docs --startis the protocol for a project already under way.--jsonon every command: one JSON object, the envelope, with the same facts as the text.rb mcp: the same commands as tools over the Model Context Protocol, each call recorded as the agent’s.
The session hook
Section titled “The session hook”With each agent’s instructions, rb installs a session hook in that agent’s project file. The hook runs rb journal scan --hook <agent> as a session starts and as each turn ends, so rb looks at the repository whether the agent reads rb’s instructions or not. It has a 10-second limit. rb says nothing, tells the session nothing and records nothing. It keeps the look in the journal as the agent’s.
| Agent | Where |
|---|---|
| Claude Code | SessionStart and Stop, in .claude/settings.json |
| Codex | SessionStart and Stop, in .codex/hooks.json |
| Cursor | sessionStart and stop, in .cursor/hooks.json |
A hook file that was there changes only once you agree, as AGENTS.md and .mcp.json do. rb’s handler goes beside the hooks there, and every byte that was there is kept. Where rb cannot ask, it names the command that adds the hook: rb skill add --claude --project --yes, --agents-md --yes or --cursor --yes. A handler that runs rb journal scan in a form no rb wrote is yours: rb leaves it as it is. rb remove takes rb’s handler out and leaves every other hook.
On Windows, Claude Code runs the hook in Git Bash. Without Git Bash it runs it in PowerShell, which does not read it: the hook fails, the session goes on, and rb does not look. Cursor’s hook and Codex’s on Windows look for rb on the PATH alone.
What stays yours
Section titled “What stays yours”Your agent records as it works, and rb records who made each write. Calls on results (accept, reject, investigate) and on lines of work (continue, park, stop, pivot, ship) are yours. A call recorded in an agent session is proposed, not made, and an experiment’s design an agent wrote reads “design not confirmed”. Both wait until you confirm them with rb confirm in your own terminal, and rb refuses rb confirm in an agent session. Calls has the details.
Rabbit Brainrabbitbrain.ai · GitHub · PyPI · Privacy · Apache-2.0