Trae-CLI: RIP Claude Code? This FULLY FREE & OPENSOURCE AI Coder by BYTEDANCE is QUITE AMAZING!
By AICodeKing
Key Concepts
- Trey Agent: An open-source, LLM-based agent for software engineering tasks, functioning as a CLI tool.
- LLM (Large Language Model): The AI model powering Trey Agent, with support for OpenAI and Anthropic.
- Trajectory: Detailed logs of every step Trey Agent takes, including LLM interactions, tool calls, and state transitions, used for debugging and understanding the agent's process.
- Tool Ecosystem: A set of tools available to Trey Agent, including file editing, bash execution, sequential thinking, and task completion.
- Configuration Flexibility: The ability to customize Trey Agent's behavior through a JSON config file, command-line arguments, and environment variables.
- UV: A faster alternative to pip for setting up the project, though pip is also a viable option.
Trey Agent: An Open-Source LLM-Based Agent
Bite Dance has open-sourced the core agent that powers their Trey AI editor, creating a standalone CLI tool called Trey Agent. This agent is designed for general-purpose software engineering tasks and is fully open source under the MIT license, allowing users to modify and contribute to it. The agent will also be used in the Trey editor itself.
Functionality and Usage
Trey Agent operates in the terminal, similar to Claude Code, Gemini CLI, and Open Code. It uses API keys for Anthropic or OpenAI directly, without relying on intermediaries. The primary command is tly
, with tly run
being the most common subcommand. This allows users to input natural language instructions, such as "create a hello world python script," and the agent will generate the code. Users can specify the provider, model, working directory, and save the execution trajectory for debugging.
Example: tly run "create a hello world python script" --provider openai --model gpt-4
Interactive Mode
Trey Agent also features an interactive mode, accessible via the tly interactive
command. This mode allows users to input tasks, check status, clear the screen, and exit as needed, similar to Claude Code or aider. Users can set a maximum number of steps and change the provider or model on the fly.
Tool Ecosystem
Trey Agent includes a tool ecosystem:
- STR Replace-Based Edit Tool: Allows viewing, creating, and modifying files directly from instructions.
- Bash Tool: Executes shell commands and maintains persistent state for multi-step processes.
- Sequential Thinking: Enables the agent to break down complex problems into smaller steps, generate hypotheses, and revise its approach.
- Task Done Tool: Signals when the agent believes it has completed the task.
Configuration
The configuration is flexible, using a JSON config file that can be overridden with command-line arguments or environment variables. The priority order is command line, config file, environment, and then defaults.
Practical Application: Adding a Light Theme
The video demonstrates Trey Agent by adding a light theme option to a King Bench app. The agent successfully completes the task, generating the necessary code. The process is similar to using Claude Code, but Trey Agent does not stream the response; instead, it updates the trajectory file.
Advantages and Disadvantages
Advantages:
- Open source and customizable.
- Lightweight and functional.
- Detailed trajectory logging for debugging.
- Flexible configuration options.
- Useful tool ecosystem.
Disadvantages:
- Still in alpha, so may contain bugs.
- Documentation could be more detailed.
- Does not stream responses.
Ninja Chat Advertisement
The video includes a brief advertisement for Ninja Chat, an AI platform offering access to models like GPT-4o, Claude 3.7 Sonnet, and Gemini 2.0 Flash for $11 per month. It highlights the AI playground for comparing model responses and the mind map generator. The code king25
provides 25% off any plan, and king40yearly
offers 40% off annual subscriptions.
Conclusion
Trey Agent is a promising open-source LLM-based agent for software engineering tasks. Its flexibility, tool ecosystem, and detailed logging make it a valuable tool for developers. While still in alpha, it offers a solid foundation for building custom AI-powered workflows. The open-sourcing of the agent behind the Trey AI editor is a positive step, providing developers with more control and customization options.
Chat with this Video
AI-PoweredHi! I can answer questions about this video "Trae-CLI: RIP Claude Code? This FULLY FREE & OPENSOURCE AI Coder by BYTEDANCE is QUITE AMAZING!". What would you like to know?