Running materialized agents
How aw team add materializes agent homes and how aw team up starts local agent runtimes.
Running materialized agents
Use this guide after a workspace is already connected to a team. If you want the shortest human path, start with Create and run your first team or Add an AI tool to a team.
1. Materialize a member, not just a directory
Run aw team add from a directory whose own .aw state is connected to the
team you want to extend:
aw team add [email protected]/developer=claude-code
aw team add [email protected]/reviewer=pi
The command uses that active workspace as the membership authority. It creates
or connects a distinct team member, gives that member its own .aw identity and
membership state, materializes the selected profile, and records pinned
provenance under .aw/profile/. It does not copy or share the caller’s .aw
directory.
Let D be the directory where you run the command. Let R be the Git
top-level when D is inside a Git worktree; outside Git, R is D. Default
homes are created at:
R/agents/instances/<name>/
So running the command from repo/src/ creates
repo/agents/instances/<name>/, not repo/src/agents/instances/<name>/. The
command prints the absolute home path when it finishes.
Each home contains the member’s identity, profile, runtime adapters, and work boundary:
<name>/
.aw/ # this member's identity, certificate, team, and connection
.aw/profile/ # materialized profile and pinned source provenance
AGENTS.md
CLAUDE.md # when the selected runtime needs this adapter
worktree/ # isolated Git worktree when a work repository is available
Current materialization runtimes are claude-code, codex, pi, and
local-shell; if you omit =RUNTIME and --runtime, the CLI uses
claude-code. The runtime is an operator choice at materialization time, not a
profile hint.
When scope is omitted, the profile supplies the default. Every currently
published aweb.team profile defaults to local. Pass :local or :global
explicitly to override it:
aw team add [email protected]/developer:local=claude-code
aw team add [email protected]/reviewer:global=pi
:localselects a team-scoped identity.:globalcreates or reuses a durable AWID identity that can hold public addresses and memberships in more than one team.
Home isolation: worktree/ and work-main/
aw team add separates the agent’s home (identity + instructions, where
aw resolves its identity) from its work (where the agent runs git and
builds). When a work repository is available, it:
- creates
<home>/worktree/— a Git worktree on a branch named after the agent — as the isolated place for Git and build work; and - adds the generated home to the source repository’s
.gitignore.
Profiles marked works_on_main: true (coordination roles) also get
<home>/work-main/, a symlink to the main checkout, for deliberate
operations on main. Code roles (works_on_main: false) get worktree/ only.
The operating rule is: run aw from the home, run Git and builds from
worktree/, and touch main only through the named work-main/.
Point the worktree at a separate project repository with --work-dir:
aw team add [email protected]/developer=pi --work-dir ~/prj/my-project
The checkout at ~/prj/my-project remains untouched. Its Git worktree is
created at <home>/worktree/; the home can live elsewhere. If the home is not
in a Git repository and no --work-dir is given, worktree setup is skipped and
the agent works directly in its home.
2. Materialization does not necessarily start a process
Plain aw team add ... stops after creating the membership, home, profile, and
worktree. No Claude Code, Pi, Codex, or shell process is running yet.
Use --start to materialize and launch exactly one supported agent:
aw team add [email protected]/developer=pi --start
--start requires exactly one agent and is rejected with --layout-only. It
takes the same --session, --attach, and --no-attach options as
aw team up, and skips launching if the home is already a running process’s
current working directory.
3. Start and access materialized agents
aw team up is a local tmux convenience. Run it from any directory in the Git
worktree that owns R/agents/instances/; outside Git, run it from the directory
that contains agents/instances/.
aw team up --dry-run
aw team up
The command resolves the same R, scans R/agents/instances/, and launches
homes that contain a materialized .aw/profile/profile.yaml. A profileless
founding workspace is not launched.
Every runtime process starts with the agent home as its current working directory:
cd <agent-home> && exec <runtime-command>
It does not start in worktree/. This is how the runtime loads the home’s
instructions and resolves the correct aweb identity. The agent changes into
worktree/ for Git, tests, and builds.
By default, aw team up attaches your terminal to a tmux session with one
window per launched agent, named after the agent. Use normal tmux window
navigation to move between agents. --no-attach leaves the session running in
the background; the command output names the session to attach to later.
If tmux is unavailable, the command prints the exact cd <home> && <command>
line for each agent. Run those commands in separate terminals. The output of
aw workspace status from an agent home also shows that member’s path and host.
Current launch support is narrower than materialization support:
claude-codestarts with the aweb channel plugin;pistarts with the aweb extension and--approve;codexandlocal-shellcan be materialized, butaw team upcurrently rejects them. Start those runtimes manually from the materialized home and have the agent pollaw mail inboxandaw chat pending.
Before starting windows, aw team up installs or verifies the supported
runtime channel and handles the known trust and development-channel prompts.
The command is an idempotent reconcile: it skips a home that is already the
current working directory of a running process. Use --force to ignore that
running-process check. --recreate kills and recreates the tmux session only
when the target session has no running agent windows; otherwise it refuses
unless you pass --force-kill.
Dogfood and test launches should use a throwaway --session name and an
isolated TMUX_TMPDIR; direct tmux experiments should use an isolated socket
such as tmux -L awdogfood ... so they cannot touch the live agent tmux server.
4. Public blueprint source
aw team add and aw team create --agent ... read public profile payloads from
the Library catalog API and materialize them locally. The public path does not
import to the private shelf, bind through the Library plugin, or call the
server-side /v1/materialize endpoint.
Defaults:
--library-urlAWEB_LIBRARY_URLhttps://library.aweb.ai
For profile-only selectors, the blueprint default is:
--blueprintAWEB_BLUEPRINTaweb.team
The private Library shelf remains an opt-in app for the profile evolution loop:
aw plugin install https://library.aweb.ai/.well-known/aweb-app.json
For the wire contract and pin file shape, see
blueprint-materialization-contract.md.
Implementation anchors
These claims were checked against the current CLI implementation and the released CLI’s path behavior:
- Team creation, the exact invocation-directory root workspace, and roster
materialization:
cli/go/cmd/aw/team_human.go. - Git-top-level fallback outside/inside Git:
cli/go/cmd/aw/inject_docs.go. - Member home creation, identity setup,
--home,--work-dir, worktree isolation,.gitignore,work-main, and--start:cli/go/cmd/aw/team_human.go. - Team-up root resolution, profile-home scan, runtime commands, home cwd,
preflight, prompt handling, and tmux lifecycle:
cli/go/cmd/aw/team_up.go. - Public materialization selectors, source, and runtime validation:
cli/go/cmd/aw/library_profile.go. - Runtime channel installers:
cli/go/cmd/aw/channel_setup.go.