curl --request POST \
--url https://api.agents.slng.ai/v1/agents/tools/{tool_id}/run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sample_input": {
"customer_id": "cus_123"
},
"confirm_side_effects": true
}
'import requests
url = "https://api.agents.slng.ai/v1/agents/tools/{tool_id}/run"
payload = {
"sample_input": { "customer_id": "cus_123" },
"confirm_side_effects": True
}
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({sample_input: {customer_id: 'cus_123'}, confirm_side_effects: true})
};
fetch('https://api.agents.slng.ai/v1/agents/tools/{tool_id}/run', 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.agents.slng.ai/v1/agents/tools/{tool_id}/run",
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([
'sample_input' => [
'customer_id' => 'cus_123'
],
'confirm_side_effects' => true
]),
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.agents.slng.ai/v1/agents/tools/{tool_id}/run"
payload := strings.NewReader("{\n \"sample_input\": {\n \"customer_id\": \"cus_123\"\n },\n \"confirm_side_effects\": true\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.agents.slng.ai/v1/agents/tools/{tool_id}/run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sample_input\": {\n \"customer_id\": \"cus_123\"\n },\n \"confirm_side_effects\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agents.slng.ai/v1/agents/tools/{tool_id}/run")
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 \"sample_input\": {\n \"customer_id\": \"cus_123\"\n },\n \"confirm_side_effects\": true\n}"
response = http.request(request)
puts response.read_body{
"status": "succeeded",
"latency_ms": 142,
"output_json": {
"id": "cus_123",
"region": "eu"
},
"logs": [],
"validation": "valid",
"proven_hash": "9f2b7c1a3d4e5f60"
}{
"detail": "The tool is attached to an active agent.",
"error": {
"code": "TOOL_DELETE_BLOCKED",
"message": "The tool is attached to an active agent.",
"retryable": false
}
}{
"detail": "The tool is attached to an active agent.",
"error": {
"code": "TOOL_DELETE_BLOCKED",
"message": "The tool is attached to an active agent.",
"retryable": false
}
}{
"detail": "The tool is attached to an active agent.",
"error": {
"code": "TOOL_DELETE_BLOCKED",
"message": "The tool is attached to an active agent.",
"retryable": false
}
}{
"detail": "The tool is attached to an active agent.",
"error": {
"code": "TOOL_DELETE_BLOCKED",
"message": "The tool is attached to an active agent.",
"retryable": false
}
}{
"detail": "The tool is attached to an active agent.",
"error": {
"code": "TOOL_DELETE_BLOCKED",
"message": "The tool is attached to an active agent.",
"retryable": false
}
}{
"detail": "The tool is attached to an active agent.",
"error": {
"code": "TOOL_DELETE_BLOCKED",
"message": "The tool is attached to an active agent.",
"retryable": false
}
}{
"detail": "The tool is attached to an active agent.",
"error": {
"code": "TOOL_DELETE_BLOCKED",
"message": "The tool is attached to an active agent.",
"retryable": false
}
}Run Tool
Test-run a prepared draft with sample input and confirmed side effects. Context-bound tool types return 400, curated tools return 403 (duplicate one first), and non-api_request tools must be built before running or return 409. An api_request run uses optimistic concurrency and returns 409 with code TOOL_CHANGED if the config hash changed mid-run. Updates last_run_status and the proven hash.
curl --request POST \
--url https://api.agents.slng.ai/v1/agents/tools/{tool_id}/run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sample_input": {
"customer_id": "cus_123"
},
"confirm_side_effects": true
}
'import requests
url = "https://api.agents.slng.ai/v1/agents/tools/{tool_id}/run"
payload = {
"sample_input": { "customer_id": "cus_123" },
"confirm_side_effects": True
}
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({sample_input: {customer_id: 'cus_123'}, confirm_side_effects: true})
};
fetch('https://api.agents.slng.ai/v1/agents/tools/{tool_id}/run', 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.agents.slng.ai/v1/agents/tools/{tool_id}/run",
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([
'sample_input' => [
'customer_id' => 'cus_123'
],
'confirm_side_effects' => true
]),
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.agents.slng.ai/v1/agents/tools/{tool_id}/run"
payload := strings.NewReader("{\n \"sample_input\": {\n \"customer_id\": \"cus_123\"\n },\n \"confirm_side_effects\": true\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.agents.slng.ai/v1/agents/tools/{tool_id}/run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sample_input\": {\n \"customer_id\": \"cus_123\"\n },\n \"confirm_side_effects\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agents.slng.ai/v1/agents/tools/{tool_id}/run")
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 \"sample_input\": {\n \"customer_id\": \"cus_123\"\n },\n \"confirm_side_effects\": true\n}"
response = http.request(request)
puts response.read_body{
"status": "succeeded",
"latency_ms": 142,
"output_json": {
"id": "cus_123",
"region": "eu"
},
"logs": [],
"validation": "valid",
"proven_hash": "9f2b7c1a3d4e5f60"
}{
"detail": "The tool is attached to an active agent.",
"error": {
"code": "TOOL_DELETE_BLOCKED",
"message": "The tool is attached to an active agent.",
"retryable": false
}
}{
"detail": "The tool is attached to an active agent.",
"error": {
"code": "TOOL_DELETE_BLOCKED",
"message": "The tool is attached to an active agent.",
"retryable": false
}
}{
"detail": "The tool is attached to an active agent.",
"error": {
"code": "TOOL_DELETE_BLOCKED",
"message": "The tool is attached to an active agent.",
"retryable": false
}
}{
"detail": "The tool is attached to an active agent.",
"error": {
"code": "TOOL_DELETE_BLOCKED",
"message": "The tool is attached to an active agent.",
"retryable": false
}
}{
"detail": "The tool is attached to an active agent.",
"error": {
"code": "TOOL_DELETE_BLOCKED",
"message": "The tool is attached to an active agent.",
"retryable": false
}
}{
"detail": "The tool is attached to an active agent.",
"error": {
"code": "TOOL_DELETE_BLOCKED",
"message": "The tool is attached to an active agent.",
"retryable": false
}
}{
"detail": "The tool is attached to an active agent.",
"error": {
"code": "TOOL_DELETE_BLOCKED",
"message": "The tool is attached to an active agent.",
"retryable": false
}
}Authorizations
Your SLNG consumer API key.
Path Parameters
The tool UUID. Curated tools are visible but read-only, and a tool owned by another organisation returns 404.
Body
The sample input and side-effect confirmation for the test run.
Response
The result of the test run: status, latency, any returned output, output-schema validation, logs, and the publish gate status.
Outcome of a test run, including status, latency, output, and gate status.
succeeded, failed, timed_out Whether the run output matched the declared output schema: valid (matched), mismatch (did not match), or na (no schema to check against).
valid, mismatch, na Gate set is selected by tool_type (V2): data → static + green_run; code also reports config_valid; ctx-bound → config_valid ONLY.
Show child attributes
Show child attributes