Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

Checkpoint: File edits

rUvec23b8ea6ea8
diff --git a/CLAUDE.md b/CLAUDE.md
index 8ddc5b1801..291e2bb6bc 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -526,6 +526,123 @@ const config = optimizer.getOptimalConfig(agentCount);
### Testing & Validation
`tdd-london-swarm`, `production-validator`
+## Agent Teams (Multi-Agent Coordination)
+
+Claude Code's experimental Agent Teams feature is fully integrated with Claude Flow for advanced multi-agent coordination.
+
+### Enabling Agent Teams
+
+Agent Teams is automatically enabled when you run `npx claude-flow@v3alpha init`. The following is added to `.claude/settings.json`:
+
+```json
+{
+ "env": {
+ "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
+ },
+ "claudeFlow": {
+ "agentTeams": {
+ "enabled": true,
+ "teammateMode": "auto",
+ "taskListEnabled": true,
+ "mailboxEnabled": true
+ }
+ }
+}
+```
+
+### Agent Teams Components
+
+| Component | Tool | Purpose |
+|-----------|------|---------|
+| **Team Lead** | You (main Claude) | Coordinates teammates, assigns tasks, reviews results |
+| **Teammates** | `Task` tool | Sub-agents spawned to work on specific tasks |
+| **Task List** | `TaskCreate/TaskList/TaskUpdate` | Shared todo list visible to all team members |
+| **Mailbox** | `SendMessage` | Inter-agent messaging for coordination |
+
+### Creating and Managing Teams
+
+```javascript
+// Create a team
+TeamCreate({
+ team_name: "feature-dev",
+ description: "Building new feature",
+ agent_type: "coordinator"
+})
+
+// Create shared tasks
+TaskCreate({ subject: "Design API", description: "...", activeForm: "Designing" })
+TaskCreate({ subject: "Implement endpoints", description: "...", activeForm: "Implementing" })
+TaskCreate({ subject: "Write tests", description: "...", activeForm: "Testing" })
+
+// Spawn teammates (run in background for parallel work)
+Task({
+ prompt: "Design the API according to task #1...",
+ subagent_type: "system-architect",
+ team_name: "feature-dev",
+ name: "architect",
+ run_in_background: true
+})
+Task({
+ prompt: "Implement endpoints from task #2...",
+ subagent_type: "coder",
+ team_name: "feature-dev",
+ name: "developer",
+ run_in_background: true
+})
+```
+
+### Agent Teams Hooks
+
+| Hook | Trigger | Purpose |
+|------|---------|---------|
+| `TeammateIdle` | Teammate finishes turn | Auto-assign pending tasks to idle teammates |
+| `TaskCompleted` | Task marked complete | Train patterns from successful work, notify lead |
+
+### Hook Commands
+
+```bash
+# Handle idle teammate (auto-assigns available tasks)
+npx claude-flow@v3alpha hooks teammate-idle --auto-assign true
+
+# Handle task completion (trains patterns, notifies lead)
+npx claude-flow@v3alpha hooks task-completed -i task-123 --train-patterns true
+
+# Check on team progress
+TaskList
+
+# Send message to teammate
+SendMessage({
+ type: "message",
+ recipient: "developer",
+ content: "Please prioritize the auth endpoint",
+ summary: "Prioritize auth"
+})
+
+# Shutdown teammate gracefully
+SendMessage({
+ type: "shutdown_request",
+ recipient: "developer",
+ content: "Work complete, shutting down"
+})
+```
+
+### Best Practices for Agent Teams
+
+1. **Spawn teammates in background**: Use `run_in_background: true` for parallel work
+2. **Create tasks first**: Use TaskCreate before spawning teammates so they have work
+3. **Use descriptive names**: Name teammates by role (architect, developer, tester)
+4. **Don't poll status**: Wait for teammates to message back or complete
+5. **Graceful shutdown**: Always send shutdown_request before TeamDelete
+6. **Clean up**: Use TeamDelete after all teammates have shut down
+
+### Teammate Display Modes
+
+| Mode | Description |
+|------|-------------|
+| `auto` | Automatically selects best mode for environment |
+| `in-process` | Teammates run in same process (default for CI/background) |
+| `tmux` | Split-pane display in terminal (requires tmux) |
+
## V3 Hooks System (17 Hooks + 12 Workers)
### Hook Categories