Skip to content
WIP

This guide is a work in progress — it is incomplete and parts are out of date.

Build a Barry

In this guide, you’ll install Barry and setup your first identity. Each identity can have different capabilities, permissions, and preferences/configuration.

You need a Mac with Homebrew. To check, run brew --version.

Clone Barry, install what it needs, and set it up:

Terminal
git clone https://github.com/perintyler/Barry barry
cd barry
brew bundle && pnpm install && pnpm barry setup

barry setup installs the barry command and one login job that runs Barry’s services; barry setup --uninstall removes it and keeps your data.

Your identity is a directory that holds your Barry’s settings. Every session starts from it. Primitives describes it in full.

  1. From your home directory, create an identity named bonanza:

    Terminal
    cd ~
    barry identity create bonanza

    Barry creates the directory and finishes with Identity bonanza is ready. You should see:

    Output
    ...
    Creating identity bonanza...
    Created ~/barry-bonanza/
    Created ~/barry-bonanza/identity.yaml
    ...
    Identity bonanza is ready.
    ...
  2. Choose the agent it drives. Barry runs a session through an agent adapter: this example uses OpenCode, and claude, codex, or cursor work the same way:

    Terminal
    barry identity agent set opencode --name bonanza

    You should see:

    Output
    Set coding agent on identity 'bonanza': opencode
  3. Pull the model the agent talks to, and point the identity at it:

    Terminal
    ollama pull smollm2:135m
    barry identity model set smollm2:135m --provider ollama --name bonanza
  4. Read back what you built:

    Terminal
    cat ~/barry-bonanza/identity.yaml

    You should see the whole identity in one small file:

    Output
    name: bonanza
    displayName: Barry bonanza
    bags: []
    traits:
    - coding
    - sessions
    default_coding_agent: opencode
    default_model: smollm2:135m
    default_model_provider: ollama
  1. From a project you want to work in, start Barry:

    Terminal
    barry

    Barry names the identity the session runs as. You should see:

    Output
    Barry: bonanza (global default)
    ...
    Identity: bonanza
    ...
  2. Barry asks which capabilities to add. Press Enter without selecting any. Traits covers what you can add here.

  3. Talk to your agent as you normally would. When you’re done, type /exit, and name the session if Barry asks.

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: memory
description: Repo- and tag-scoped memories — agents save them, sessions start with them
tools:
entry: tools.ts
# Curation and import are occasional; keep them behind tool_search so the
# everyday surface is save/search/get — the loop an agent actually runs.
deferred:
- update
- forget
- list_tags
- import_claude
services:
web:
description: Memory browser — search, edit, and curate memories in a web UI
command: pnpm
args: ["exec", "tsx", "server/src/index.ts"]
working-directory: .
serves: http
health: /health

Thirty lines give a session four tools, hide three more behind search, and run a web app beside them. tools.entry is the only required part; everything else is the bag saying what it also brings.

Your Barry has an identity, an agent, and a model. Give it tools next, in Packing bags.