Cline CLI & Sub Agents: Cline is back with a new CLI Agent, but is it good?
By AICodeKing
Key Concepts
- Klein CLI: A command-line interface for Klein, enabling integration into workflows like CI/CD.
- Sub-agents: A feature within Klein's VS Code extension that allows for the orchestration of multiple agents to complete tasks.
- Agentic Framework: The underlying system that powers Klein's agents, now accessible via the CLI.
- Bifurcation of Backend and Frontend: A refactoring effort by Klein to separate its backend and frontend, leading to increased extensibility and new features like the JetBrains plugin and CLI.
- Prompt-based Tool Calling vs. Native Tool Calling: A distinction in how AI models interact with tools. Haiku, for example, requires native tool calling, which Klein and Rū have not yet implemented, while Kilo has.
- CI/CD Workflow: Continuous Integration/Continuous Deployment, a common software development practice where Klein's CLI can be integrated.
- Autonomous Mode (O flag, Y flag): Flags for the Klein CLI that enable fully autonomous operation.
- Compact System Prompt: An option for local models that reduces the size of the system prompt, improving efficiency.
Klein's New CLI and Sub-agents Feature
The video discusses recent updates to Klein, focusing on the introduction of a new Command Line Interface (CLI) and a sub-agents feature. The presenter notes that Klein has been relatively slow with updates recently, a gap filled by competitors like Rū and Kilo. Kilo, in particular, has been quick to adopt new AI model capabilities, such as native tool calling required by Anthropic's Haiku model, which Klein and Rū have yet to implement.
Klein's Evolution and Extensibility
Klein is described as evolving towards an enterprise-focused model, similar to Red Hat's trajectory with Linux. This shift is attributed to a significant refactoring effort that bifurcated the extension's backend and frontend. This architectural change has enhanced extensibility, enabling the development of new products like a JetBrains plugin and the new CLI.
Klein CLI: Capabilities and Use Cases
The new Klein CLI leverages the same agentic framework as the main Klein application, offering similar capabilities. Its primary design goal is integration into workflows such as Continuous Integration (CI) and Continuous Deployment (CD), but it can also be used locally.
Key capabilities of the Klein CLI include:
- Integration: Can be integrated into Slack, Discord, CI/CD pipelines, and other platforms.
- Remote Coding Agents: Enables the creation of remote coding agents.
- Parallel Task Execution: Supports running parallel clients to address multiple GitHub issues simultaneously.
- Cross-Environment State Sync: Allows tasks to be started in the terminal and continued in an IDE (like VS Code) with the same state preserved. This synchronization between the terminal and IDE is highlighted as a particularly valuable feature.
Klein Sub-agents Feature
The VS Code extension for Klein has also been updated with a sub-agents feature. This functionality allows the extension to spawn multiple sub-agents to accomplish a given task, mirroring the approach seen in Claude Code.
Details of the Sub-agents Feature:
- Orchestration: The system can orchestrate multiple sub-agents to achieve a complex task.
- Similarity to Other Tools: While Rū reportedly had an orchestrator mode previously, Klein's implementation is described as more fleshed out and faster.
- Dependency: This feature requires the Klein CLI to be installed, as it utilizes the CLI to spin up multiple agent instances.
Using the Klein CLI
The video provides a brief walkthrough of setting up and using the Klein CLI.
Steps for Setup and Usage:
- Installation: Install Klein in the terminal using a simple command.
- Initialization: Run the
kleincommand to start. - Provider Setup: The CLI will prompt for provider setup (e.g., OpenAI, Anthropic).
- Changing Providers: Providers can be changed later using the
klein authcommand, which opens provider options for adding new ones. - Interface: The CLI interface is described as simple, allowing users to send messages.
- Modes:
- Plan Mode: The default mode.
- Act Mode: Activated using the
/actcommand.
- Editor:
Ctrl + Eopens an editor for writing prompts, similar to the VS Code extension.
Major Subcommands and Flags:
- Starting an Instance:
klein <task> - Flags:
-oor--oneshot: Full autonomous mode.-yor--yolo: Fully autonomous mode.-vor--verbose: Verbose output.--mode <mode>: Explicitly set the mode.
Local Model Enhancements
A notable addition for users employing local models is the "compact system prompt" option. This feature is considered a significant improvement for local model efficiency.
Comparison with Competitors and Future Outlook
Despite the new features, the presenter expresses continued preference for Kilo due to its existing advanced features and superior autocomplete functionality. The presenter notes that many of Klein's new features, like sub-agents and CLI integration, have been present in other tools for some time. This leads to Klein feeling somewhat like a "legacy tool" in comparison, a departure from its past role as an innovator.
However, the refactoring and focus on improving the codebase are seen as a positive long-term strategy. The hope is that this foundational work will lead to more significant and innovative updates in the future. The presenter acknowledges that Klein is now faster and less memory-intensive due to the architectural changes.
Conclusion
The introduction of the Klein CLI and sub-agents feature represents a significant step for Klein, enhancing its extensibility and integration capabilities, particularly for developers and enterprise workflows. While the features themselves are not entirely novel in the broader AI agent landscape, their implementation within Klein's framework is seen as a positive development. The long-term success will depend on Klein's ability to leverage this improved foundation to deliver truly innovative features in the future.
Chat with this Video
AI-PoweredHi! I can answer questions about this video "Cline CLI & Sub Agents: Cline is back with a new CLI Agent, but is it good?". What would you like to know?