Overview
This guide walks you through running multiple AI agents in parallel to solve a coding task. You’ll learn how to create agents, monitor their progress, and merge the best solution back into your codebase.Make sure you’ve completed the Installation steps before continuing.
Your first multi-agent workflow
Navigate to your project
Open a terminal and navigate to your Git repository:Verify you’re in a Git repository:
Create agents with a prompt
Start multiple agents with a task. This example runs 3 Claude agents and 2 Codex agents:
You’ll see output like:
What happens when you run this command?
What happens when you run this command?
For each agent, Uzi:
- Creates a new Git worktree in
~/.local/share/uzi/worktrees/ - Creates a new Git branch (e.g.,
agent-myapp-abc123-fluffy-elephant) - Spawns a tmux session for the agent
- Finds an available port from your configured range
- Starts your dev server (if configured in
uzi.yaml) - Launches the AI agent with your prompt
Enable auto-confirmation
Run This command monitors all active agents and automatically:
uzi auto to automatically press Enter for tool confirmations and trust prompts:- Confirms “Do you trust the files in this folder?” prompts
- Presses Enter for “Allow command” prompts
- Handles “Continue? (Y/n)” confirmations
Monitor agent progress
In another terminal, watch your agents’ progress in real-time:The Press
-w flag enables watch mode, refreshing every second. You’ll see:The randomly generated agent name (e.g.,
fluffy-elephant)The AI tool being used (e.g.,
claude, codex)Current status:
ready(green): Agent is idle or waiting for inputrunning(orange): Agent is actively thinking or executing
Code changes:
+insertions/-deletionsDevelopment server URL (if configured)
The task given to the agent (truncated)
Ctrl+C to exit watch mode.Review agent work
Visit each agent’s development server to see their implementation:Or attach to an agent’s tmux session to see what they’re doing:Press
Ctrl+B then D to detach without closing the session.Checkpoint the best solution
Once you’ve found an agent whose solution you like, merge it back to your main branch:This command:
- Stages all changes in the agent’s worktree
- Creates a commit with your message
- Rebases the agent’s branch onto your current branch
- Merges the changes into your working directory
Advanced usage
Use random agent names
If you don’t care about specific tools, use random agent names:Send additional instructions
Broadcast a message to all running agents:Run commands across all agents
Execute a command in all agent sessions:--delete flag removes the tmux window after the command completes.
List agents without watch mode
Get a one-time snapshot of agent status:Real-world example
Here’s a complete workflow for adding a new feature:Troubleshooting
Agents not responding
If agents appear stuck:-
Attach to the agent’s tmux session to see what’s happening:
-
Check if
uzi autois running in another terminal - Manually press Enter in the agent’s session if needed
Port conflicts
If you see port errors:- Check your
uzi.yamlport range is large enough - Kill any processes using ports in your range:
No changes to checkpoint
If checkpoint shows no changes:-
Verify the agent made changes:
Look for non-zero values in the DIFF column
-
Check the agent’s worktree directly:
Reset everything
If things get messy, reset all Uzi data:Next steps
Commands reference
Learn about all available Uzi commands and options
Configuration
Advanced configuration options for uzi.yaml
Best practices
Tips for getting the most out of parallel agents
Workflows
Common workflows and use cases for Uzi