🤖 Multi-agent AI collaboration framework for orchestrating Claude Code, OpenAI Codex, and custom AI agents.
📦 npm: https://www.npmjs.com/package/u-foo
ufoo solves the challenge of coordinating multiple AI coding agents:
- 🔗 Unified Interface - One chat UI to manage all your AI agents
- 📬 Message Routing - Agents can communicate and collaborate via event bus
- 🧠 Context Sharing - Shared decisions and knowledge across agents
- 🚀 Auto-initialization - Agent wrappers handle setup automatically
- 📝 Decision Tracking - Record architectural decisions and trade-offs
- ⚡ Real-time Updates - See agent status and messages instantly
- Chat Interface - Interactive multi-agent chat UI (
ufoo chat)- Real-time agent communication and status monitoring
- Dashboard with agent list, online status, and quick actions
- Direct messaging to specific agents with
@agent-name
- Event Bus - Real-time inter-agent messaging (
ufoo bus) - Context Sharing - Shared decisions and project context (
ufoo ctx) - Agent Wrappers - Auto-initialization for Claude Code (
uclaude), Codex (ucodex), and ucode assistant (ucode)- PTY Wrapper - Intelligent terminal emulation with ready detection
- Smart Probe Injection - Waits for agent initialization before injecting commands
- Consistent Branding - Unified agent naming (e.g., ucode-1, claude-1, codex-1)
- Skills System - Extensible agent capabilities (
ufoo skills)
# Install globally from npm (recommended)
npm install -g u-fooOr install from source:
git clone https://github.com/Icyoung/ufoo.git ~/.ufoo
cd ~/.ufoo && npm install && npm linkAfter installation, the following commands are available globally: ufoo, uclaude, ucodex, ucode.
# Initialize a project
cd your-project
ufoo init
# Launch chat interface (default command)
ufoo chat
# or just
ufoo
# Use agent wrappers (auto-init + bus join)
uclaude # Claude Code wrapper
ucodex # Codex wrapper
ucode # ucode assistant (self-developed AI coding agent)# 1. Start the chat interface
$ ufoo
# 2. Launch agents from chat
> /launch claude
> /launch ucode
# 3. Send tasks to agents
> @claude-1 Please analyze the current codebase structure
> @ucode-1 Fix the bug in authentication module
# 4. Agents communicate via bus
claude-1: Analysis complete. Found 3 areas needing refactoring...
ucode-1: Bug fixed. Running tests...
# 5. Check decisions made
> /decisionsNative self-developed implementation lives under src/code.
Prepare and verify ucode runtime wiring:
ufoo ucode doctor
ufoo ucode prepare
ufoo ucode buildTry native core queue runtime (WIP):
ucode-core submit --tool read --args-json '{"path":"README.md"}'
ucode-core run-once --json
ucode-core list --jsonUse ufoo -g (or ufoo --global) to launch a cross-project chat dashboard. Instead of being scoped to a single project, global mode connects to all running ufoo daemons and lets you switch between projects on the fly.
$ ufoo -g
> /project list # List all running project daemons
> /project switch 2 # Switch to project #2
> /launch claude scope=inplace # Launch agent in current context
> @claude-1 Start reviewing the auth module| Command | Description |
|---|---|
/project list |
List running projects from global runtime registry |
/project switch <index|path> |
Switch active project daemon connection |
/launch <agent> scope=inplace |
Launch agent in current workspace |
/launch <agent> scope=window |
Launch agent in separate terminal window |
Configure AI providers in .ufoo/config.json:
{
"ucodeProvider": "openai", // or "anthropic", "azure", etc.
"ucodeModel": "gpt-4-turbo-preview",
"ucodeBaseUrl": "https://api.openai.com/v1",
"ucodeApiKey": "sk-***"
}{
"claudeProvider": "claude-cli", // Uses Claude CLI
"claudeModel": "claude-3-opus" // or "claude-3-sonnet"
}{
"codexProvider": "codex-cli", // Uses Codex CLI
"codexModel": "gpt-4" // or "gpt-4-turbo-preview"
}{
"launchMode": "internal",
"ucodeProvider": "openai",
"ucodeModel": "gpt-4-turbo-preview",
"ucodeBaseUrl": "https://api.openai.com/v1",
"ucodeApiKey": "sk-***",
"claudeProvider": "claude-cli",
"claudeModel": "claude-3-opus",
"codexProvider": "codex-cli",
"codexModel": "gpt-4"
}ucode writes these into a global config directory (~/.ufoo/agent/ucode/config) and uses them for native planner/engine calls. Configure once, use across all projects. Project-level .ufoo/config.json can override global settings when needed.
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ uclaude │ │ ucodex │ │ other... │
└──────┬──────┘ └──────┬──────┘ └──────┬──────┘
│ │ │
└───────────────────┼───────────────────┘
│
┌──────▼──────┐
│ ufoo bus │ Event Bus
└──────┬──────┘
│
┌────────────┼────────────┐
│ │ │
┌──────▼──────┐ ┌───▼───┐ ┌──────▼──────┐
│ .ufoo/bus │ │context│ │ decisions │
└─────────────┘ └───────┘ └─────────────┘
Bus state lives in .ufoo/agent/all-agents.json (metadata), .ufoo/bus/* (queues/events), and .ufoo/daemon/* (bus daemon runtime).
| Command | Description |
|---|---|
ufoo |
Launch chat interface (default) |
ufoo chat |
Launch interactive multi-agent chat UI |
ufoo -g |
Launch global chat mode (cross-project dashboard) |
ufoo init |
Initialize .ufoo in current project |
ufoo status |
Show banner, unread bus messages, open decisions |
ufoo doctor |
Check installation health |
| Command | Description |
|---|---|
ufoo daemon start |
Start ufoo daemon |
ufoo daemon stop |
Stop ufoo daemon |
ufoo daemon status |
Check daemon status |
ufoo resume [nickname] |
Resume agent sessions |
| Command | Description |
|---|---|
ufoo bus join |
Join event bus (auto by agent wrappers) |
ufoo bus send <id> <msg> |
Send message to agent |
ufoo bus check <id> |
Check pending messages |
ufoo bus status |
Show bus status and online agents |
| Command | Description |
|---|---|
ufoo ctx decisions -l |
List all decisions |
ufoo ctx decisions -n 1 |
Show latest decision |
ufoo ctx decisions new <title> |
Create new decision |
| Command | Description |
|---|---|
ufoo skills list |
List available skills |
ufoo skills show <skill> |
Show skill details |
Notes:
- Claude CLI headless agent uses
--dangerously-skip-permissions.
ufoo/
├── bin/
│ ├── ufoo # Main CLI entry (bash)
│ ├── ufoo.js # Node wrapper
│ ├── uclaude # Claude Code wrapper
│ ├── ucodex # Codex wrapper
│ └── ucode # ucode assistant wrapper
├── SKILLS/ # Global skills (uinit, ustatus)
├── src/
│ ├── bus/ # Event bus implementation (JS)
│ ├── daemon/ # Daemon + chat bridge
│ ├── agent/ # Agent launch/runtime
│ └── code/ # Native ucode core implementation
├── scripts/ # Legacy helpers (bash, deprecated)
├── modules/
│ ├── context/ # Decision/context protocol
│ ├── bus/ # Bus module resources
│ └── resources/ # UI/icons (optional)
├── AGENTS.md # Project instructions (canonical)
└── CLAUDE.md # Points to AGENTS.md
After ufoo init, your project gets:
your-project/
├── .ufoo/
│ ├── bus/
│ │ ├── events/ # Event log (append-only)
│ │ ├── queues/ # Per-agent message queues
│ │ └── offsets/ # Read position tracking
│ └── context/
│ ├── decisions/ # Decision records
│ └── decisions.jsonl # Decision index
├── scripts/ # Legacy symlink (optional)
├── AGENTS.md # Injected protocol blocks
└── CLAUDE.md # → AGENTS.md
The interactive chat UI provides a centralized hub for agent management:
- Real-time Communication - See all agent messages in one place
- Agent Dashboard - Monitor online status, session IDs, and nicknames
- Direct Messaging - Use
@agent-nameto target specific agents - Command Completion - Tab completion for commands and agent names
- Mouse Support - Toggle with
Ctrl+Mfor scrolling vs text selection - Session History - Persistent message history across sessions
| Key | Action |
|---|---|
Tab |
Auto-complete commands/agents |
Ctrl+C |
Exit chat |
Ctrl+M |
Toggle mouse mode |
Ctrl+L |
Clear screen |
Ctrl+R |
Refresh agent list |
↑/↓ |
Navigate command history |
| Command | Description |
|---|---|
/help |
Show available commands |
/agents |
List online agents |
/clear |
Clear chat history |
/settings |
Configure chat preferences |
@agent-name <message> |
Send to specific agent |
Agents communicate via the event bus:
# Agent A sends task to Agent B
ufoo bus send "codex:abc123" "Please analyze the project structure"
# Agent B checks and executes
ufoo bus check "codex:abc123"
# → Executes task automatically
# → Replies with result
ufoo bus send "claude-code:xyz789" "分析完成:..."Built-in skills triggered by slash commands:
/ubus- Check and auto-execute pending messages/uctx- Quick context status check/ustatus- Unified status view (banner, unread bus, open decisions)/uinit- Manual .ufoo initialization
- macOS - Required for Terminal.app/iTerm2 integration
- Node.js >= 18 - For npm installation and JavaScript runtime
- Bash 4+ - For shell scripts and command execution
- Terminal - iTerm2 or Terminal.app for agent launching
ufoo chat automatically starts the daemon if not running - no need to run ufoo daemon start separately.
If Codex CLI fails with permission errors under ~/.codex (e.g. sessions dir), set CODEX_HOME to a writable path:
export CODEX_HOME="$PWD/.ufoo/codex"
ufoo chat # daemon auto-starts# Clone the repository
git clone https://github.com/Icyoung/ufoo.git
cd ufoo
# Install dependencies
npm install
# Link for local development
npm link
# Run tests
npm test- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
src/- Core JavaScript implementationbin/- CLI entry pointsmodules/- Modular features (bus, context, etc.)test/- Unit and integration testsSKILLS/- Agent skill definitions
UNLICENSED (Private)