Originally published at orquesta.live/blog/understanding-orquestas-4-execution-modes
Orquesta offers powerful AI-driven automation through its four distinct execution modes: Auto, SSH, Agent, and Batuta. Each mode caters to specific needs and scenarios, enabling teams to leverage AI in the most effective way possible. Understanding when to use each mode is crucial for optimizing workflows and ensuring seamless integration of AI agents into your development process.
Execution Mode Overview
Before diving into when to use each execution mode, let's review what they do:
Auto Mode: The AI automatically selects the best execution method based on the context and nature of the prompt. This mode is ideal when you're uncertain which approach fits best or when you need a hassle-free setup.
SSH Mode: Suitable for executing quick, direct commands on remote servers via SSH. It's efficient for straightforward tasks that don't require complex processing or the full capabilities of AI agents.
Agent Mode: Utilizes the full capabilities of the Claude CLI running on your machine. This mode is best for complex coding tasks that benefit from advanced AI processing and local execution.
Batuta Mode: An autonomous loop using the ReAct method (Think > Act > Observe > Repeat) for executing a sequence of SSH commands. This mode excels in scenarios that require multiple iterative actions and decision-making processes.
Auto Mode: Letting AI Decide
When to Use Auto Mode
Auto mode is your go-to when you're unsure about the best execution path or when efficiency is key. This mode is beneficial in the following scenarios:
- Complex Prompts: When prompts are inherently complex and involve multiple execution processes.
- Mixed Workloads: Useful when dealing with varied tasks that may require different levels of AI intervention.
Benefits
- Ease of Use: No need to determine the execution path manually.
- Optimization: Leverages AI to choose the most efficient mode.
SSH Mode: Direct and Fast
When to Use SSH Mode
SSH mode is perfect for straightforward tasks that require direct execution on a remote server. Use SSH mode when:
- You Need Quick Execution: Ideal for simple commands that don't benefit from intermediate processing.
- Remote Configurations: When making minor adjustments or configurations on a server.
Example
orquesta exec --mode=ssh "sudo apt-get update"
Benefits
- Speed: Direct execution saves time.
- Simplicity: No overhead of AI processing for simple tasks.
Agent Mode: Harnessing Local Power
When to Use Agent Mode
When the task involves intricate coding requirements that demand full Claude CLI capabilities, Agent mode is the right choice. Consider Agent mode for:
- Complex Code Generation: Tasks that require AI-assisted coding and code quality assessments.
- Local Execution: When data and execution security are paramount, as the agent runs on your own infrastructure.
Example
# CLAUDE.md
execute:
- type: code
command: "python manage.py migrate"
Benefits
- Comprehensive Capabilities: Full AI capabilities for complex tasks.
- Security: Code never leaves your local environment.
Batuta Mode: Autonomous Execution
When to Use Batuta Mode
Batuta mode shines in scenarios requiring a sequence of actions. It is suitable for:
- Iterative Processes: Automated processes that need iterative decision-making.
- Complex Deployments: When deploying or managing services with multiple steps and dependencies.
Example
# Example Batuta YAML
think:
- "Check server load"
act:
- "ssh user@server 'uptime'"
observe:
- "If load is high, defer deployment"
repeat:
- "Continue if load is normal"
Benefits
- Autonomy: Handles complex sequences without manual intervention.
- Dynamic Decision Making: Adapts based on real-time observations.
Conclusion
Selecting the appropriate execution mode in Orquesta is fundamental to optimizing your AI-driven workflows. Auto mode provides a convenient, hands-off approach; SSH mode is perfect for quick, direct commands; Agent mode leverages full AI capabilities for complex tasks; and Batuta mode offers autonomous, iterative execution. Understanding these modes and their specific applications can significantly enhance your team's productivity and streamline your operations.
Top comments (0)