# Trae Agent — AI Coding Agent by ByteDance > Open-source autonomous coding agent for software engineering tasks. Multi-provider LLM support. By ByteDance. 11K+ stars. ## Install Save the content below to `.claude/skills/` or append to your `CLAUDE.md`: # Trae Agent — AI Coding Agent by ByteDance ## Quick Use ```bash git clone https://github.com/bytedance/trae-agent.git cd trae-agent uv sync --all-extras source .venv/bin/activate ``` ```bash # Set your LLM provider export OPENAI_API_KEY="sk-..." # Or: export ANTHROPIC_API_KEY="sk-ant-..." # Run the agent trae-agent "Create a REST API with FastAPI that manages a todo list with SQLite" ``` Or use the Python API: ```python from trae_agent import TraeAgent agent = TraeAgent( model="claude-sonnet-4-6", provider="anthropic" ) result = agent.run("Refactor the auth module to use JWT tokens") print(result.summary) ``` --- ## Intro Trae Agent is an open-source autonomous coding agent by ByteDance with 11,200+ GitHub stars, designed for general-purpose software engineering tasks. Give it a coding task in natural language and it autonomously plans, writes code, runs tests, and iterates until the task is complete. It supports multiple LLM providers (OpenAI, Anthropic Claude, Google Gemini, OpenRouter) and operates as a CLI tool or Python library. Part of ByteDance's Trae AI ecosystem, it brings enterprise-grade AI coding capabilities to the open-source community. Works with: OpenAI, Anthropic Claude, Google Gemini, OpenRouter, any OpenAI-compatible API. Best for developers who want an autonomous AI pair programmer for complex coding tasks. Setup time: under 5 minutes. --- ## Trae Agent Capabilities ### Autonomous Coding Loop ``` User Task: "Add rate limiting to the API endpoints" | +-- 1. Analyze codebase structure | Read files, understand architecture | +-- 2. Plan implementation | Break task into steps | +-- 3. Write code | Create/modify files | +-- 4. Test & verify | Run tests, check for errors | +-- 5. Iterate if needed Fix issues, refine implementation ``` ### Core Actions | Action | Description | |--------|-------------| | **Read files** | Explore and understand the codebase | | **Write files** | Create new files or modify existing ones | | **Run commands** | Execute shell commands (build, test, lint) | | **Search code** | Find relevant functions and patterns | | **Plan** | Break complex tasks into manageable steps | ### Multi-Provider Support ```bash # OpenAI trae-agent --model gpt-4o "..." # Anthropic Claude trae-agent --model claude-sonnet-4-6 --provider anthropic "..." # Google Gemini trae-agent --model gemini-2.5-pro --provider google "..." # OpenRouter (access 100+ models) trae-agent --model openrouter/auto --provider openrouter "..." ``` ### SWE-bench Performance Trae Agent is evaluated on SWE-bench, the standard benchmark for AI coding agents: - Resolves real GitHub issues from popular open-source projects - Handles multi-file changes with proper dependency management - Competitive with leading commercial coding agents ### Configuration ```yaml # trae-agent.yaml model: claude-sonnet-4-6 provider: anthropic max_iterations: 20 working_directory: ./my-project allowed_commands: - python - pip - pytest - git ``` --- ## FAQ **Q: What is Trae Agent?** A: Trae Agent is an open-source autonomous coding agent by ByteDance with 11,200+ GitHub stars. It understands codebases, writes code, runs commands, and iterates on software engineering tasks using multi-provider LLM support. **Q: How is Trae Agent different from Aider or Claude Code?** A: Trae Agent focuses on fully autonomous task completion — you describe the task and it handles planning, coding, and testing independently. Aider is more interactive (pair programming). Claude Code is Anthropic's proprietary tool. Trae Agent is open-source from ByteDance. **Q: Is Trae Agent free?** A: Yes, open-source under MIT license. You bring your own LLM API keys. --- ## Source & Thanks > Created by [ByteDance](https://github.com/bytedance). Licensed under MIT. > > [trae-agent](https://github.com/bytedance/trae-agent) — ⭐ 11,200+ --- ## 快速使用 ```bash git clone https://github.com/bytedance/trae-agent.git cd trae-agent && uv sync --all-extras && source .venv/bin/activate export ANTHROPIC_API_KEY="sk-ant-..." trae-agent "创建一个 FastAPI TODO 应用" ``` --- ## 简介 Trae Agent 是字节跳动开源的自主编码代理,拥有 11,200+ GitHub stars。用自然语言描述任务,它自主规划、编写代码、运行测试并迭代直到完成。支持 OpenAI、Claude、Gemini 等多个 LLM 提供商。 --- ## 来源与感谢 > Created by [ByteDance](https://github.com/bytedance). Licensed under MIT. > > [trae-agent](https://github.com/bytedance/trae-agent) — ⭐ 11,200+ --- Source: https://tokrepo.com/en/workflows/d77fd4c5-4ab9-445c-a9ea-2bf9aa669d2d Author: TokRepo精选