How Agent Works
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.
The tool handshake
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.
The following handshake describes how Agent uses tools:
In Agent mode, available tools are sent along with
user
chat requestsThe model can choose to include a tool call in its response
The user gives permission. This step is skipped if the policy for that tool is set to
Automatic
Continue calls the tool using built-in functionality or the MCP server that offers that particular tool
Continue sends the result back to the model
The model responds, potentially with another tool call and step 2 begins again
In [Chat mode](/features/chat/quick-start), tools are **not** included in the request to the model.
Built-in tools
Continue includes several built-in tools which provide the model access to IDE functionality:
Read file (
read_file
): read the contents of a file within the projectRead currently open file (
read_currently_open_file
): read the contents of the currently open fileCreate new file (
create_new_file
): Create a new file within the project, with path and contents specified by the modelExact search (
exact_search
): perform aripgrep
search within the projectGlob search (
file_glob_search
): perform a glob search on files in the project. Currently limits to 100 output and warns the Agent if limit reached.Run terminal command (
run_terminal_command
): run a terminal command from the workspace rootSearch web (
search_web
): Perform a web search to get top resultsView diff (
view_diff
): View the current working git diffView repo map (
view_repo_map
): request a copy of the repository map—same as the Repo Map Context ProviderView subdirectory (
view_subdirectory
): request a copy of a repo map for a specific directory within the projectCreate Rule Block (
create_rule_block
): creates a new rule block in.continue/rules
based on the contents of the conversation
Last updated