Connect your agent
rb init installs rb’s instructions for each agent it finds in the repository. It asks before it changes a file you already have, and --yes answers up front. Where it cannot ask, it leaves the file alone and names the command to run. rb init --dry-run lists what it would write. 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:
- the skill, in
.claude/skills/rabbit-brain/SKILL.md - rb’s MCP server, in
.mcp.json - rb’s session hook
To add them later:
rb skill add --claude --projectclaude mcp add --scope project rabbit-brain -- rb mcpThen start a new session.
Codex reads AGENTS.md. When the file exists or Codex runs rb init, rb adds its section at the end, between two marker lines. Any other agent that reads AGENTS.md gets it too. To add it later:
rb skill add --agents-mdWhen .codex/ is there or Codex runs rb init, rb also adds its session hook. Codex runs a project’s hooks once it is trusted, in /hooks.
When it finds .cursor/ or .cursorrules, rb adds a rule in .cursor/rules/rabbit-brain.mdc and its session hook. To add them later:
rb skill add --cursorEvery write an agent makes is an 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 statusThe CLI lists every command.
What every agent gets
Section titled “What every agent gets”rb contextprints the record as one briefing. The skill tells the agent to runrb context --model <your model id>first.rb mcpserves the same commands as MCP tools.
The session hook
Section titled “The session hook”rb’s session hook runs rb journal scan --hook <agent> as a session starts and as each turn ends, so rb looks at the repository even when the agent skips rb’s instructions. It prints nothing and has a 10-second limit. rb notes the scan in its journal, not in the record.
| 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 |
rb’s handler goes beside your other hooks, which stay as they are.
On Windows, Claude Code needs Git Bash to run the hook. Without it the hook fails, but the session goes on. Cursor’s hook and Codex’s on Windows look for rb on the PATH alone.
What stays yours
Section titled “What stays yours”rb records who made each write. A call is a decision on a result (accept, reject, investigate) or on a line of work (continue, park, stop, pivot, ship). Calls are yours. A call recorded in an agent session is proposed, not made, until you approve it with rb confirm in your own terminal. rb refuses rb confirm in an agent session. An experiment design an agent wrote reads “design not confirmed” until you approve it the same way. Calls has the details.
Rabbit Brainrabbitbrain.ai · GitHub · PyPI · Privacy · Apache-2.0