Skip to main content
PATCH
/
v1
/
agents
/
{agent_id}
Update Agent
curl --request PATCH \
  --url https://api.example.com/v1/agents/{agent_id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "definition": {
    "pii_banner": "",
    "pii_info": "",
    "pii_lock": false,
    "pii_anonimization": [
      {
        "value": "PERSON",
        "label": "Name"
      },
      {
        "value": "EMAIL_ADDRESS",
        "label": "Email"
      },
      {
        "value": "PHONE_NUMBER",
        "label": "Phone Number"
      },
      {
        "value": "CREDIT_CARD",
        "label": "Credit Card"
      }
    ],
    "divider1": "",
    "guardrail_info": "",
    "guardrail_lock": false,
    "violence_and_hate": "Off",
    "sexual_content": "Off",
    "guns_and_weapons": "Off",
    "suicide": "Off",
    "crime": "Off",
    "toxicity": "Off",
    "bias": "Off",
    "profanity": "Off",
    "divider2": "",
    "guardrail_action": {
      "value": "flag",
      "label": "Flag with warning but proceed"
    },
    "guardrail_action_replace": "",
    "guardrail_action_human": "",
    "divider3": "",
    "prompt_defense": "",
    "prompt_lock": false,
    "jailbreak": false,
    "prompt_injection": false,
    "context_leak": false,
    "auto_model_pick": false,
    "auto_model_preference": "cost",
    "model": [
      "preset:cost"
    ],
    "parameter_preset": "default",
    "intro": "",
    "basic_params_section": "",
    "max_tokens": 64000,
    "temperature": 0.7,
    "top_p": 1,
    "top_k": 40,
    "timeout": 120,
    "divider_7": "",
    "penalty_section": "",
    "presence_penalty": 0.3,
    "frequency_penalty": 0.6,
    "stop_sequences": [],
    "divider_8": "",
    "reasoning_section": "",
    "enable_reasoning": true,
    "reasoning_effort": "Low",
    "divider": "",
    "reliability_section": "",
    "max_retries_per_model": 3,
    "retry_on_status_codes": [
      429,
      500,
      502,
      503,
      504
    ],
    "datacenter_fallback": true,
    "agentflow_enabled": false,
    "usage_limits_section": "",
    "usage_limits_maximum_request": 1000,
    "usage_limits_maximum_tokens": 2000000,
    "usage_limits_max_messages": 100,
    "usage_limits_agent_timeout": 120,
    "divider_11": "",
    "tool_calling_section": "",
    "parallel_tool_calls": true,
    "visuals_section": "",
    "hide_reasoning": false,
    "hide_workflow_progress": false,
    "tool_display_preset": "execution",
    "minimal_caret_only": true,
    "minimal_tool_message": "Thinking...",
    "citation_style": "text",
    "chat_input_placeholder": "Ask me anything...",
    "divider_visuals": "",
    "conversation_title_section": "",
    "agent_title_mode": "generate",
    "divider_conversation_title": "",
    "agentflow_section": "",
    "hide_state_transitions": false,
    "divider_13": "",
    "agent_flow_id": "<string>",
    "is_coworker": true,
    "preset_selector": "<string>",
    "introductory_message": "<string>",
    "persona": [
      {
        "text": "<string>",
        "definition": {
          "type": "doc",
          "content": []
        }
      }
    ],
    "tone": [
      {
        "text": "<string>",
        "definition": {
          "type": "doc",
          "content": []
        }
      }
    ],
    "extra_instructions": [
      {
        "text": "<string>",
        "definition": {
          "type": "doc",
          "content": []
        }
      }
    ],
    "tools": [],
    "mcp_servers": [],
    "workflows": [],
    "knowledge_bases": [],
    "coworkers": [],
    "base_tools": [
      {
        "title": "Human in the Loop",
        "description": "Human in the Loop",
        "category": "QuickAction",
        "enabled": false,
        "tool_display_icon": "PersonStanding",
        "tool_display_message_start": "Escalating to human operator...",
        "tool_display_message_end": "Escalated to human operator",
        "visible": true,
        "icon": "PersonStanding",
        "bg_color": "blue.50",
        "icon_color": "blue.500",
        "chatflow_usable": true,
        "deprecated": false,
        "type": "human_in_the_loop",
        "has_timeout": false,
        "handover_message": "You are now talking to the co-worker."
      },
      {
        "title": "Web Research",
        "description": "Search the web for information",
        "category": "QuickAction",
        "enabled": false,
        "tool_display_icon": "Globe",
        "tool_display_message_start": "Searching the web...",
        "tool_display_message_end": "Searched the web",
        "visible": true,
        "icon": "Globe",
        "bg_color": "#D1FADF",
        "icon_color": "#027A48",
        "chatflow_usable": true,
        "deprecated": false,
        "type": "web_research"
      },
      {
        "title": "Attach File",
        "description": "Attach a file to the conversation",
        "category": "QuickAction",
        "enabled": false,
        "tool_display_icon": "Cog",
        "tool_display_message_start": "Running tool...",
        "tool_display_message_end": "Tool complete",
        "visible": true,
        "icon": "Paperclip",
        "bg_color": "#EFF6FF",
        "icon_color": "#2B7FFF",
        "chatflow_usable": false,
        "deprecated": false,
        "type": "attach_file"
      },
      {
        "title": "Memory",
        "description": "Persistent memory during a single conversation",
        "category": "QuickAction",
        "enabled": false,
        "tool_display_icon": "Brain",
        "tool_display_message_start": "Accessing memory...",
        "tool_display_message_end": "Memory operation complete",
        "visible": true,
        "icon": "Brain",
        "bg_color": "#f5f3ff",
        "icon_color": "#8e51ff",
        "chatflow_usable": true,
        "deprecated": false,
        "type": "memory"
      },
      {
        "title": "File System",
        "description": "Access and read files in the current session",
        "category": "QuickAction",
        "enabled": true,
        "tool_display_icon": "FolderOpen",
        "tool_display_message_start": "Accessing file system...",
        "tool_display_message_end": "File system operation complete",
        "visible": false,
        "icon": "FolderOpen",
        "bg_color": "#fef3c7",
        "icon_color": "#f59e0b",
        "chatflow_usable": true,
        "deprecated": false,
        "type": "filesystem"
      },
      {
        "title": "Code Execution",
        "description": "Run Python code in a sandboxed environment",
        "category": "QuickAction",
        "enabled": false,
        "tool_display_icon": "Terminal",
        "tool_display_message_start": "Running code...",
        "tool_display_message_end": "Code executed",
        "visible": true,
        "icon": "Terminal",
        "bg_color": "#fef9c3",
        "icon_color": "#ca8a04",
        "chatflow_usable": true,
        "deprecated": false,
        "type": "code_execution",
        "timeout": 120
      }
    ],
    "actions": [],
    "chatflow_tools": []
  },
  "visible": true,
  "image_url": "<string>",
  "app_settings_v2": {
    "is_active": false,
    "version_id": "<string>",
    "interface_type": "slack",
    "extra_settings": {},
    "published_at": "2023-11-07T05:31:56Z"
  },
  "is_app_published": true
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "definition": {},
  "description": "<string>",
  "visible": true,
  "image_url": "<string>",
  "last_updated_at": "2023-11-07T05:31:56Z",
  "deleted_at": "2023-11-07T05:31:56Z",
  "app_settings_v2": {
    "is_active": false,
    "version_id": "<string>",
    "interface_type": "slack",
    "extra_settings": {},
    "published_at": "2023-11-07T05:31:56Z"
  },
  "is_app_published": true,
  "allow_public_access": false,
  "meta": {
    "template_id": "<string>"
  }
}

Authorizations

X-API-Key
string
header
required

Path Parameters

agent_id
string
required

Query Parameters

preview
boolean
default:false

Preview changes without saving

Body

application/json
name
string | null
description
string | null
definition
CoWorkerSettings · object
visible
boolean | null
image_url
string | null
app_settings_v2
AppSettingsV2 · object
is_app_published
boolean | null

Response

Successful Response

id
string<uuid>
required
group_id
string<uuid>
required
name
string
required
definition
Definition · object
required
description
string | null
visible
boolean
default:true
image_url
string | null
last_updated_at
string<date-time> | null
deleted_at
string<date-time> | null
app_settings_v2
AppSettingsV2 · object
is_app_published
boolean | null
allow_public_access
boolean
default:false
meta
AssistantMeta · object