Elffuss BraidHub

kikocis/continue public

627d7d0d1f85 · 2.3 KiBRawPermalink
1---
2title: "How Agent Works"
3description: "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## The tool handshake
7
8Tools 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
10The following handshake describes how Agent uses tools:
11
121. In Agent mode, available tools are sent along with `user` chat requests
132. The model can choose to include a tool call in its response
143. The user gives permission. This step is skipped if the policy for that tool is set to `Automatic`
154. Continue calls the tool using built-in functionality or the MCP server that offers that particular tool
165. Continue sends the result back to the model
176. The model responds, potentially with another tool call and step 2 begins again
18
19<Info>
20 Tool availability varies by mode:
21 - **Chat mode**: No tools included
22 - **Plan mode**: Only read-only tools included
23 - **Agent mode**: All tools included
24</Info>
25
26## Built-in tools
27
28Continue includes several built-in tools which provide the model access to IDE functionality.
29
30### Plan mode tools (read-only)
31
32In Plan mode, only these read-only tools are available:
33- **Read file** (`read_file`)
34- **Read currently open file** (`read_currently_open_file`)
35- **List directory** (`ls`)
36- **Glob search** (`glob_search`)
37- **Grep search** (`grep_search`)
38- **Fetch URL content** (`fetch_url_content`)
39- **Search web** (`search_web`)
40- **View diff** (`view_diff`)
41- **View repo map** (`view_repo_map`)
42- **View subdirectory** (`view_subdirectory`)
43- **Codebase tool** (`codebase_tool`)
44
45### Agent mode tools (all tools)
46
47In Agent mode, all tools are available including the read-only tools above plus:
48
49- **Create new file** (`create_new_file`): Create a new file within the project
50- **Edit file** (`edit_file`): Make changes to existing files
51- **Run terminal command** (`run_terminal_command`): Run commands from the workspace root
52- **Create Rule Block** (`create_rule_block`): Create a new rule block in `.continue/rules`
53- All other write/execute tools for modifying the codebase