How HN: Agent-brain – Notes-agnostic second-brain operating model for AI agents A developer released agent-brain, an open-source "second-brain" operating model for AI coding agents including Claude Code, OpenCode, Codex CLI and Antigravity CLI, distributed via a bootstrap script that clones the repo to ~/.local/share/agent-brain and dry-runs by default. The tool keeps CLAUDE.md, AGENTS.md, memory and runtime settings in a git-tracked brain folder symlinked into each runtime (~/.claude, ~/.config/opencode, ~/.codex, ~/.gemini/antigravity-cli), with a brain_state machine moving from virgin to attached to initial to maintenance and a runtime_health check validating each selected runtime after apply. It requires Python 3.x (standard library only, with uv for test dependencies) and git, and on --apply preserves any existing _COMMON symlink as _COMMON.backup- while relinking stale managed templates. Notes-agnostic second-brain operating model + multi-runtime agent config/memory versioning. agent-brain is a personal operating model for AI coding agents Claude Code, OpenCode, Codex, Antigravity CLI . It gives you: - A second-brain knowledge structure journal, WIP, memory, tasks that the model builds on top of any folder of notes — Obsidian is one option, not a requirement. - Version-controlled runtime config & memory : your CLAUDE.md / AGENTS.md , memory, and runtime settings live in a git-tracked brain and are symlinked into each runtime ~/.claude , ~/.config/opencode , … , so your agent configuration and memory travel with you across machines. - A session lifecycle daily notes, session notes, consolidation driven by the brain skill. - An optional boyscout skill: spot improvement opportunities while you work, then route them to an explicit remediation workflow or backlog. - Python 3.x the runtime scripts use only the standard library; the complete governed test gate installs its validation dependencies with uv - git on PATH - At least one supported agent runtime installed: - Claude Code https://docs.anthropic.com/en/docs/claude-code → ~/.claude/ - OpenCode https://opencode.ai/ → ~/.config/opencode/ - Shared agents dir → ~/.agents/ - Codex CLI → ~/.codex/ AGENTS.md and config.toml are persisted under the private brain's AGENTS/CODEX/ ; the brain skill is installed at ~/.agents/skills/brain - Antigravity CLI → ~/.gemini/antigravity-cli/ skill-only integration curl -fsSL https://raw.githubusercontent.com/juanyque/agent-brain/main/bootstrap-zero.sh | bash This clones agent-brain to ~/.local/share/agent-brain and runs the orchestrator, which will ask for your brain path an Obsidian vault, a notes folder, or a new empty dir . It dry-runs by default. After reviewing the plan, use the exact public apply command printed at the end; it preserves the selected brain, runtime filter, and symlink policy: curl -fsSL https://raw.githubusercontent.com/juanyque/agent-brain/main/bootstrap-zero.sh \ | bash -s -- --brain /path/to/brain --apply If your brain already has a COMMON symlink pointing to a different model e.g. a previous setup , the dry-run reports the current entry and desired symlink separately, including the raw target of a broken link. It also checks every template symlink managed by home setup and reports stale targets. On --apply , the installer preserves the existing COMMON entry as COMMON.backup-