12,175
stars
+0+0+47
1,372
forks
66
watchers
–
prs
–
issues
0
releases
–
discussions
README
Trae Agent
Trae Agent is an LLM-based agent for general purpose software engineering tasks. It provides a powerful CLI interface that can understand natural language instructions and execute complex software engineering workflows using various tools and LLM providers.
For technical details please refer to our technical report.
Project Status: The project is still being actively developed. Please refer to docs/roadmap.md and CONTRIBUTING if you are willing to help us improve Trae Agent.
Difference with Other CLI Agents: Trae Agent offers a transparent, modular architecture that researchers and developers can easily modify, extend, and analyze, making it an ideal platform for studying AI agent architectures, conducting ablation studies, and developing novel agent capabilities. This _research-friendly design_ enables the academic and open-source communities to contribute to and build upon the foundational agent framework, fostering innovation in the rapidly evolving field of AI agents.
✨ Features
- 🌊 Lakeview: Provides short and concise summarisation for agent steps
- 🤖 Multi-LLM Support: Works with OpenAI, Anthropic, Doubao, Azure, OpenRouter, Ollama and Google Gemini APIs
- 🛠️ Rich Tool Ecosystem: File editing, bash execution, sequential thinking, and more
- 🎯 Interactive Mode: Conversational interface for iterative development
- 📊 Trajectory Recording: Detailed logging of all agent actions for debugging and analysis
- ⚙️ Flexible Configuration: YAML-based configuration with environment variable support
- 🚀 Easy Installation: Simple pip-based installation
🚀 Installation
Requirements
- UV (https://docs.astral.sh/uv/)
- API key for your chosen provider (OpenAI, Anthropic, Google Gemini, OpenRouter, etc.)
Setup
bash
git clone https://github.com/bytedance/trae-agent.git
cd trae-agent
uv sync --all-extras
source .venv/bin/activate
⚙️ Configuration
YAML Configuration (Recommended)
1. Copy the example configuration file:
bash
cp trae_config.yaml.example trae_config.yaml
2. Edit trae_config.yaml with your API credentials and preferences:
yaml
agents:
trae_agent:
enable_lakeview: true
model: trae_agent_model the model configuration name for Trae Agent
max_steps: 200 max number of agent steps
tools: tools used with Trae Agent
- bash
- str_replace_based_edit_tool
- sequentialthinking
- task_done
model_providers: model providers configuration
anthropic:
api_key: your_anthropic_api_key
provider: anthropic
openai:
api_key: your_openai_api_key
provider: openai
models:
trae_agent_model:
model_provider: anthropic
model: claude-sonnet-4-20250514
max_tokens: 4096
temperature: 0.5
Note: The trae_config.yaml file is ignored by git to protect your API keys.
Using Base URL
In some cases, we need to use a custom URL for the api. Just add the base_url field after provider, take the following config as an example:
openai:
api_key: your_