ghl_agent_studio_execute
Executes a GoHighLevel Agent Studio agent to return complete JSON output; continue multi-turn conversations by passing executionId from prior responses.
Instructions
Execute Agent Executes the specified agent and returns a non-streaming JSON response with the complete agent output. The agent must be in active status and belong to the specified location. locationId is required in the request body.
Session Management:
For the first message in a new session, do not include the
executionIdin the request payload.The API will return an
executionIdalong with the agent response, which uniquely identifies this conversation session.To continue the conversation within the same session, include the
executionIdfrom the previous response in subsequent requests. This allows the agent to maintain conversation context and history across multiple interactions. Endpoint: POST /agent-studio/agent/{agentId}/execute (Version header: v3; source: v3/agent-studio-v3.json) Requires a Sub-Account (location) token. OAuth scopes: agent-studio.write
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"agentId": "<agentId>",
"body": "<body>"
},
"name": "ghl_agent_studio_execute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | Request body (schema carried verbatim from the official OpenAPI spec). | |
| source | No | Origin channel attributed to this execution for auditing (e.g. public_api, internal) | |
| agentId | Yes | Agent ID to execute (must be in active status and belong to the location) |