[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-71942":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":16,"starSnapshotCount":16,"syncStatus":32,"lastSyncTime":33,"discoverSource":34},71942,"trae-agent","bytedance\u002Ftrae-agent","bytedance","Trae Agent is an LLM-based agent for general purpose software engineering tasks.","https:\u002F\u002Fwww.trae.ai\u002F",null,"Python",11646,1283,63,95,0,13,36,122,39,117.33,"MIT License",false,"main",[26,27,28],"agent","llm","software-engineering","2026-06-12 04:01:02","# Trae Agent\n\n[![arXiv:2507.23370](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTechReport-arXiv%3A2507.23370-b31a1b)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2507.23370)\n[![Python 3.12+](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.12+-blue.svg)](https:\u002F\u002Fwww.python.org\u002Fdownloads\u002F) [![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n[![Pre-commit](https:\u002F\u002Fgithub.com\u002Fbytedance\u002Ftrae-agent\u002Factions\u002Fworkflows\u002Fpre-commit.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fbytedance\u002Ftrae-agent\u002Factions\u002Fworkflows\u002Fpre-commit.yml)\n[![Unit Tests](https:\u002F\u002Fgithub.com\u002Fbytedance\u002Ftrae-agent\u002Factions\u002Fworkflows\u002Funit-test.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fbytedance\u002Ftrae-agent\u002Factions\u002Fworkflows\u002Funit-test.yml)\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1320998163615846420?label=Join%20Discord&color=7289DA)](https:\u002F\u002Fdiscord.gg\u002FVwaQ4ZBHvC)\n\n**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.\n\nFor technical details please refer to [our technical report](https:\u002F\u002Farxiv.org\u002Fabs\u002F2507.23370).\n\n**Project Status:** The project is still being actively developed. Please refer to [docs\u002Froadmap.md](docs\u002Froadmap.md) and [CONTRIBUTING](CONTRIBUTING.md) if you are willing to help us improve Trae Agent.\n\n**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.\n\n## ✨ Features\n\n- 🌊 **Lakeview**: Provides short and concise summarisation for agent steps\n- 🤖 **Multi-LLM Support**: Works with OpenAI, Anthropic, Doubao, Azure, OpenRouter, Ollama and Google Gemini APIs\n- 🛠️ **Rich Tool Ecosystem**: File editing, bash execution, sequential thinking, and more\n- 🎯 **Interactive Mode**: Conversational interface for iterative development\n- 📊 **Trajectory Recording**: Detailed logging of all agent actions for debugging and analysis\n- ⚙️ **Flexible Configuration**: YAML-based configuration with environment variable support\n- 🚀 **Easy Installation**: Simple pip-based installation\n\n## 🚀 Installation\n\n### Requirements\n- UV (https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002F)\n- API key for your chosen provider (OpenAI, Anthropic, Google Gemini, OpenRouter, etc.)\n\n### Setup\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fbytedance\u002Ftrae-agent.git\ncd trae-agent\nuv sync --all-extras\nsource .venv\u002Fbin\u002Factivate\n```\n\n## ⚙️ Configuration\n\n### YAML Configuration (Recommended)\n\n1. Copy the example configuration file:\n   ```bash\n   cp trae_config.yaml.example trae_config.yaml\n   ```\n\n2. Edit `trae_config.yaml` with your API credentials and preferences:\n\n```yaml\nagents:\n  trae_agent:\n    enable_lakeview: true\n    model: trae_agent_model  # the model configuration name for Trae Agent\n    max_steps: 200  # max number of agent steps\n    tools:  # tools used with Trae Agent\n      - bash\n      - str_replace_based_edit_tool\n      - sequentialthinking\n      - task_done\n\nmodel_providers:  # model providers configuration\n  anthropic:\n    api_key: your_anthropic_api_key\n    provider: anthropic\n  openai:\n    api_key: your_openai_api_key\n    provider: openai\n\nmodels:\n  trae_agent_model:\n    model_provider: anthropic\n    model: claude-sonnet-4-20250514\n    max_tokens: 4096\n    temperature: 0.5\n```\n\n**Note:** The `trae_config.yaml` file is ignored by git to protect your API keys.\n\n### Using Base URL\nIn 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:\n\n```\nopenai:\n    api_key: your_openrouter_api_key\n    provider: openai\n    base_url: https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1\n```\n**Note:** For field formatting, use spaces only. Tabs (\\t) are not allowed.\n\n### Environment Variables (Alternative)\n\nYou can also configure API keys using environment variables and store them in the .env file:\n\n```bash\nexport OPENAI_API_KEY=\"your-openai-api-key\"\nexport OPENAI_BASE_URL=\"your-openai-base-url\"\nexport ANTHROPIC_API_KEY=\"your-anthropic-api-key\"\nexport ANTHROPIC_BASE_URL=\"your-anthropic-base-url\"\nexport GOOGLE_API_KEY=\"your-google-api-key\"\nexport GOOGLE_BASE_URL=\"your-google-base-url\"\nexport OPENROUTER_API_KEY=\"your-openrouter-api-key\"\nexport OPENROUTER_BASE_URL=\"https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1\"\nexport DOUBAO_API_KEY=\"your-doubao-api-key\"\nexport DOUBAO_BASE_URL=\"https:\u002F\u002Fark.cn-beijing.volces.com\u002Fapi\u002Fv3\u002F\"\n```\n\n### MCP Services (Optional)\n\nTo enable Model Context Protocol (MCP) services, add an `mcp_servers` section to your configuration:\n\n```yaml\nmcp_servers:\n  playwright:\n    command: npx\n    args:\n      - \"@playwright\u002Fmcp@0.0.27\"\n```\n\n**Configuration Priority:** Command-line arguments > Configuration file > Environment variables > Default values\n\n**Legacy JSON Configuration:** If using the older JSON format, see [docs\u002Flegacy_config.md](docs\u002Flegacy_config.md). We recommend migrating to YAML.\n\n## 📖 Usage\n\n### Basic Commands\n\n```bash\n# Simple task execution\ntrae-cli run \"Create a hello world Python script\"\n\n# Check configuration\ntrae-cli show-config\n\n# Interactive mode\ntrae-cli interactive\n```\n\n### Provider-Specific Examples\n\n```bash\n# OpenAI\ntrae-cli run \"Fix the bug in main.py\" --provider openai --model gpt-4o\n\n# Anthropic\ntrae-cli run \"Add unit tests\" --provider anthropic --model claude-sonnet-4-20250514\n\n# Google Gemini\ntrae-cli run \"Optimize this algorithm\" --provider google --model gemini-2.5-flash\n\n# OpenRouter (access to multiple providers)\ntrae-cli run \"Review this code\" --provider openrouter --model \"anthropic\u002Fclaude-3-5-sonnet\"\ntrae-cli run \"Generate documentation\" --provider openrouter --model \"openai\u002Fgpt-4o\"\n\n# Doubao\ntrae-cli run \"Refactor the database module\" --provider doubao --model doubao-seed-1.6\n\n# Ollama (local models)\ntrae-cli run \"Comment this code\" --provider ollama --model qwen3\n```\n\n### Advanced Options\n\n```bash\n# Custom working directory\ntrae-cli run \"Add tests for utils module\" --working-dir \u002Fpath\u002Fto\u002Fproject\n\n# Save execution trajectory\ntrae-cli run \"Debug authentication\" --trajectory-file debug_session.json\n\n# Force patch generation\ntrae-cli run \"Update API endpoints\" --must-patch\n\n# Interactive mode with custom settings\ntrae-cli interactive --provider openai --model gpt-4o --max-steps 30\n```\n\n## Docker Mode Commands\n### Preparation\n**Important**: You need to make sure Docker is configured in your environment.\n\n### Usage\n```bash\n# Specify a Docker image to run the task in a new container\ntrae-cli run \"Add tests for utils module\" --docker-image python:3.11\n\n# Specify a Docker image to run the task in a new container and mount the directory\ntrae-cli run \"write a script to print helloworld\" --docker-image python:3.12 --working-dir test_workdir\u002F\n\n# Attach to an existing Docker container by ID (`--working-dir` is invalid with `--docker-container-id`)\ntrae-cli run \"Update API endpoints\" --docker-container-id 91998a56056c\n\n# Specify an absolute path to a Dockerfile to build an environment\ntrae-cli run \"Debug authentication\" --dockerfile-path test_workspace\u002FDockerfile\n\n# Specify a path to a local Docker image file (tar archive) to load\ntrae-cli run \"Fix the bug in main.py\" --docker-image-file test_workspace\u002Ftrae_agent_custom.tar\n\n# Remove the Docker container after finishing the task (keep default)\ntrae-cli run \"Add tests for utils module\" --docker-image python:3.11 --docker-keep false\n```\n\n### Interactive Mode Commands\n\nIn interactive mode, you can use:\n- Type any task description to execute it\n- `status` - Show agent information\n- `help` - Show available commands\n- `clear` - Clear the screen\n- `exit` or `quit` - End the session\n\n## 🛠️ Advanced Features\n\n### Available Tools\n\nTrae Agent provides a comprehensive toolkit for software engineering tasks including file editing, bash execution, structured thinking, and task completion. For detailed information about all available tools and their capabilities, see [docs\u002Ftools.md](docs\u002Ftools.md).\n\n### Trajectory Recording\n\nTrae Agent automatically records detailed execution trajectories for debugging and analysis:\n\n```bash\n# Auto-generated trajectory file\ntrae-cli run \"Debug the authentication module\"\n# Saves to: trajectories\u002Ftrajectory_YYYYMMDD_HHMMSS.json\n\n# Custom trajectory file\ntrae-cli run \"Optimize database queries\" --trajectory-file optimization_debug.json\n```\n\nTrajectory files contain LLM interactions, agent steps, tool usage, and execution metadata. For more details, see [docs\u002FTRAJECTORY_RECORDING.md](docs\u002FTRAJECTORY_RECORDING.md).\n\n## 🔧 Development\n\n### Contributing\n\nFor contribution guidelines, please refer to [CONTRIBUTING.md](CONTRIBUTING.md).\n\n### Troubleshooting\n\n**Import Errors:**\n```bash\nPYTHONPATH=. trae-cli run \"your task\"\n```\n\n**API Key Issues:**\n```bash\n# Verify API keys\necho $OPENAI_API_KEY\ntrae-cli show-config\n```\n\n**Command Not Found:**\n```bash\nuv run trae-cli run \"your task\"\n```\n\n**Permission Errors:**\n```bash\nchmod +x \u002Fpath\u002Fto\u002Fyour\u002Fproject\n```\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## ✍️ Citation\n\n```bibtex\n@article{traeresearchteam2025traeagent,\n      title={Trae Agent: An LLM-based Agent for Software Engineering with Test-time Scaling},\n      author={Trae Research Team and Pengfei Gao and Zhao Tian and Xiangxin Meng and Xinchen Wang and Ruida Hu and Yuanan Xiao and Yizhou Liu and Zhao Zhang and Junjie Chen and Cuiyun Gao and Yun Lin and Yingfei Xiong and Chao Peng and Xia Liu},\n      year={2025},\n      eprint={2507.23370},\n      archivePrefix={arXiv},\n      primaryClass={cs.SE},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2507.23370},\n}\n```\n\n## 🙏 Acknowledgments\n\nWe thank Anthropic for building the [anthropic-quickstart](https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fanthropic-quickstarts) project that served as a valuable reference for the tool ecosystem.\n","Trae Agent 是一个基于大语言模型的通用软件工程任务代理工具。它提供了一个强大的命令行界面，能够理解自然语言指令并使用多种工具和大语言模型提供商执行复杂的软件工程工作流。其核心功能包括多LLM支持、丰富的工具生态系统、交互模式、轨迹记录等。特别适合需要进行代码生成、调试、文件编辑等场景的开发者和研究人员使用。此外，Trae Agent 采用了模块化架构设计，便于修改、扩展和分析，使其成为研究AI代理架构的理想平台。",2,"2026-06-11 03:39:34","high_star"]