update_agent
Modify an agent's configuration with partial updates, preserving unchanged fields while adjusting identity, appearance, or channels as needed.
Instructions
Update an agent's configuration with partial merge. Only the fields you provide are changed — everything else is preserved.
Field behavior:
Omitted field → not touched (keeps existing value)
Field with value → sets/overwrites that field
Field set to null → deletes that field from the agent config
Nested objects (identity, widgetConfig, voice, widgetConfig.cssVariables) are deep-merged: update_agent({ widgetConfig: { logoUrl: "https://..." } }) → only logoUrl changes, all other widgetConfig fields preserved
Arrays (channels, enabledTools) are replaced entirely: update_agent({ channels: ["web", "whatsapp"] }) → replaces the full channels array
Use this to configure WHO the agent is and HOW it looks. For defining WHAT the agent does in each conversation flow, use upsert_stage. For changing which tools the agent can call, use update_enabled_tools.
Requires role: owner, admin, or developer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agentId | Yes | The MongoDB ID of the agent | |
| name | No | Agent display name | |
| description | No | Agent description | |
| identity | No | Identity configuration for the agent (deep-merged) | |
| channels | No | Channels where this agent is active (replaces entire array). Valid: "web", "whatsapp", "telegram", "instagram", "discord", "phone" | |
| widgetConfig | No | Widget appearance and behavior (deep-merged). Set any field to null to remove it. Common fields: welcomeMessage, placeholder, headerText, starterPrompt, position ("bottom-right"/"bottom-left"), defaultLocale ("es"/"en"/"pt"/"fr"), avatarUrl, logoUrl, avatarScale, showPromptAvatar, avatar3dUrl, cssVariables (object), darkCssVariables (object), animations (object), effects (object). | |
| voice | No | Voice configuration (deep-merged). liveModel is admin-only and preserved automatically. | |
| channelPrompts | No | Per-channel system prompt overrides. Key = channel name, value = prompt text. Example: { "whatsapp": "Sé concisa, mensajes cortos" } |