HighLevel: Update Agent — conversation Ai update Agent
HighLevel conversationAi.updateAgent: arguments, response, policy and SDK examples.
← Conversation AI operations · Get started
Operation gohighlevel.update_agent
Provider route: PUT /conversation-ai/agents/{agentId}. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/gohighlevel with npm, or alter-sdk-gohighlevel with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { HighLevelIntegration } from "@alter-ai/gohighlevel";
async function execute(input: Parameters<HighLevelIntegration["conversationAi"]["updateAgent"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new HighLevelIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.conversationAi.updateAgent(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_gohighlevel import HighLevelIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = HighLevelIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.conversation_ai.update_agent(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.agentId | string | Required within parent | |
body | Model | Required within parent | Expand Update Agent — conversation Ai update Agent — request body — body |
Referenced models: Update Agent — conversation Ai update Agent — request body — body
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Create an Agent — response body |
Referenced models: Create an Agent — response body
Schemas
Section titled “Schemas”Create an Agent — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
actions | array | Required within parent | List of actions associated with this agent. |
actions[] | Model | Each item | Expand Create an Agent — response body — actions item |
autoPilotMaxMessages | JSON | Required within parent | |
autoPilotMaxMessages (anyOf 1) | number | Alternative | Maximum number of messages in auto-pilot mode before requiring human intervention. |
autoPilotMaxMessages (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
businessName | string | Optional | Name of the business the agent represents. |
channels | array | Required within parent | Communication channels the agent operates on. |
channels[] | string | Each item | Known values: IG, FB, SMS, WebChat, WhatsApp, Live_Chat |
goal | string | Optional | The goal of the agent. |
id | string | Required within parent | Unique identifier for the agent. |
instructions | string | Optional | Instructions for the agent. |
isPrimary | boolean | Required within parent | Indicates if this agent is a primary agent. |
knowledgeBaseIds | array | Optional | Array of knowledge base IDs associated with this agent. |
knowledgeBaseIds[] | string | Each item | |
mode | string | Required within parent | Current operating mode of the agent. Known values: off, suggestive, auto-pilot |
name | string | Required within parent | Name of the agent. |
personality | string | Optional | Personality traits of the agent. |
sleepEnabled | boolean | Required within parent | Indicates if sleep functionality is enabled. |
sleepOnManualMessage | boolean | Optional | Whether the bot sleeps on manual outbound messages. |
sleepOnWorkflowMessage | boolean | Optional | Whether the bot sleeps on workflow outbound messages. |
sleepTime | JSON | Optional | |
sleepTime (anyOf 1) | number | Alternative | Duration of sleep period. |
sleepTime (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
sleepTimeUnit | string | Optional | Unit of sleep time. Known values: hours, minutes, seconds |
waitTime | JSON | Required within parent | |
waitTime (anyOf 1) | number | Alternative | Wait time before agent responds. |
waitTime (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
waitTimeUnit | string | Required within parent | Unit for wait time. Known values: minutes, seconds |
Referenced models: Create an Agent — response body — actions item
Update Agent — conversation Ai update Agent — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
autoPilotMaxMessages | number | Required within parent | Maximum number of messages in auto-pilot mode before requiring human intervention. (max: 100, min: 1) Default: 75 |
businessName | string | Optional | Name of the business the agent represents. |
channels | array | Optional | Channels the agent can use. |
channels[] | string | Each item | One of: IG, FB, SMS, WebChat, WhatsApp, Live_Chat |
goal | string | Optional | The goal of the agent. |
instructions | string | Optional | Instructions for the agent. |
isPrimary | boolean | Optional | Indicates if this agent is a primary agent. |
knowledgeBaseIds | array | Optional | Array of knowledge base IDs associated with this agent. |
knowledgeBaseIds[] | string | Each item | |
mode | string | Optional | Mode of operation for the agent, required if primary is enabled. One of: off, suggestive, auto-pilot |
name | string | Optional | Name of the agent. |
personality | string | Optional | Personality traits of the agent. |
respondToAudio | boolean | Optional | Allow agent to respond to audio Default: false |
respondToImages | boolean | Optional | Allow agent to respond to images Default: false |
sleepEnabled | boolean | Optional | Indicates if sleep functionality is enabled. |
sleepOnManualMessage | boolean | Optional | Enable sleep when a manual outbound message is sent. |
sleepOnWorkflowMessage | boolean | Optional | Enable sleep when a workflow outbound message is sent. |
sleepTime | number | Optional | Duration of sleep period (required if sleepEnabled is true). Set to null for indefinite sleep. (max 2880 for minutes, 172800 for seconds, 48 for hours) |
sleepTimeUnit | string | Optional | Unit of sleep time - HOURS, MINUTES, or SECONDS (required if sleepEnabled is true). Set to null for indefinite sleep. One of: hours, minutes, seconds |
waitTime | number | Optional | Wait time before agent responds (max 5 for minutes, 300 for seconds). |
waitTimeUnit | string | Optional | Unit for wait time - SECONDS or MINUTES One of: minutes, seconds |
Create an Agent — response body — actions item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
id | string | Required within parent | Unique identifier for the action. |
type | string | Required within parent | type of action. Known values: triggerWorkflow, updateContactField, appointmentBooking, stopBot, humanHandOver, advancedFollowup, transferBot |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: gohighlevel.update_agent. Catalog operation: update-agent. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["conversation-ai.write"]
Pinned headers: {"Version": "v3"}