HighLevel: Search Agents
HighLevel conversationAi.searchAgent: arguments, response, policy and SDK examples.
← Conversation AI operations · Get started
Operation gohighlevel.search_agent
Provider route: GET /conversation-ai/agents/search. 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"]["searchAgent"]>[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.searchAgent(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.search_agent(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | object | Optional | Additional keys: not allowed |
query.startAfter | string | Optional | |
query.limit | number | Optional | |
query.query | string | Optional |
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 Search Agents — response body |
Referenced models: Search Agents — response body
Schemas
Section titled “Schemas”Search Agents — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
agents | array | Required within parent | List of agents matching the search criteria. |
agents[] | Model | Each item | Expand Search Agents — response body — agents item |
count | JSON | Required within parent | |
count (anyOf 1) | number | Alternative | Number of agents in the current response (filtered/paginated count). |
count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
totalCount | JSON | Required within parent | |
totalCount (anyOf 1) | number | Alternative | Total number of agents in the location (unfiltered count). |
totalCount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Referenced models: Search Agents — response body — agents item
Search Agents — response body — agents item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
actions | array | Required within parent | List of actions associated with this agent. |
actions[] | object | Each 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 | |
createdAt | string | Required within parent | Timestamp when the agent was created. |
goal | object | Optional | Goal configuration for the agent. |
id | string | Required within parent | Unique identifier for the agent. |
isPrimary | boolean | Required within parent | Indicates if this agent is a primary agent. (First agent created for a location is primary by default) |
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. |
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 |
updatedAt | string | Required within parent | Timestamp when the agent was last updated. |
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 |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: gohighlevel.search_agent. Catalog operation: search-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.readonly"]
Pinned headers: {"Version": "v3"}