# Custom Agents

Custom Agents let you create specialized AI assistants tailored to specific tasks. Define custom instructions, choose which tools the agent can use, and build focused assistants for your workflows.

## Overview

Unlike the built-in modes (Agent, Plan, Browser), Custom Agents are fully configurable:

| Feature           | Built-in Modes | Custom Agents      |
|-------------------|----------------|---------------------|
| System prompt     | Fixed          | You define it       |
| Available tools   | Predetermined   | You select them      |
| Visual styling     | Standard colors | Choose from 11 colors |
| Purpose           | General use    | Your specific workflows |

## Why Create Custom Agents?

### Focused Assistance

Create agents specialized for code review, documentation, testing, or any specific task.

### Safety Guardrails

Limit tool access—create a "reviewer" that can read but not write code.

### Consistent Behavior

Define prompts that ensure the AI follows your team's standards.

### Workflow Optimization

Build agents that match how you actually work.

## Creating a Custom Agent

### Open Agent Settings

Go to **Settings → Agents** tab.

### Click "New Agent"

Click the **New Agent** button to open the creation form.

### Configure your agent

Fill in the agent details:

**Name** — A descriptive name (e.g., "Code Reviewer", "Doc Writer")  
**Color** — Choose from 11 colors for visual identification  
**System Prompt** — Instructions that define the agent's behavior and expertise  
**Tools** — Select which tools this agent can use

### Save and use

Click **Save Agent**. Your new agent appears in the Mode Selector dropdown under "Custom Agents".

## Configuring Tools

Select which capabilities your agent has access to:

### File Operations

- **Read Files** — View file contents  
- **Write File** — Create or overwrite files  
- **Edit File** — Make targeted changes to files

### Search & Navigation

- **Scan Folder** — List directory contents  
- **File Tree** — Display project structure  
- **Search Files** — Full-text search  
- **Grep Files** — Regex pattern search

### System

- **Terminal** — Execute shell commands  
- **MCP Tools** — Access Model Context Protocol integrations

### Interaction

- **Ask User Question** — Prompt for user input

### Browser

- **Browser** — Full browser automation (17 sub-tools)

**Less is more.** Restricting tools helps agents stay focused and prevents unintended actions.

## Writing Effective System Prompts

The system prompt defines your agent's personality and behavior. Here's how to write effective prompts:

### Be Specific About Role

You are a senior security engineer specializing in code review.  
Focus on identifying vulnerabilities, insecure patterns, and potential attack vectors.

### Define Expectations

Always explain your findings clearly. Provide specific line numbers and suggest concrete fixes. Prioritize issues by severity: Critical, High, Medium, Low.

### Set Constraints

Do not modify any files directly. Only provide recommendations and explanations. Ask clarifying questions if the scope is unclear.

### Include Domain Knowledge

Follow OWASP Top 10 guidelines. Check for SQL injection, XSS, CSRF, and authentication bypasses. Consider the principle of least privilege.

## Example Agents

### Code Reviewer

| Setting      | Value                                                                                      |
|--------------|--------------------------------------------------------------------------------------------|
| **Name**     | Code Reviewer                                                                             |
| **Color**    | Red                                                                                        |
| **Tools**    | Read Files, Grep Files, Search Files                                                     |
| **Prompt**   | "You are a strict code reviewer focused on security, performance, and best practices. Analyze code for bugs, vulnerabilities, and improvement opportunities. Never modify files—only provide feedback and suggestions." |

### Documentation Writer

| Setting      | Value                                                                                      |
|--------------|--------------------------------------------------------------------------------------------|
| **Name**     | Doc Writer                                                                                |
| **Color**    | Blue                                                                                       |
| **Tools**    | Read Files, Write File, Edit File, Search Files                                          |
| **Prompt**   | "You are a technical documentation specialist. Create clear, comprehensive documentation with examples. Follow the existing documentation style in this project. Include code examples where helpful." |

### Bug Investigator

| Setting      | Value                                                                                      |
|--------------|--------------------------------------------------------------------------------------------|
| **Name**     | Bug Hunter                                                                                |
| **Color**    | Orange                                                                                     |
| **Tools**    | Read Files, Grep Files, Search Files, Terminal                                           |
| **Prompt**   | "You are a debugging expert. Analyze code to find root causes of bugs. Use search tools extensively to trace issues across the codebase. Provide detailed explanations of what's causing the problem and how to fix it." |

### Test Writer

| Setting      | Value                                                                                      |
|--------------|--------------------------------------------------------------------------------------------|
| **Name**     | Test Writer                                                                               |
| **Color**    | Green                                                                                      |
| **Tools**    | Read Files, Write File, Edit File, Terminal                                              |
| **Prompt**   | "You are a testing specialist. Write comprehensive unit and integration tests. Follow the existing test patterns in this project. Ensure good coverage of edge cases and error conditions. Run tests after writing them." |

## Managing Agents

### Edit an Agent

1. Go to **Settings → Agents**  
2. Find the agent you want to modify  
3. Click the **Edit** icon  
4. Make your changes  
5. Click **Save Changes**

### Delete an Agent

1. Go to **Settings → Agents**  
2. Find the agent to delete  
3. Click the **Delete** icon  
4. Confirm deletion

### Temporarily Disable

Toggle the **Active** switch to hide an agent from the Mode Selector without deleting it.

### Search Agents

Use the search bar in the Agents tab to find agents by name.

## Using Custom Agents

Once created, your agents appear in the Mode Selector:

1. Click the **Mode Selector** in the input area  
2. Scroll to **Custom Agents** section  
3. Click your agent to activate it  
4. The agent's color appears in the mode indicator  
5. Start chatting—the agent uses your custom prompt and tools

## Best Practices

### Start Narrow, Expand Later

Begin with minimal tools and add more only if needed. It's easier to add capabilities than to restrict them.

### Test Your Prompts

Try your agent on various tasks to ensure the prompt produces the behavior you want.

### Use Descriptive Names

Names like "Security Reviewer" or "API Doc Writer" make it clear what each agent does.

### Document Your Agents

Keep notes on what each agent is for, especially if you have many.
