| 1 | --- |
| 2 | title: "How Agent Mode Works" |
| 3 | description: "Agent offers the same functionality as Chat, while also including tools in the request to the model and an interface for handling tool calls and responses." |
| 4 | --- |
| 5 | |
| 6 | ## How the Tool Handshake Works |
| 7 | |
| 8 | Tools provide a flexible, powerful way for models to interface with the external world. They are provided to the model as a JSON object with a name and an arguments schema. For example, a `read_file` tool with a `filepath` argument will give the model the ability to request the contents of a specific file. |
| 9 | |
| 10 | The following handshake describes how Agent uses tools: |
| 11 | |
| 12 | 1. In Agent mode, available tools are sent along with `user` chat requests |
| 13 | 2. The model can choose to include a tool call in its response |
| 14 | 3. The user gives permission. This step is skipped if the policy for that tool is set to `Automatic` |
| 15 | 4. Continue calls the tool using built-in functionality or the MCP server that offers that particular tool |
| 16 | 5. Continue sends the result back to the model |
| 17 | 6. The model responds, potentially with another tool call and step 2 begins again |
| 18 | |
| 19 | <Info> |
| 20 | Tool availability varies by mode: - **Chat mode**: No tools included - **Plan |
| 21 | mode**: Only read-only tools included - **Agent mode**: All tools included |
| 22 | </Info> |
| 23 | |
| 24 | ## What Built-in Tools Are Available |
| 25 | |
| 26 | Continue includes several built-in tools which provide the model access to IDE functionality. |
| 27 | |
| 28 | ### What Tools Are Available in Plan Mode (Read-Only) |
| 29 | |
| 30 | In Plan mode, only these read-only tools are available: |
| 31 | |
| 32 | - **Read file** (`read_file`) |
| 33 | - **Read currently open file** (`read_currently_open_file`) |
| 34 | - **List directory** (`ls`) |
| 35 | - **Glob search** (`glob_search`) |
| 36 | - **Grep search** (`grep_search`) |
| 37 | - **Fetch URL content** (`fetch_url_content`) |
| 38 | - **Search web** (`search_web`) |
| 39 | - **View diff** (`view_diff`) |
| 40 | - **View repo map** (`view_repo_map`) |
| 41 | - **View subdirectory** (`view_subdirectory`) |
| 42 | - **Codebase tool** (`codebase_tool`) |
| 43 | |
| 44 | ### What Tools Are Available in Agent Mode (All Tools) |
| 45 | |
| 46 | In Agent mode, all tools are available including the read-only tools above plus: |
| 47 | |
| 48 | - **Create new file** (`create_new_file`): Create a new file within the project |
| 49 | - **Edit file** (`edit_file`): Make changes to existing files |
| 50 | - **Run terminal command** (`run_terminal_command`): Run commands from the workspace root |
| 51 | - **Create Rule Block** (`create_rule_block`): Create a new rule block in `.continue/rules` |
| 52 | - All other write/execute tools for modifying the codebase |