Skip to content

Agent

Agents are your programming assistants designed for different development tasks. Trae IDE provides built-in agents. You can create custom agents by configuring prompts and toolsets, enabling them to assist you more efficiently in completing complex tasks.

Capabilities of agents

Autonomous operation: Independently explore your codebase, identify relevant files, and make necessary code changes.

Full tool access: Utilize all available tools for searching, editing, creating files, and running terminal commands.

Contextual understanding: Develop a comprehensive understanding of your project's structure and dependencies.

Multi-step planning: Break down complex tasks into executable steps and handle them sequentially.

Workflow of agents

Requirement analysis: Gain a deep understanding of the goals and the context of the codebase, clarifying key requirements.

Code research: Search the codebase, documentation, and online resources to locate relevant files and analyze existing implementation logic.

Solution design: Break down the steps based on the analysis results and dynamically optimize the modification planning.

Implementation of changes: Execute necessary code changes throughout the codebase as planned, which may involve:

  • Recommendations for new dependency libraries
  • Terminal commands to be executed
  • Guidance for manual operation outside of the Trae IDE client

Delivery and acceptance: Transfer control to you after validation is complete and summarize all modifications made.

Built-in agents

Trae IDE provides the following built-in agents:

Builder: Builder can help you develop a complete project from scratch. Based on your requests, Builder utilizes various tools when responding. These tools include those for analyzing code files, editing code files, running commands, and more, making the responses more precise and effective.

Builder with MCP: On the basis of Builder, all MCP servers you set up will be automatically added to Builder with MCP and this is not editable.

Create custom agents

  1. At the top right of the side chat box, click the Settings icon > Agents, or click @Agent > + Create Agent in the input box of side chat.
  2. The Agents window appears.
  3. Click the + Create Agent button.
  4. This directs you to the agent setup panel.
  5. Set up the agent with the following settings:
SettingDescription
Avatar(Optional) Upload an image as the avatar of the agent
NameEnter a name for the agent
PromptWrite a prompt for the agent to standardize and guide the agent in completing tasks. You can specify the agent's persona, tone of response, workflow, timing for using tools, the rules that need to be followed, and more
ToolsSelect the tools that the agent can use when dealing with your requests, including MCP servers and built-in tools (File system, Terminal, Web search, Preview)

Use agents

In the input box, type @ or click @Agent, and then choose from the list of available agents.

Edit / share / delete agents

You can manage custom agents in the following ways:

  • Modify the configurations of your custom agents
  • Share custom agents directly to X via Trae IDE, or copy their links to distribute through other channels
  • Delete custom agents

From the custom agents list, click the Settings icon, choose the desired action from the menu, and follow the on-screen instructions.

Note: Before sharing, it's recommended to remove any sensitive information from the prompt and MCP server configuration.

Import agents

You can import the agents shared by others into Trae IDE and reuse their configurations:

  1. Click the link shared by others
  2. Follow the on-screen instructions to open Trae IDE
  3. Trae IDE pops up a window displaying the information of the agent that the shared link is for
  4. Click the Get Now button
  5. Trae IDE imports this shared agent and directs you to the agent's editing panel

Enable / disable the "Auto-Run" feature

The Auto-Run feature applies to all agents. You can enable this feature in the Agent window and add specified commands to the denylist (rm, kill, and chmod have been added to the denylist by default). The agent will automatically execute commands and MCP servers that it deems safe and are not on the denylist.

Your Ultimate AI-Powered IDE Learning Guide