Report agent tool surface
curl --request POST \
--url https://api.visiqlabs.com/allow/agents/tools \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_id": "billing-copilot",
"tools": [
{
"name": "send_email",
"description": "Send an email to a customer.",
"input_schema": {
"type": "object",
"properties": {
"to": {
"type": "string"
},
"subject": {
"type": "string"
}
}
}
}
]
}
'import requests
url = "https://api.visiqlabs.com/allow/agents/tools"
payload = {
"agent_id": "billing-copilot",
"tools": [
{
"name": "send_email",
"description": "Send an email to a customer.",
"input_schema": {
"type": "object",
"properties": {
"to": { "type": "string" },
"subject": { "type": "string" }
}
}
}
]
}
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({
agent_id: 'billing-copilot',
tools: [
{
name: 'send_email',
description: 'Send an email to a customer.',
input_schema: {type: 'object', properties: {to: {type: 'string'}, subject: {type: 'string'}}}
}
]
})
};
fetch('https://api.visiqlabs.com/allow/agents/tools', 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.visiqlabs.com/allow/agents/tools",
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([
'agent_id' => 'billing-copilot',
'tools' => [
[
'name' => 'send_email',
'description' => 'Send an email to a customer.',
'input_schema' => [
'type' => 'object',
'properties' => [
'to' => [
'type' => 'string'
],
'subject' => [
'type' => 'string'
]
]
]
]
]
]),
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.visiqlabs.com/allow/agents/tools"
payload := strings.NewReader("{\n \"agent_id\": \"billing-copilot\",\n \"tools\": [\n {\n \"name\": \"send_email\",\n \"description\": \"Send an email to a customer.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"to\": {\n \"type\": \"string\"\n },\n \"subject\": {\n \"type\": \"string\"\n }\n }\n }\n }\n ]\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.visiqlabs.com/allow/agents/tools")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": \"billing-copilot\",\n \"tools\": [\n {\n \"name\": \"send_email\",\n \"description\": \"Send an email to a customer.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"to\": {\n \"type\": \"string\"\n },\n \"subject\": {\n \"type\": \"string\"\n }\n }\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.visiqlabs.com/allow/agents/tools")
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 \"agent_id\": \"billing-copilot\",\n \"tools\": [\n {\n \"name\": \"send_email\",\n \"description\": \"Send an email to a customer.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"to\": {\n \"type\": \"string\"\n },\n \"subject\": {\n \"type\": \"string\"\n }\n }\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"agent_id": "billing-copilot",
"status": "recorded"
}{
"error": "Invalid request body",
"code": "invalid_request",
"details": [
{
"path": [
"agent_id"
],
"message": "Required"
}
]
}{
"error": "Unauthorized",
"code": "unauthenticated"
}{
"error": "insufficient_scope",
"code": "insufficient_scope",
"detail": "This API key is not authorized for the requested operation."
}{
"error": "<string>",
"code": "<string>",
"detail": "<string>",
"details": [
{}
]
}{
"error": "rate_limiter_unavailable",
"code": "rate_limiter_unavailable",
"detail": "Rate limiter unavailable, please retry."
}Agents
Report agent tool surface
The harness startup handshake that reports the tools an agent was bound with: name, description and argument JSON Schema (shape only, never argument values). VisIQ persists them and infers the agent’s blast radius. Called again whenever the tool set changes. Requires scope rules:evaluate (or allow:write) and permission allow_agents:create.
POST
/
allow
/
agents
/
tools
Report agent tool surface
curl --request POST \
--url https://api.visiqlabs.com/allow/agents/tools \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_id": "billing-copilot",
"tools": [
{
"name": "send_email",
"description": "Send an email to a customer.",
"input_schema": {
"type": "object",
"properties": {
"to": {
"type": "string"
},
"subject": {
"type": "string"
}
}
}
}
]
}
'import requests
url = "https://api.visiqlabs.com/allow/agents/tools"
payload = {
"agent_id": "billing-copilot",
"tools": [
{
"name": "send_email",
"description": "Send an email to a customer.",
"input_schema": {
"type": "object",
"properties": {
"to": { "type": "string" },
"subject": { "type": "string" }
}
}
}
]
}
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({
agent_id: 'billing-copilot',
tools: [
{
name: 'send_email',
description: 'Send an email to a customer.',
input_schema: {type: 'object', properties: {to: {type: 'string'}, subject: {type: 'string'}}}
}
]
})
};
fetch('https://api.visiqlabs.com/allow/agents/tools', 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.visiqlabs.com/allow/agents/tools",
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([
'agent_id' => 'billing-copilot',
'tools' => [
[
'name' => 'send_email',
'description' => 'Send an email to a customer.',
'input_schema' => [
'type' => 'object',
'properties' => [
'to' => [
'type' => 'string'
],
'subject' => [
'type' => 'string'
]
]
]
]
]
]),
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.visiqlabs.com/allow/agents/tools"
payload := strings.NewReader("{\n \"agent_id\": \"billing-copilot\",\n \"tools\": [\n {\n \"name\": \"send_email\",\n \"description\": \"Send an email to a customer.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"to\": {\n \"type\": \"string\"\n },\n \"subject\": {\n \"type\": \"string\"\n }\n }\n }\n }\n ]\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.visiqlabs.com/allow/agents/tools")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": \"billing-copilot\",\n \"tools\": [\n {\n \"name\": \"send_email\",\n \"description\": \"Send an email to a customer.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"to\": {\n \"type\": \"string\"\n },\n \"subject\": {\n \"type\": \"string\"\n }\n }\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.visiqlabs.com/allow/agents/tools")
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 \"agent_id\": \"billing-copilot\",\n \"tools\": [\n {\n \"name\": \"send_email\",\n \"description\": \"Send an email to a customer.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"to\": {\n \"type\": \"string\"\n },\n \"subject\": {\n \"type\": \"string\"\n }\n }\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"agent_id": "billing-copilot",
"status": "recorded"
}{
"error": "Invalid request body",
"code": "invalid_request",
"details": [
{
"path": [
"agent_id"
],
"message": "Required"
}
]
}{
"error": "Unauthorized",
"code": "unauthenticated"
}{
"error": "insufficient_scope",
"code": "insufficient_scope",
"detail": "This API key is not authorized for the requested operation."
}{
"error": "<string>",
"code": "<string>",
"detail": "<string>",
"details": [
{}
]
}{
"error": "rate_limiter_unavailable",
"code": "rate_limiter_unavailable",
"detail": "Rate limiter unavailable, please retry."
}Authorizations
A VisIQ API key presented as Authorization: Bearer vq_prod_.... Mint harness keys under Settings → Harness Keys and API keys under Settings → API Keys in the dashboard.
Body
application/json