fix the lint errors in frontend

This commit is contained in:
Willem Jiang
2026-04-26 15:11:22 +08:00
parent 829e82a9af
commit 28381e1383
46 changed files with 456 additions and 357 deletions
@@ -11,10 +11,10 @@ DeerFlow App is configured through two files and a set of environment variables.
## Configuration files
| File | Purpose |
|---|---|
| `config.yaml` | Backend configuration: models, sandbox, tools, skills, memory, and all Harness settings |
| `extensions_config.json` | MCP servers and skill enable/disable state (managed by the App UI and Gateway API) |
| File | Purpose |
| ------------------------ | --------------------------------------------------------------------------------------- |
| `config.yaml` | Backend configuration: models, sandbox, tools, skills, memory, and all Harness settings |
| `extensions_config.json` | MCP servers and skill enable/disable state (managed by the App UI and Gateway API) |
Frontend environment variables control the Next.js build and runtime behavior.
@@ -144,6 +144,7 @@ sandbox:
```
Install: `cd backend && uv add 'deerflow-harness[aio-sandbox]'`
</Tabs.Tab>
<Tabs.Tab>
```yaml
@@ -161,7 +162,7 @@ Configure which tools the agent has access to. The defaults use DuckDuckGo (no A
```yaml
tools:
# Web search (choose one)
- use: deerflow.community.ddg_search.tools:web_search_tool # default, no key required
- use: deerflow.community.ddg_search.tools:web_search_tool # default, no key required
# - use: deerflow.community.tavily.tools:web_search_tool
# api_key: $TAVILY_API_KEY
@@ -188,7 +189,7 @@ By default, DeerFlow uses an SQLite checkpointer for thread state persistence:
```yaml
checkpointer:
type: sqlite
connection_string: checkpoints.db # stored in backend/.deer-flow/
connection_string: checkpoints.db # stored in backend/.deer-flow/
```
For production deployments with multiple processes:
@@ -224,12 +225,12 @@ memory:
Set these before running `pnpm build` or starting the frontend in production:
| Variable | Required | Description |
|---|---|---|
| `BETTER_AUTH_SECRET` | **Required** in production | Secret for session signing. Use `openssl rand -base64 32`. |
| `BETTER_AUTH_URL` | Recommended | Public-facing base URL (e.g., `https://your-domain.com`) |
| `SKIP_ENV_VALIDATION` | Optional | Set to `1` to skip env validation during build (not recommended) |
| `NEXT_PUBLIC_API_URL` | Optional | Override the API base URL for the frontend |
| Variable | Required | Description |
| --------------------- | -------------------------- | ---------------------------------------------------------------- |
| `BETTER_AUTH_SECRET` | **Required** in production | Secret for session signing. Use `openssl rand -base64 32`. |
| `BETTER_AUTH_URL` | Recommended | Public-facing base URL (e.g., `https://your-domain.com`) |
| `SKIP_ENV_VALIDATION` | Optional | Set to `1` to skip env validation during build (not recommended) |
| `NEXT_PUBLIC_API_URL` | Optional | Override the API base URL for the frontend |
In development, set these in a `.env` file at the repo root:
@@ -268,6 +269,12 @@ make config-upgrade
```
<Cards num={2}>
<Cards.Card title="Deployment Guide" href="/docs/application/deployment-guide" />
<Cards.Card title="Harness Configuration" href="/docs/harness/configuration" />
<Cards.Card
title="Deployment Guide"
href="/docs/application/deployment-guide"
/>
<Cards.Card
title="Harness Configuration"
href="/docs/harness/configuration"
/>
</Cards>
@@ -1,5 +1,5 @@
---
title: Deployment Guide
title: Deployment Guide
description: "This guide covers all supported deployment methods for DeerFlow App: local development, Docker Compose, and production with Kubernetes-managed sandboxes."
---
+19 -16
View File
@@ -17,15 +17,15 @@ DeerFlow App is the reference implementation of what a production DeerFlow exper
## What the App provides
| Capability | Description |
|---|---|
| **Web workspace** | Browser-based conversation UI with support for threads, artifacts, file uploads, and skill selection |
| **Custom agents** | Create and manage named agents with different models, skills, and tool sets |
| **Thread management** | Persistent conversation threads with checkpointing and history |
| **Streaming responses** | Real-time token streaming with thinking steps and tool call visibility |
| **Artifact viewer** | In-browser preview and download of files and outputs produced by the agent |
| **Extensions UI** | Enable/disable MCP servers and skills without editing config files |
| **Gateway API** | FastAPI-based REST API that bridges the frontend and the LangGraph runtime |
| Capability | Description |
| ----------------------- | ---------------------------------------------------------------------------------------------------- |
| **Web workspace** | Browser-based conversation UI with support for threads, artifacts, file uploads, and skill selection |
| **Custom agents** | Create and manage named agents with different models, skills, and tool sets |
| **Thread management** | Persistent conversation threads with checkpointing and history |
| **Streaming responses** | Real-time token streaming with thinking steps and tool call visibility |
| **Artifact viewer** | In-browser preview and download of files and outputs produced by the agent |
| **Extensions UI** | Enable/disable MCP servers and skills without editing config files |
| **Gateway API** | FastAPI-based REST API that bridges the frontend and the LangGraph runtime |
## Architecture
@@ -58,15 +58,18 @@ The DeerFlow App runs as four services behind a single nginx reverse proxy:
## Technology stack
| Layer | Technology |
|---|---|
| Frontend | Next.js 16, React 19, TypeScript, pnpm |
| Gateway | FastAPI, Python 3.12, uvicorn |
| Agent runtime | LangGraph, LangChain, DeerFlow Harness |
| Reverse proxy | nginx |
| Layer | Technology |
| ----------------- | -------------------------------------------------------------------- |
| Frontend | Next.js 16, React 19, TypeScript, pnpm |
| Gateway | FastAPI, Python 3.12, uvicorn |
| Agent runtime | LangGraph, LangChain, DeerFlow Harness |
| Reverse proxy | nginx |
| State persistence | LangGraph Server (default) + optional SQLite/PostgreSQL checkpointer |
<Cards num={2}>
<Cards.Card title="Quick Start" href="/docs/application/quick-start" />
<Cards.Card title="Deployment Guide" href="/docs/application/deployment-guide" />
<Cards.Card
title="Deployment Guide"
href="/docs/application/deployment-guide"
/>
</Cards>
@@ -13,12 +13,12 @@ This page covers day-to-day operational tasks and solutions to common problems w
All services write logs to the `logs/` directory when started with `make dev`:
| File | Service |
|---|---|
| File | Service |
| -------------------- | ------------------------------------ |
| `logs/langgraph.log` | LangGraph / DeerFlow Harness runtime |
| `logs/gateway.log` | FastAPI Gateway API |
| `logs/frontend.log` | Next.js frontend dev server |
| `logs/nginx.log` | nginx reverse proxy |
| `logs/gateway.log` | FastAPI Gateway API |
| `logs/frontend.log` | Next.js frontend dev server |
| `logs/nginx.log` | nginx reverse proxy |
Tail logs in real time:
@@ -30,7 +30,7 @@ tail -f logs/gateway.log
Adjust the runtime log level in `config.yaml`:
```yaml
log_level: debug # debug | info | warning | error
log_level: debug # debug | info | warning | error
```
## Health checks
@@ -171,6 +171,9 @@ make dev
Individual service restart scripts are in `scripts/`. For targeted restarts, you can kill and relaunch individual processes manually using the PIDs in the log files.
<Cards num={2}>
<Cards.Card title="Deployment Guide" href="/docs/application/deployment-guide" />
<Cards.Card
title="Deployment Guide"
href="/docs/application/deployment-guide"
/>
<Cards.Card title="Configuration" href="/docs/application/configuration" />
</Cards>
@@ -24,13 +24,13 @@ make check
Required:
| Tool | Minimum version |
|---|---|
| Python | 3.12 |
| uv | latest |
| Node.js | 22 |
| pnpm | 10 |
| nginx | any recent version |
| Tool | Minimum version |
| ------- | ------------------ |
| Python | 3.12 |
| uv | latest |
| Node.js | 22 |
| pnpm | 10 |
| nginx | any recent version |
On macOS, install with `brew install python uv node pnpm nginx`. On Linux, use your distribution's package manager.
@@ -87,6 +87,7 @@ make dev
```
This starts:
- LangGraph server on port `2024`
- Gateway API on port `8001`
- Frontend on port `3000`
@@ -110,12 +111,12 @@ make stop
Log files:
| Service | Log file |
|---|---|
| Service | Log file |
| --------- | -------------------- |
| LangGraph | `logs/langgraph.log` |
| Gateway | `logs/gateway.log` |
| Frontend | `logs/frontend.log` |
| nginx | `logs/nginx.log` |
| Gateway | `logs/gateway.log` |
| Frontend | `logs/frontend.log` |
| nginx | `logs/nginx.log` |
<Callout type="tip">
If something is not working, check the log files first. Most startup errors
@@ -124,6 +125,9 @@ Log files:
</Callout>
<Cards num={2}>
<Cards.Card title="Deployment Guide" href="/docs/application/deployment-guide" />
<Cards.Card
title="Deployment Guide"
href="/docs/application/deployment-guide"
/>
<Cards.Card title="Configuration" href="/docs/application/configuration" />
</Cards>
@@ -74,6 +74,9 @@ If you have created custom agents, use the **Agent** selector in the input bar t
Custom agents may have different models, skills, tool sets, and system prompts. See [Agents and Threads](/docs/application/agents-and-threads) for how to create and manage custom agents.
<Cards num={2}>
<Cards.Card title="Agents and Threads" href="/docs/application/agents-and-threads" />
<Cards.Card
title="Agents and Threads"
href="/docs/application/agents-and-threads"
/>
<Cards.Card title="Configuration" href="/docs/application/configuration" />
</Cards>
@@ -81,7 +81,7 @@ models:
use: langchain_openai:ChatOpenAI
model: gpt-4o
api_key: $OPENAI_API_KEY
some_provider_specific_option: value # passed through to ChatOpenAI constructor
some_provider_specific_option: value # passed through to ChatOpenAI constructor
```
## Configuration version
@@ -104,27 +104,27 @@ This merges new fields from `config.example.yaml` into your existing `config.yam
The following table maps each top-level `config.yaml` section to its documentation page:
| Section | Description | Documentation |
|---|---|---|
| `log_level` | Logging level (`debug`/`info`/`warning`/`error`) | — |
| `models` | Available LLM models | [Lead Agent](/docs/harness/lead-agent) |
| `token_usage` | Token tracking per model call | [Middlewares](/docs/harness/middlewares) |
| `tools` | Available agent tools | [Tools](/docs/harness/tools) |
| `tool_groups` | Named groups of tools | [Tools](/docs/harness/tools) |
| `tool_search` | Deferred/on-demand tool loading | [Tools](/docs/harness/tools) |
| `sandbox` | Sandbox provider and options | [Sandbox](/docs/harness/sandbox) |
| `skills` | Skills directory and container path | [Skills](/docs/harness/skills) |
| `skill_evolution` | Agent-managed skill creation | [Skills](/docs/harness/skills) |
| `subagents` | Subagent timeouts and max turns | [Subagents](/docs/harness/subagents) |
| `acp_agents` | External ACP agent integrations | [Subagents](/docs/harness/subagents) |
| `memory` | Cross-session memory storage | [Memory](/docs/harness/memory) |
| `summarization` | Conversation summarization | [Middlewares](/docs/harness/middlewares) |
| `title` | Automatic thread title generation | [Middlewares](/docs/harness/middlewares) |
| `checkpointer` | Thread state persistence | [Agents & Threads](/docs/application/agents-and-threads) |
| `guardrails` | Tool call authorization | — |
| `stream_bridge` | Streaming configuration | — |
| `uploads` | File upload settings (PDF converter) | — |
| `channels` | IM channel integrations (Feishu, Slack, etc.) | — |
| Section | Description | Documentation |
| ----------------- | ------------------------------------------------ | -------------------------------------------------------- |
| `log_level` | Logging level (`debug`/`info`/`warning`/`error`) | — |
| `models` | Available LLM models | [Lead Agent](/docs/harness/lead-agent) |
| `token_usage` | Token tracking per model call | [Middlewares](/docs/harness/middlewares) |
| `tools` | Available agent tools | [Tools](/docs/harness/tools) |
| `tool_groups` | Named groups of tools | [Tools](/docs/harness/tools) |
| `tool_search` | Deferred/on-demand tool loading | [Tools](/docs/harness/tools) |
| `sandbox` | Sandbox provider and options | [Sandbox](/docs/harness/sandbox) |
| `skills` | Skills directory and container path | [Skills](/docs/harness/skills) |
| `skill_evolution` | Agent-managed skill creation | [Skills](/docs/harness/skills) |
| `subagents` | Subagent timeouts and max turns | [Subagents](/docs/harness/subagents) |
| `acp_agents` | External ACP agent integrations | [Subagents](/docs/harness/subagents) |
| `memory` | Cross-session memory storage | [Memory](/docs/harness/memory) |
| `summarization` | Conversation summarization | [Middlewares](/docs/harness/middlewares) |
| `title` | Automatic thread title generation | [Middlewares](/docs/harness/middlewares) |
| `checkpointer` | Thread state persistence | [Agents & Threads](/docs/application/agents-and-threads) |
| `guardrails` | Tool call authorization | — |
| `stream_bridge` | Streaming configuration | — |
| `uploads` | File upload settings (PDF converter) | — |
| `channels` | IM channel integrations (Feishu, Slack, etc.) | — |
## Minimal config to get started
@@ -157,6 +157,12 @@ tools:
Start from `config.example.yaml` in the repository root and uncomment the sections you need.
<Cards num={2}>
<Cards.Card title="Deployment Guide" href="/docs/application/deployment-guide" />
<Cards.Card title="Application Configuration" href="/docs/application/configuration" />
<Cards.Card
title="Deployment Guide"
href="/docs/application/deployment-guide"
/>
<Cards.Card
title="Application Configuration"
href="/docs/application/configuration"
/>
</Cards>
@@ -170,6 +170,9 @@ guardrails:
For custom guardrail logic, implement a class with `evaluate()` and `aevaluate()` methods and reference it via `use:`.
<Cards num={2}>
<Cards.Card title="Integration Guide" href="/docs/harness/integration-guide" />
<Cards.Card
title="Integration Guide"
href="/docs/harness/integration-guide"
/>
<Cards.Card title="Configuration" href="/docs/harness/configuration" />
</Cards>
@@ -110,15 +110,15 @@ Environment variable interpolation (`api_key: $OPENAI_API_KEY`) keeps secrets ou
## Summary
| Principle | What it means in practice |
|---|---|
| Harness, not framework | Ready-to-run runtime with all the infrastructure already wired |
| Long-horizon first | Architecture assumes multi-step, multi-tool, multi-turn tasks |
| Middleware over inheritance | Behavior is composed from small, isolated plugins |
| Skills for specialization | Domain capability injected on demand, keeping the base clean |
| Sandbox for execution | Isolated workspace for real file and command work |
| Context engineering | Active management of what the agent sees to stay effective |
| Config-driven | All key behaviors are controlled through `config.yaml` |
| Principle | What it means in practice |
| --------------------------- | -------------------------------------------------------------- |
| Harness, not framework | Ready-to-run runtime with all the infrastructure already wired |
| Long-horizon first | Architecture assumes multi-step, multi-tool, multi-turn tasks |
| Middleware over inheritance | Behavior is composed from small, isolated plugins |
| Skills for specialization | Domain capability injected on demand, keeping the base clean |
| Sandbox for execution | Isolated workspace for real file and command work |
| Context engineering | Active management of what the agent sees to stay effective |
| Config-driven | All key behaviors are controlled through `config.yaml` |
<Cards num={2}>
<Cards.Card title="Lead Agent" href="/docs/harness/lead-agent" />
@@ -141,9 +141,9 @@ The same Lead Agent runtime powers both the default agent and any custom agents
Custom agents are created through the DeerFlow App UI or via the `/api/agents` endpoint. Their configuration is stored in `agents/{name}/config.yaml` relative to the backend directory.
<Callout type="tip">
When a custom agent is selected in a thread, the Lead Agent loads that
agent's config at runtime. Switching models or skills for a specific agent
does not require restarting the server.
When a custom agent is selected in a thread, the Lead Agent loads that agent's
config at runtime. Switching models or skills for a specific agent does not
require restarting the server.
</Callout>
## Bootstrap mode
+2
View File
@@ -44,6 +44,7 @@ The default location is the project root (same directory as `config.yaml`). The
```
Each server entry supports:
- `command`: the executable to run (e.g., `npx`, `uvx`, `python`)
- `args`: command arguments as an array
- `enabled`: whether the server is active (can be toggled without removing the entry)
@@ -92,6 +93,7 @@ With tool search enabled, MCP tools are listed by name in the system prompt but
Some MCP servers require OAuth authentication. DeerFlow's `mcp/oauth.py` handles the OAuth flow for servers that declare OAuth requirements in their capability headers.
When an OAuth-protected MCP server is connected, DeerFlow will:
1. Detect the OAuth requirement from the server's capability headers
2. Build the appropriate authorization headers using `get_initial_oauth_headers()`
3. Wrap tool calls with an OAuth interceptor via `build_oauth_tool_interceptor()`
@@ -89,7 +89,7 @@ title:
enabled: true
max_words: 6
max_chars: 60
model_name: null # use default model
model_name: null # use default model
```
---
@@ -159,7 +159,7 @@ summarization:
# Trigger conditions — summarization runs when ANY threshold is met
trigger:
- type: tokens # trigger when context exceeds N tokens
- type: tokens # trigger when context exceeds N tokens
value: 15564
# - type: messages # trigger when there are more than N messages
# value: 50
@@ -169,7 +169,7 @@ summarization:
# How much recent history to keep after summarization
keep:
type: messages
value: 10 # keep the 10 most recent messages
value: 10 # keep the 10 most recent messages
# Alternative: keep by tokens
# type: tokens
# value: 3000
@@ -182,6 +182,7 @@ summarization:
```
**Trigger types**:
- `tokens`: triggers when the total token count in the conversation exceeds `value`.
- `messages`: triggers when the number of messages exceeds `value`.
- `fraction`: triggers when the context reaches `value` fraction of the model's maximum input token limit.
@@ -189,6 +190,7 @@ summarization:
Multiple triggers can be listed; summarization runs when **any** of them fires.
**Keep types**:
- `messages`: keep the last `value` messages after summarization.
- `tokens`: keep up to `value` tokens of recent history.
- `fraction`: keep up to `value` fraction of the model's max input token limit.
@@ -85,15 +85,15 @@ agent = create_deerflow_agent(
Common parameters:
| Parameter | Description |
|---|---|
| `tools` | Additional tools available to the agent |
| `system_prompt` | Custom system prompt |
| `features` | Enable or replace built-in runtime features |
| Parameter | Description |
| ------------------ | ----------------------------------------------- |
| `tools` | Additional tools available to the agent |
| `system_prompt` | Custom system prompt |
| `features` | Enable or replace built-in runtime features |
| `extra_middleware` | Insert custom middleware into the default chain |
| `plan_mode` | Enable Todo-style task tracking |
| `checkpointer` | Persist agent state across runs |
| `name` | Logical agent name |
| `plan_mode` | Enable Todo-style task tracking |
| `checkpointer` | Persist agent state across runs |
| `name` | Logical agent name |
## When to use DeerFlowClient instead
@@ -109,7 +109,10 @@ Use `DeerFlowClient` when you want the higher-level embedded app interface, such
## Next steps
<Cards num={3}>
<Cards.Card title="Design Principles" href="/docs/harness/design-principles" />
<Cards.Card
title="Design Principles"
href="/docs/harness/design-principles"
/>
<Cards.Card title="Lead Agent" href="/docs/harness/lead-agent" />
<Cards.Card title="Configuration" href="/docs/harness/configuration" />
</Cards>
+8 -8
View File
@@ -9,8 +9,8 @@ import { Callout, Cards, Tabs } from "nextra/components";
<Callout type="info" emoji="📦">
The sandbox is the isolated workspace where the agent does file and
command-based work. It is what makes DeerFlow capable of real action, not
just conversation.
command-based work. It is what makes DeerFlow capable of real action, not just
conversation.
</Callout>
The sandbox gives the Lead Agent a controlled environment where it can read files, write outputs, run shell commands, and produce artifacts. Without a sandbox, the agent can only generate text. With a sandbox, it can write and execute code, process data files, generate charts, and build deliverables.
@@ -29,7 +29,7 @@ Commands run directly on the host machine's filesystem. There is no container is
```yaml
sandbox:
use: deerflow.sandbox.local:LocalSandboxProvider
allow_host_bash: false # default; set to true only for fully trusted workflows
allow_host_bash: false # default; set to true only for fully trusted workflows
```
### Container-based AIO Sandbox
@@ -83,10 +83,10 @@ The provisioner service is included in `docker/docker-compose-dev.yaml` and mana
The sandbox uses path mappings to bridge the host filesystem and the container's virtual filesystem. Two key mappings are always configured:
| Host path | Container path | Access |
|---|---|---|
| `skills/` (from `skills.path`) | `/mnt/skills` (from `skills.container_path`) | Read-only |
| `.deer-flow/threads/{thread_id}/user-data/` | `/mnt/user-data/` | Read-write |
| Host path | Container path | Access |
| ------------------------------------------- | -------------------------------------------- | ---------- |
| `skills/` (from `skills.path`) | `/mnt/skills` (from `skills.container_path`) | Read-only |
| `.deer-flow/threads/{thread_id}/user-data/` | `/mnt/user-data/` | Read-write |
The skills directory is always mounted read-only. Threads write their working data (uploads, outputs, intermediate files) to `/mnt/user-data/`.
@@ -136,7 +136,7 @@ The `LocalSandbox` runs commands directly on the host. By default, the `bash` to
```yaml
sandbox:
allow_host_bash: true # Dangerous: grants the agent shell access to your machine
allow_host_bash: true # Dangerous: grants the agent shell access to your machine
```
Even without `bash`, the agent can still read and write files through the dedicated file tools.
+19 -19
View File
@@ -44,23 +44,23 @@ The `SKILL.md` file is the authoritative definition of the skill. It is parsed b
DeerFlow ships with the following public skills:
| Skill | Description |
|---|---|
| `deep-research` | Multi-step research with source gathering, cross-checking, and structured output |
| `data-analysis` | Data exploration, statistical analysis, and insight generation |
| `chart-visualization` | Chart and graph creation from data |
| `ppt-generation` | Presentation slide generation |
| `image-generation` | AI image generation workflows |
| `code-documentation` | Automated code documentation generation |
| `newsletter-generation` | Newsletter content creation |
| `podcast-generation` | Podcast script and outline generation |
| `academic-paper-review` | Structured academic paper analysis |
| `consulting-analysis` | Business consulting frameworks and analysis |
| `systematic-literature-review` | Literature review methodology and synthesis |
| `github-deep-research` | Repository and code deep-dive research |
| `frontend-design` | Frontend design and UI workflow |
| `web-design-guidelines` | Web design standards and review |
| `video-generation` | Video content planning and generation |
| Skill | Description |
| ------------------------------ | -------------------------------------------------------------------------------- |
| `deep-research` | Multi-step research with source gathering, cross-checking, and structured output |
| `data-analysis` | Data exploration, statistical analysis, and insight generation |
| `chart-visualization` | Chart and graph creation from data |
| `ppt-generation` | Presentation slide generation |
| `image-generation` | AI image generation workflows |
| `code-documentation` | Automated code documentation generation |
| `newsletter-generation` | Newsletter content creation |
| `podcast-generation` | Podcast script and outline generation |
| `academic-paper-review` | Structured academic paper analysis |
| `consulting-analysis` | Business consulting frameworks and analysis |
| `systematic-literature-review` | Literature review methodology and synthesis |
| `github-deep-research` | Repository and code deep-dive research |
| `frontend-design` | Frontend design and UI workflow |
| `web-design-guidelines` | Web design standards and review |
| `video-generation` | Video content planning and generation |
## Skill lifecycle
@@ -139,8 +139,8 @@ DeerFlow includes an optional **skill evolution** feature that allows the agent
```yaml
skill_evolution:
enabled: false # Set to true to allow agent-managed skill creation
moderation_model_name: null # Model for security scanning (null = use default)
enabled: false # Set to true to allow agent-managed skill creation
moderation_model_name: null # Model for security scanning (null = use default)
```
<Callout type="warning">
@@ -75,10 +75,10 @@ subagents:
# Optional: per-agent overrides
agents:
general-purpose:
timeout_seconds: 1800 # 30 minutes for complex tasks
timeout_seconds: 1800 # 30 minutes for complex tasks
max_turns: 160
bash:
timeout_seconds: 300 # 5 minutes for quick commands
timeout_seconds: 300 # 5 minutes for quick commands
max_turns: 80
```
@@ -122,8 +122,8 @@ The Lead Agent invokes ACP agents through the `invoke_acp_agent` built-in tool.
<Callout type="tip">
ACP agents run as child processes managed by DeerFlow. They communicate over
the ACP wire protocol. The standard CLI tools (like the plain `claude` or
`codex` commands) are not ACP-compatible by default — use the adapter
packages listed above or a compatible ACP wrapper.
`codex` commands) are not ACP-compatible by default — use the adapter packages
listed above or a compatible ACP wrapper.
</Callout>
## Custom agents as subagents
+23 -31
View File
@@ -78,15 +78,15 @@ Searches for tools by name or description and loads them into the agent's contex
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) |
| 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:`:
@@ -98,7 +98,7 @@ tools:
- 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 sandbox
- use: deerflow.sandbox.tools:bash_tool # requires host bash or container sandbox
```
## Community tools
@@ -124,6 +124,7 @@ tools:
High-quality search with structured results. Requires a [Tavily](https://tavily.com) API key.
Install: `cd backend && uv add 'deerflow-harness[tavily]'`
</Tabs.Tab>
<Tabs.Tab>
```yaml
@@ -134,6 +135,7 @@ tools:
Semantic search with neural retrieval. Requires an [Exa](https://exa.ai) API key.
Install: `cd backend && uv add 'deerflow-harness[exa]'`
</Tabs.Tab>
<Tabs.Tab>
```yaml
@@ -152,6 +154,7 @@ tools:
Firecrawl-powered search and crawl. Requires a [Firecrawl](https://firecrawl.dev) API key.
Install: `cd backend && uv add 'deerflow-harness[firecrawl]'`
</Tabs.Tab>
</Tabs>
@@ -159,33 +162,22 @@ Install: `cd backend && uv add 'deerflow-harness[firecrawl]'`
<Tabs items={["Jina AI (default)", "Exa", "InfoQuest", "Firecrawl"]}>
<Tabs.Tab>
```yaml
tools:
- use: deerflow.community.jina_ai.tools:web_fetch_tool
api_key: $JINA_API_KEY # optional; anonymous usage has rate limits
```
Converts web pages to clean Markdown. Works without an API key at reduced rate limits.
```yaml tools: - use: deerflow.community.jina_ai.tools:web_fetch_tool
api_key: $JINA_API_KEY # optional; anonymous usage has rate limits ```
Converts web pages to clean Markdown. Works without an API key at reduced
rate limits.
</Tabs.Tab>
<Tabs.Tab>
```yaml
tools:
- use: deerflow.community.exa.tools:web_fetch_tool
api_key: $EXA_API_KEY
```
```yaml tools: - use: deerflow.community.exa.tools:web_fetch_tool api_key:
$EXA_API_KEY ```
</Tabs.Tab>
<Tabs.Tab>
```yaml
tools:
- use: deerflow.community.infoquest.tools:web_fetch_tool
api_key: $INFOQUEST_API_KEY
```
```yaml tools: - use: deerflow.community.infoquest.tools:web_fetch_tool
api_key: $INFOQUEST_API_KEY ```
</Tabs.Tab>
<Tabs.Tab>
```yaml
tools:
- use: deerflow.community.firecrawl.tools:web_fetch_tool
api_key: $FIRECRAWL_API_KEY
```
```yaml tools: - use: deerflow.community.firecrawl.tools:web_fetch_tool
api_key: $FIRECRAWL_API_KEY ```
</Tabs.Tab>
</Tabs>
@@ -35,6 +35,7 @@ Press Enter to send.
### Watch the agent work
You will see the agent start working:
- Expand the **thinking steps** to see which tools it is calling
- Watch search results stream in
- Wait for the final report to be generated
@@ -42,6 +43,7 @@ You will see the agent start working:
### Interact with the result
Once the report is generated, you can:
- Ask for more detail on a specific section
- Ask to export the report as a file (the agent will use the `present_files` tool)
- Ask to create a chart based on the research findings
@@ -51,6 +53,7 @@ Once the report is generated, you can:
## What just happened
The agent used the DeerFlow Harness to:
1. Receive your message and add it to the thread state
2. Run the middleware chain (memory injection, title generation)
3. Call the LLM, which decided to search the web
@@ -33,6 +33,7 @@ tools:
Enable skills through the DeerFlow app's extensions panel, or edit `extensions_config.json` directly.
**Via the app UI:**
1. Open the DeerFlow app
2. Click the Extensions/Skills icon in the sidebar
3. Find `deep-research` and toggle it on
@@ -32,6 +32,7 @@ Memory works automatically through `MemoryMiddleware`:
## Example
**First conversation:**
```
I am a Python backend developer primarily using FastAPI and PostgreSQL.
My team follows PEP 8 and prefers type annotations everywhere.
@@ -39,6 +40,7 @@ Please remember this for future code suggestions.
```
**Later conversation** (no need to repeat background):
```
Help me write a user authentication module
```