Build a Barry
Use this when you are new to Barry and want to install it, set up your first identity, and start a session as that identity.
An identity is a persona a session runs as, with its own capabilities, permissions, and configuration. You can build as many as you like, each a different Barry.
Before you begin
Section titled “Before you begin”-
A Mac with Homebrew. To check, run
brew --version. -
Homebrew Node 26, at least 26.9, and pnpm 12. To check, run
node --versionandpnpm --version. -
The harness this guide drives, installed before you set up Barry. A harness is the coding agent Barry runs a session through, and Barry drives the harness’s own command-line tool. Setup registers only the harnesses whose command it finds, so install yours first:
Harness Install Claude Code brew install --cask claude-codeCodex brew install --cask codexCursor brew install --cask cursor-cliOpenCode brew install opencodeThis guide uses OpenCode.
-
A local model. This guide runs one through Ollama, which needs no vendor key. Install Ollama with
brew install ollama, then pull the model withollama pull smollm2:135m.
1. Install Barry
Section titled “1. Install Barry”Clone Barry, install its dependencies, build its packages, and set it up from the checkout:
git clone https://github.com/perintyler/barry.git && cd barrypnpm install --frozen-lockfilepnpm build:packagesnode cli/bin/barry.js setup --link .barry setup installs the barry command and one login job that runs Barry’s
services, and prints the directory it put barry in. If that directory is
missing from your PATH, add it. barry uninstall removes the command and the
login job and keeps your data.
If you install a harness after setup, register it from your Barry checkout
with barry adapter add, such as
barry adapter add adapters/sessions/opencode.
2. Create an identity
Section titled “2. Create an identity”An identity is a directory that holds your Barry’s settings, and every session
starts from it. Barry creates that directory, barry-bonanza, in the directory
you run the command from. Primitives describes
an identity in full.
3. Start a session
Section titled “3. Start a session”What a bag looks like
Section titled “What a bag looks like”A bag is a directory with a bag.yaml at its root. Barry’s own memory bag is
a short one worth reading
(bags/memory/bag.yaml):
name: memorydescription: Repo- and tag-scoped memories — agents save them, sessions start with them
tools: - update: deferred - forget: deferred - list_tags: deferred - import_claude: deferred
prompts: entry: prompt.ts
services: web: description: Memory browser — search, edit, and curate memories in a web UI entry: server/src/index.ts working-directory: . serves: http health: /health secrets: [BARRY_SECRET]
stores: memory: owned_by: identity engine: sqlite migrations: ./migrations/memory unscoped: owned_by: node engine: sqlite migrations: ./migrations/memoryA short manifest gives a session the memory tools, keeps the occasional ones
(update, forget, list_tags, import_claude) behind tool search as
deferred, runs a web app beside them, and declares the SQLite stores they
read and write. The bag needs no traits: block: the automatic memory trait,
named after the bag, already grants its namespace.
Verify
Section titled “Verify”To confirm the identity exists, run:
barry identity listThe list includes bonanza and the directory it lives in, such as
~/barry-bonanza. To confirm Barry’s services are healthy, run
barry doctor; each running, healthy service shows a PASS line.
If it fails
Section titled “If it fails”- Your shell cannot find
barryorbonanza. Open a new shell, or add the directory setup printed to yourPATH. - The session does not start, or the harness is missing. Install the
harness’s own command-line tool, register it with
barry adapter add, and pull the local model first. See A session does not start. - A
doctorcheck fails. Runbarry doctor --fixto repair what it safely can.
What’s next
Section titled “What’s next”- Packing bags to give your Barry tools.
- Run sessions for the ways to start, name, and resume sessions.
- Automate a recurring task to see the primitives work together.