curl --request POST \
--url https://api.hq.zone/v1/agent-browser/ask \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.hq.zone/v1/agent-browser/ask"
payload = {
"text": "<string>",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({text: '<string>', conversation_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.hq.zone/v1/agent-browser/ask', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hq.zone/v1/agent-browser/ask",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => '<string>',
'conversation_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hq.zone/v1/agent-browser/ask"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"conversation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hq.zone/v1/agent-browser/ask")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"conversation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hq.zone/v1/agent-browser/ask")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"<string>\",\n \"conversation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"conversation_id": "<string>",
"reply": "<string>"
}Ask using the user's browser
The dedicated browser path. The extension’s “use my browser” button POSTs
here, PAT-authed (the same token the WebSocket uses). This is the ONLY entry
that runs an agent scoped to the local-browser tools (computer_*) + the
browser prompt - normal chat (web / Slack) never sees them, because
hq:computer is default_enabled = FALSE and the gateway only widens the
scope when this turn’s browser_session flag is set. Runs synchronously and
returns the agent’s reply.
curl --request POST \
--url https://api.hq.zone/v1/agent-browser/ask \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.hq.zone/v1/agent-browser/ask"
payload = {
"text": "<string>",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({text: '<string>', conversation_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.hq.zone/v1/agent-browser/ask', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hq.zone/v1/agent-browser/ask",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => '<string>',
'conversation_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hq.zone/v1/agent-browser/ask"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"conversation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hq.zone/v1/agent-browser/ask")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"conversation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hq.zone/v1/agent-browser/ask")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"<string>\",\n \"conversation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"conversation_id": "<string>",
"reply": "<string>"
}Requires a connected browser
Runs an agent turn against the caller’s own local browser using thecomputer_* tools — the only entry point where those tools are enabled. It runs synchronously and returns the reply directly (no event stream).
403 instead of running a turn that couldn’t do anything.conversation_id to continue a thread; omit it on the first ask to create one. Store the returned conversation_id and send it back on the next ask — the same pattern as the normal turn endpoints.Authorizations
Personal Access Token. Send as Authorization: Bearer hq_pat_....
Body
The user's request (e.g. "what is this page" / "fill in my name").
The conversation the user is viewing. The browser ask runs in THIS thread (per-thread browser session), so a new thread = a fresh agent session - no inherited stuck-session state. Omit only for legacy clients, which fall back to a deprecated stable per-user thread.
Response
The agent's reply, run against the caller's connected local browser (computer_* tools + browser prompt)