docs(commands): update parallel/queue/merge workflow for public docs (#427)

Co-authored-by: Rufino Cabrera <rufino@aliasrobotics.com>
This commit is contained in:
RMtz88 2026-04-01 14:33:14 +02:00 committed by GitHub
parent 7f473712e8
commit 02115233de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 26 additions and 23 deletions

View File

@ -195,31 +195,32 @@ This document provides documentation for all commands available in the CAI (Cont
### **Parallel Execution (`parallel.py`)** ### **Parallel Execution (`parallel.py`)**
### **ParallelCommand** ### **ParallelCommand**
- **Command**: `/parallel` - **Command**: `/parallel`
- **Purpose**: Manage parallel agent configurations - **Purpose**: Configure and run parallel agent workflows with isolated contexts
- **Features**: - **Features**:
- Configure multiple agents - Add/remove/list parallel agents
- Set different models per agent - Queue prompts per agent or broadcast to all agents
- Execute agents in parallel - Execute queued prompts with `/parallel run`
- Manage parallel configurations - Merge results back into the main context
- Exit parallel mode with or without merge
### **Run Parallel (`run.py`)** ### **Queue Management (`queue.py`)**
### **RunCommand** ### **QueueCommand**
- **Command**: `/run` - **Command**: `/queue`
- **Purpose**: Execute queued prompts in parallel mode - **Purpose**: Manage sequential prompt queue independently from parallel mode
- **Features**: - **Features**:
- Queue prompts for different agents - Add prompts to queue
- Execute all queued prompts - List queued prompts
- Manage parallel execution - Run queued prompts sequentially
- Collect results from multiple agents - Clear queue safely
### **Merge Histories (`merge.py`)** ### **Merge Histories (`merge.py`)**
### **MergeCommand** ### **MergeCommand**
- **Command**: `/merge` - **Command**: `/merge`
- **Purpose**: Merge agent message histories (alias for `/parallel merge`) - **Purpose**: Merge parallel agent contexts into main context and exit parallel mode
- **Features**: - **Features**:
- Combine histories from multiple agents - Combine histories from multiple agents
- Integrate parallel conversation results - Integrate parallel conversation results into the current main thread
- Shortcut for parallel merge functionality - Automatically leave parallel mode after successful merge
--- ---
@ -343,18 +344,20 @@ cai
### Advanced Features ### Advanced Features
```bash ```bash
# Set up parallel execution # Set up parallel execution
/parallel create agent1 --model gpt-4 /parallel add red_teamer
/parallel create agent2 --model claude-3 /parallel add network_traffic_analyzer
# Queue prompts # Add prompts (per agent or all)
/run queue agent1 "Analyze this code" /parallel prompt all "Scan 192.168.1.0/24"
/run queue agent2 "Review the analysis"
# Execute in parallel # Execute in parallel
/run execute /parallel run
# Merge results # Merge all parallel contexts into main context and exit parallel mode
/merge /merge
# Optional: exit without merging contexts
/parallel clear
``` ```
### Integration Examples ### Integration Examples