---
title: "Update agent configuration"
method: PATCH
path: "/settings/agent"
tags: ["settings"]
---

# Update agent configuration

`PATCH /settings/agent`

Updates the AI agent configuration. Requires admin role.

## Query parameters

- `remoteNode` string

## Request body

- UpdateAgentConfigRequest — Request to update AI agent configuration
  - `enabled` boolean — Whether the AI agent is enabled
  - `defaultModelId` string — ID of the default model
  - `toolPolicy` AgentToolPolicy — Global tool permission policy for AI agent sessions
    - `tools` object — Per-tool enable/disable map
    - `bash` AgentBashPolicy — Granular command policy for the bash tool
      - `rules` AgentBashRule[]
        - `name` string
        - `pattern` string, required — Regex pattern matched against each shell command segment
        - `action` 'allow' | 'deny', required
        - `enabled` boolean — Rule enabled state (default: true when omitted)
      - `defaultBehavior` 'allow' | 'deny' — Behavior when no rule matches a command segment
      - `denyBehavior` 'ask_user' | 'block' — Behavior when a command segment is denied
  - `selectedSoulId` string, nullable — ID of the soul to select
  - `webSearch` AgentWebSearchConfig — Provider-native web search configuration for agent sessions
    - `enabled` boolean — Whether provider-native web search is enabled
    - `maxUses` integer — Maximum number of search invocations per request
  - `webTools` AgentWebToolsConfig — First-class web_search and web_extract tool configuration
    - `enabled` boolean — Whether provider-backed web tools are enabled
    - `backend` 'tavily' | 'firecrawl' — Backend provider for agent web tools
    - `tavily` AgentTavilyWebToolsConfig — Tavily web tool settings
      - `apiKey` string — Tavily API key. Write-only; omitted from responses.
      - `clearApiKey` boolean — Clear the stored Tavily API key when true
      - `apiKeyConfigured` boolean — Whether a Tavily API key is stored
      - `baseUrl` string, uri — Optional Tavily-compatible base URL
      - `maxResults` integer — Maximum search results allowed per web_search call
      - `searchDepth` 'basic' | 'advanced' | 'fast' | 'ultra-fast' — Tavily search depth
    - `firecrawl` AgentFirecrawlWebToolsConfig — Firecrawl web tool settings
      - `apiKey` string — Firecrawl API key. Write-only; omitted from responses.
      - `clearApiKey` boolean — Clear the stored Firecrawl API key when true
      - `apiKeyConfigured` boolean — Whether a Firecrawl API key is stored
      - `baseUrl` string, uri — Optional Firecrawl-compatible base URL
      - `maxResults` integer — Maximum search results allowed per web_search call

## Response `200`

Updated agent configuration

- AgentConfigResponse — AI Agent configuration
  - `enabled` boolean — Whether the AI agent is enabled
  - `defaultModelId` string — ID of the default model
  - `toolPolicy` AgentToolPolicy — Global tool permission policy for AI agent sessions
    - `tools` object — Per-tool enable/disable map
    - `bash` AgentBashPolicy — Granular command policy for the bash tool
      - `rules` AgentBashRule[]
        - `name` string
        - `pattern` string, required — Regex pattern matched against each shell command segment
        - `action` 'allow' | 'deny', required
        - `enabled` boolean — Rule enabled state (default: true when omitted)
      - `defaultBehavior` 'allow' | 'deny' — Behavior when no rule matches a command segment
      - `denyBehavior` 'ask_user' | 'block' — Behavior when a command segment is denied
  - `selectedSoulId` string, nullable — ID of the currently selected soul
  - `webSearch` AgentWebSearchConfig — Provider-native web search configuration for agent sessions
    - `enabled` boolean — Whether provider-native web search is enabled
    - `maxUses` integer — Maximum number of search invocations per request
  - `webTools` AgentWebToolsConfig — First-class web_search and web_extract tool configuration
    - `enabled` boolean — Whether provider-backed web tools are enabled
    - `backend` 'tavily' | 'firecrawl' — Backend provider for agent web tools
    - `tavily` AgentTavilyWebToolsConfig — Tavily web tool settings
      - `apiKey` string — Tavily API key. Write-only; omitted from responses.
      - `clearApiKey` boolean — Clear the stored Tavily API key when true
      - `apiKeyConfigured` boolean — Whether a Tavily API key is stored
      - `baseUrl` string, uri — Optional Tavily-compatible base URL
      - `maxResults` integer — Maximum search results allowed per web_search call
      - `searchDepth` 'basic' | 'advanced' | 'fast' | 'ultra-fast' — Tavily search depth
    - `firecrawl` AgentFirecrawlWebToolsConfig — Firecrawl web tool settings
      - `apiKey` string — Firecrawl API key. Write-only; omitted from responses.
      - `clearApiKey` boolean — Clear the stored Firecrawl API key when true
      - `apiKeyConfigured` boolean — Whether a Firecrawl API key is stored
      - `baseUrl` string, uri — Optional Firecrawl-compatible base URL
      - `maxResults` integer — Maximum search results allowed per web_search call

## Other responses

- `400` — Invalid request
- `401` — Not authenticated
- `403` — Requires admin role
- `default` — Unexpected error

## Changes

- **2026-05-07** (v1) `2d4e9d9ad0e2` — 2 info
  - added the new optional request property `webTools`
  - added the optional property `webTools` to the response with the `200` status
- **2026-04-30** (v1) `50e1d517afc1` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/dagucloud/apis/dagu/changes/settings/agent/patch.md)

---

[API](https://skmtc.dev/dagucloud/apis/dagu.md) · [All operations](https://skmtc.dev/dagucloud/apis/dagu/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dagucloud/dagu/revisions/0cce8472f3ba/schema)
