---
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

## 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

## Other responses

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

## Changes

- **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/50e1d517afc1/schema)
