Originally published at orquesta.live/blog/choosing-execution-modes-auto-ssh-agent-batuta
Orquesta offers four distinct execution modes to cater to different needs and workflows. Understanding when to use each mode can significantly optimize your team's efficiency. Let's explore each mode in detail and establish a decision framework for selecting the right one.
Auto Mode: The AI Decides
Auto mode leverages the power of AI to automatically choose the most suitable execution mode based on the context of the task. This mode is particularly useful when:
- Uncertainty exists about which mode will be most efficient.
- Dynamic environments where tasks vary widely in scope and complexity.
- Teams new to Orquesta who are still learning the ropes.
Auto mode relies on the AI's ability to evaluate task complexity, existing infrastructure, and previous executions to select the optimal path. This hands-off approach allows teams to focus on higher-level strategy without getting bogged down in execution details.
execution_mode: auto
SSH Mode: Direct and Precise
SSH mode is tailored for direct command execution on remote servers, ideal for tasks that require precision and immediacy. Consider using SSH mode when:
- Executing single commands that don't require complex orchestration.
- Maintenance tasks, such as restarting services or applying patches.
- Debugging issues where immediate feedback is necessary.
SSH mode is the go-to for quick, direct interactions with your infrastructure. It bypasses the need for intermediate processing, providing real-time execution and feedback.
ssh user@hostname "your-command-here"
Agent Mode: Full Claude CLI Power
Agent mode taps into the full capabilities of the Claude CLI running locally, making it suitable for comprehensive tasks that require nuanced interactions. Use Agent mode when:
- Executing multi-step operations that involve complex logic.
- Integrating with other local tools or scripts that form part of the workflow.
- Leveraging Claude's advanced features, such as natural language processing.
Agent mode is ideal for tasks that need more than just basic command execution. It provides a robust interface for interacting with your machine's capabilities, harnessing the power of Claude to process, analyze, and execute.
execution_mode: agent
Batuta Mode: Autonomous Execution
Batuta mode shines in scenarios where tasks are repetitive or require autonomous decision-making. It employs the ReAct loop (Think > Act > Observe > Repeat) to handle:
- Routine tasks that benefit from automation.
- Complex operations that involve conditional logic and branching.
- Scenarios requiring high autonomy, such as continuous integration pipelines.
With Batuta, you can script your operations in a way that allows the AI to make decisions on the fly, adapting to changing conditions without manual intervention. This mode is particularly powerful for teams looking to scale operations without increasing overhead.
execution_mode: batuta
Decision Framework
Choosing the right execution mode involves assessing the task at hand, the environment, and your team's objectives. Here’s a simple decision framework:
- Define the Task Scope: Is it a single command or a complex operation?
- Evaluate the Need for Autonomy: Does the task require decision-making and adaptability?
- Consider the Environment: Are you working within a controlled environment or one that changes frequently?
- Leverage AI When in Doubt: If unsure, let Auto mode determine the best path forward.
By understanding and applying these criteria, teams can maximize efficiency, reduce errors, and leverage Orquesta’s full potential effectively.
Conclusion
Each execution mode in Orquesta offers unique advantages tailored for different scenarios. By aligning mode selection with task requirements and objectives, teams can achieve greater productivity and more reliable outcomes. Whether it's leveraging AI's discretion in Auto mode or tapping into the autonomous capabilities of Batuta, the choice of execution mode can be a decisive factor in your project's success.
Top comments (0)