Tools
Tools are the actions the Lead Agent can take. DeerFlow provides built-in
tools, community integrations, MCP tools, and skill tools — all controlled
through config.yaml.
The Lead Agent is a tool-calling agent. Tools are how it interacts with the world: searching the web, reading and writing files, running commands, delegating tasks, and presenting outputs to the user.
DeerFlow organizes tools into four categories:
- Built-in tools — core runtime capabilities always available to the agent
- Community tools — integrations with external search, fetch, and image services
- MCP tools — tools provided by external Model Context Protocol servers
- Skill tools — tools bundled with specific skill packs
Built-in tools
Built-in tools are part of the harness and do not require configuration to be available.
task
Delegates a subtask to a subagent. The Lead Agent uses this tool when a task is too broad for a single reasoning thread or when parallel work would be beneficial.
task(agent="general-purpose", task="...", context="...")See the Subagents page for how subagents are configured.
present_files
Presents output files to the user as artifacts. The agent calls this tool after producing a file (report, chart, code, etc.) to surface it in the conversation.
Files at /mnt/user-data/uploads/* are copied into /mnt/user-data/outputs/* before being presented. The artifact paths are tracked in ThreadState.artifacts.
view_image
Reads an image file and injects its content into the model’s context for visual analysis. Only available when the active model has supports_vision: true.
clarification
Asks the user a clarifying question before proceeding. This is triggered by the ClarificationMiddleware when the model decides it does not have enough information to act.
setup_agent
Dynamically configures the current agent session. Used during the bootstrap flow when setting up a new custom agent.
invoke_acp_agent
Invokes an external agent using the Agent Connect Protocol (ACP) . Requires acp_agents: configuration in config.yaml. See the Subagents page for ACP configuration.
tool_search
Searches for tools by name or description and loads them into the agent’s context on demand. Only active when tool_search.enabled: true in config.yaml. Useful when MCP or other tool sets expose many tools and you want to reduce context usage.
Sandbox file tools
The following tools interact with the sandbox filesystem. They require a sandbox to be configured and active.
| Tool | Description |
|---|---|
ls | List files in a directory |
read_file | Read file contents |
glob | Find files matching a pattern |
grep | Search file contents |
write_file | Write content to a file |
str_replace | Replace a string in a file |
bash | Execute a shell command (requires allow_host_bash: true or a container sandbox) |
These are configured in config.yaml under tools::
tools:
- use: deerflow.sandbox.tools:ls_tool
- use: deerflow.sandbox.tools:read_file_tool
- use: deerflow.sandbox.tools:glob_tool
- use: deerflow.sandbox.tools:grep_tool
- use: deerflow.sandbox.tools:write_file_tool
- use: deerflow.sandbox.tools:str_replace_tool
- use: deerflow.sandbox.tools:bash_tool # requires host bash or container sandboxCommunity tools
Community tools connect the agent to external services. They are configured in config.yaml under tools: using the use: field to specify the implementation.
Web search
DuckDuckGo (default)
tools:
- use: deerflow.community.ddg_search.tools:web_search_toolNo API key required. Default configuration. Suitable for development and general use.
Web fetch (page content extraction)
Jina AI (default)
tools:
- use: deerflow.community.jina_ai.tools:web_fetch_tool
api_key: $JINA_API_KEY # optional; anonymous usage has rate limitsConverts web pages to clean Markdown. Works without an API key at reduced rate limits.
Image search
tools:
- use: deerflow.community.image_search.tools:image_search_tool
# Or use InfoQuest:
# - use: deerflow.community.infoquest.tools:image_search_tool
# api_key: $INFOQUEST_API_KEYTool groups
Tool groups let you organize tools into named sets and restrict which groups a custom agent can access.
tool_groups:
- name: research
tools:
- web_search
- web_fetch
- image_search
- name: coding
tools:
- bash
- read_file
- write_file
- str_replace
- glob
- grepCustom agents can then reference a group by name in their configuration, restricting their tool access to only the relevant set.
Tool search (deferred loading)
When you have many tools (especially from multiple MCP servers), loading all of them upfront increases context usage and can confuse the model. The tool search feature addresses this:
tool_search:
enabled: trueWhen enabled, tools are not listed in the model’s context directly. Instead, they are discoverable at runtime via the tool_search built-in tool. The agent searches by name or description and the matching tools are loaded into context on demand.
This is particularly useful when MCP servers expose dozens of tools.