diff --git a/docs/tui/terminals_management.md b/docs/tui/terminals_management.md new file mode 100644 index 00000000..cca8349f --- /dev/null +++ b/docs/tui/terminals_management.md @@ -0,0 +1,763 @@ +# CAI TUI Terminals Management + +> **⚡ CAI-Pro Exclusive Feature** +> The Terminal User Interface (TUI) is available exclusively in **CAI-Pro**. To access this feature and unlock advanced multi-agent workflows, visit [Alias Robotics](https://aliasrobotics.com) for more information. + +--- + +This guide covers advanced terminal management in the CAI TUI, including multi-terminal workflows, layouts, team configurations, and parallel execution strategies. + +--- + +## Table of Contents + +1. [Terminal Basics](#terminal-basics) +2. [Multi-Terminal Workflows](#multi-terminal-workflows) +3. [Terminal Layouts](#terminal-layouts) +4. [Terminal Operations](#terminal-operations) +5. [Team-Based Configurations](#team-based-configurations) +6. [Parallel Execution Patterns](#parallel-execution-patterns) +7. [Terminal State Management](#terminal-state-management) +8. [Advanced Techniques](#advanced-techniques) + +--- + +## Terminal Basics + +### What is a Terminal? + +In CAI TUI, a **terminal** is an independent execution environment where: +- A single agent processes user prompts +- Conversation history is maintained separately +- Model selection can be configured independently +- Cost tracking is isolated + +### Terminal Anatomy + +Each terminal consists of: + +[Insertar imagen] + + +**Header Components**: +- **Terminal Number** (T1, T2, T3, T4) +- **Agent Name** with dropdown selector +- **Model Name** with dropdown selector +- **Container Icon** (if running in container mode) + +**Output Area**: +- Streaming agent responses +- Tool call displays +- Execution results +- Error messages + +**Status Bar** (global, not per-terminal): +- Current agent +- Active model +- Session cost +- Token count + +### Default Behavior + +- **Terminal 1 (T1)** is always the main terminal and cannot be closed +- New terminals start with `redteam_agent` and the default model (`CAI_MODEL`) +- Each terminal maintains independent conversation history +- Terminals can run different agents and models simultaneously + +--- + +## Multi-Terminal Workflows + +### Why Use Multiple Terminals? + +Multiple terminals enable: + +1. **Parallel Agent Execution**: Run different agents simultaneously on the same task +2. **Perspective Comparison**: Compare red team vs. blue team approaches +3. **Specialization**: Assign specific roles to different agents +4. **Efficiency**: Execute independent tasks in parallel +5. **Collaboration Simulation**: Model team-based security workflows + +### Common Multi-Terminal Patterns + +#### Pattern 1: Offensive + Defensive (2 Terminals) + +**Use Case**: Adversarial testing with real-time defense validation + +**Setup**: +- **T1**: `redteam_agent` - Performs offensive testing +- **T2**: `blueteam_agent` - Analyzes defensive posture + +**Workflow**: + +``` +T1 > Identify attack vectors on target web application +T2 > Evaluate defensive controls for the same application +``` + +**Benefits**: +- Immediate validation of findings +- Balanced security assessment +- Real-time trade-off analysis + +#### Pattern 2: Discover + Validate + Report (3 Terminals) + +**Use Case**: Complete vulnerability lifecycle from discovery to documentation + +**Setup**: +- **T1**: `bug_bounter_agent` - Discover vulnerabilities +- **T2**: `retester_agent` - Validate findings +- **T3**: `reporting_agent` - Document results + +**Workflow**: + +``` +T1 > Hunt for authentication bypasses in target.com +T2 > +T2 > Retest the authentication bypass found in T1 +T3 > +T3 > Generate report for confirmed authentication bypass +``` + +**Benefits**: +- Clear separation of concerns +- Quality assurance built-in +- Professional documentation + +#### Pattern 3: Full Security Team (4 Terminals) + +**Use Case**: Comprehensive security assessment with maximum parallelization + +**Setup** (Use Team #1 from sidebar): +- **T1**: `redteam_agent` - Web application attacks +- **T2**: `redteam_agent` - Network-level exploitation +- **T3**: `bug_bounter_agent` - OWASP Top 10 focus +- **T4**: `bug_bounter_agent` - API security testing + +**Workflow**: + +``` +