
Trae Agent
An open-source command-line AI agent that carries out software engineering tasks using LLMs.
- Stars
- 12.2k
- Forks
- 1.4k
- Licence
- MIT
- Language
- Python
- Last update
- 9 months ago
- Type
- CLI
What it is
Trae Agent is a command-line tool from ByteDance that takes plain-language instructions, such as fixing a bug or adding tests, and works through them using an LLM and a set of tools for editing files and running bash commands. It supports several model providers, including OpenAI, Anthropic, Google Gemini, OpenRouter, Ollama and Doubao. The project describes itself as a transparent, modular design aimed at researchers and developers who want to study or extend agent architectures.
- Run a one-off task such as creating a script with trae-cli run "..."
- Use interactive mode to iterate on a codebase conversationally
- Run tasks inside a Docker container using --docker-image or --dockerfile-path
- Record a trajectory file of agent actions for debugging or analysis
Great for
- Developers who want a scriptable terminal agent that works on a local project directory
- Researchers studying or modifying LLM agent architectures, as the README positions it
- People who want to switch between model providers, including local models through Ollama
- Users comfortable editing YAML config and managing their own API keys
Not ideal for
- Users who want a polished, ready-made IDE experience, since the README describes only a CLI and an interactive terminal mode
- Teams that need a stable release, because the README says the project is still being actively developed and no release is listed
- People without an API key or local model, since the tool requires one to run
How to get it
- 1
Clone and build from source
You'll need: Python 3.12+ · UV (https://docs.astral.sh/uv/) · An API key for your chosen model provider, or a local Ollama setup · Docker (only for Docker mode)
Clone the repository
git clone https://github.com/bytedance/trae-agent.gitEnter the project folder
cd trae-agentInstall dependencies with UV
uv sync --all-extrasActivate the virtual environment
source .venv/bin/activate - 2
Run it
- Copy trae_config.yaml.example to trae_config.yaml and add your API key
- Run trae-cli show-config to check the configuration
- Run a task with trae-cli run "Create a hello world Python script"
- 3
Get the most out of it
- Use --provider and --model flags to switch models per task
- Enable Lakeview in the YAML config for short summaries of agent steps
- Configure MCP servers, for example the Playwright MCP server shown in the README
- Use --trajectory-file to save a session for later review
- Use Docker options such as --docker-image to isolate task execution
Downloads
Strengths
- Multiple LLM providers are supported, including a local option via Ollama
- Configuration is explicit in YAML, and trajectory recording helps with debugging
- Released under the MIT license with a technical report on arXiv
Trade-offs
- The README states the project is still under active development, so behavior may change
- Setup requires managing API keys and provider configuration yourself
- No release tag is listed, so you install from source rather than a versioned package
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| trae-agent (this) | 12.2k | CLI | intermediate | 9 months ago | Developers who want a scriptable terminal agent that works on a local project directory |
| OpenHands | 92.5k | App | intermediate | 4 days ago | Developers who want coding agents running on a server while their laptop is off |
| SWE-agent | 20.7k | AI model / agent | intermediate | 11 days ago | Researchers studying autonomous coding agents or running SWE-bench experiments |
| deer-flow | 84.9k | AI model / agent | advanced | 4 days ago | Developers who want to experiment with multi-agent workflows on their own infrastructure |
| MetaGPT | 71.1k | Framework | intermediate | 10 months ago | Developers experimenting with multi-agent LLM workflows |
| DeepSeek-Reasonix | 36k | App | beginner | 4 days ago | Developers who want an AI assistant to make multi-step changes in a local project |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.