curl --request POST \
--url https://api.agents.slng.ai/v1/agents/tools/agents/{agent_id}/attachments/{attachment_id}/upgrade-accept \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to_version": 3,
"current_config_hash": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"current_tool_version_hash": "fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210",
"target_tool_version_hash": "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567",
"acceptance_hash": "1122334455667788112233445566778811223344556677881122334455667788"
}
'import requests
url = "https://api.agents.slng.ai/v1/agents/tools/agents/{agent_id}/attachments/{attachment_id}/upgrade-accept"
payload = {
"to_version": 3,
"current_config_hash": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"current_tool_version_hash": "fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210",
"target_tool_version_hash": "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567",
"acceptance_hash": "1122334455667788112233445566778811223344556677881122334455667788"
}
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({
to_version: 3,
current_config_hash: '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef',
current_tool_version_hash: 'fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210',
target_tool_version_hash: '89abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567',
acceptance_hash: '1122334455667788112233445566778811223344556677881122334455667788'
})
};
fetch('https://api.agents.slng.ai/v1/agents/tools/agents/{agent_id}/attachments/{attachment_id}/upgrade-accept', 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/agents/{agent_id}/attachments/{attachment_id}/upgrade-accept",
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([
'to_version' => 3,
'current_config_hash' => '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef',
'current_tool_version_hash' => 'fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210',
'target_tool_version_hash' => '89abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567',
'acceptance_hash' => '1122334455667788112233445566778811223344556677881122334455667788'
]),
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/agents/{agent_id}/attachments/{attachment_id}/upgrade-accept"
payload := strings.NewReader("{\n \"to_version\": 3,\n \"current_config_hash\": \"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\",\n \"current_tool_version_hash\": \"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\",\n \"target_tool_version_hash\": \"89abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567\",\n \"acceptance_hash\": \"1122334455667788112233445566778811223344556677881122334455667788\"\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/agents/{agent_id}/attachments/{attachment_id}/upgrade-accept")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"to_version\": 3,\n \"current_config_hash\": \"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\",\n \"current_tool_version_hash\": \"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\",\n \"target_tool_version_hash\": \"89abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567\",\n \"acceptance_hash\": \"1122334455667788112233445566778811223344556677881122334455667788\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agents.slng.ai/v1/agents/tools/agents/{agent_id}/attachments/{attachment_id}/upgrade-accept")
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 \"to_version\": 3,\n \"current_config_hash\": \"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\",\n \"current_tool_version_hash\": \"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\",\n \"target_tool_version_hash\": \"89abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567\",\n \"acceptance_hash\": \"1122334455667788112233445566778811223344556677881122334455667788\"\n}"
response = http.request(request)
puts response.read_body{
"agent_id": "0a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
"attachment_id": "1b2c3d4e-5f60-4718-92a3-b4c5d6e7f809",
"tool_id": "7b2a1c34-5d6e-4f70-8a90-1b2c3d4e5f60",
"from_version": 2,
"to_version": 3,
"current_config_hash": "3f1ab2c4d5e6f708",
"current_tool_version_hash": "8a7b6c5d4e3f2011",
"target_tool_version_hash": "9e8d7c6b5a4f3210",
"acceptance_hash": "a1b2c3d4e5f60718",
"reconciled_attachment": {
"attachment_id": "1b2c3d4e-5f60-4718-92a3-b4c5d6e7f809",
"tool_id": "7b2a1c34-5d6e-4f70-8a90-1b2c3d4e5f60",
"version": 3
},
"added_parameters": [],
"removed_parameters": [],
"renamed_parameters": {},
"type_changed_parameters": {},
"issues": [],
"can_accept": true
}{
"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
}
}Accept Tool Attachment Upgrade
Apply a previewed upgrade to one agent attachment. Uses optimistic concurrency, so if any preview hash no longer matches it returns 409, and a stale attachment returns 409 with code TOOL_ATTACHMENT_STALE.
curl --request POST \
--url https://api.agents.slng.ai/v1/agents/tools/agents/{agent_id}/attachments/{attachment_id}/upgrade-accept \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to_version": 3,
"current_config_hash": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"current_tool_version_hash": "fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210",
"target_tool_version_hash": "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567",
"acceptance_hash": "1122334455667788112233445566778811223344556677881122334455667788"
}
'import requests
url = "https://api.agents.slng.ai/v1/agents/tools/agents/{agent_id}/attachments/{attachment_id}/upgrade-accept"
payload = {
"to_version": 3,
"current_config_hash": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"current_tool_version_hash": "fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210",
"target_tool_version_hash": "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567",
"acceptance_hash": "1122334455667788112233445566778811223344556677881122334455667788"
}
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({
to_version: 3,
current_config_hash: '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef',
current_tool_version_hash: 'fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210',
target_tool_version_hash: '89abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567',
acceptance_hash: '1122334455667788112233445566778811223344556677881122334455667788'
})
};
fetch('https://api.agents.slng.ai/v1/agents/tools/agents/{agent_id}/attachments/{attachment_id}/upgrade-accept', 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/agents/{agent_id}/attachments/{attachment_id}/upgrade-accept",
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([
'to_version' => 3,
'current_config_hash' => '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef',
'current_tool_version_hash' => 'fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210',
'target_tool_version_hash' => '89abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567',
'acceptance_hash' => '1122334455667788112233445566778811223344556677881122334455667788'
]),
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/agents/{agent_id}/attachments/{attachment_id}/upgrade-accept"
payload := strings.NewReader("{\n \"to_version\": 3,\n \"current_config_hash\": \"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\",\n \"current_tool_version_hash\": \"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\",\n \"target_tool_version_hash\": \"89abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567\",\n \"acceptance_hash\": \"1122334455667788112233445566778811223344556677881122334455667788\"\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/agents/{agent_id}/attachments/{attachment_id}/upgrade-accept")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"to_version\": 3,\n \"current_config_hash\": \"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\",\n \"current_tool_version_hash\": \"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\",\n \"target_tool_version_hash\": \"89abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567\",\n \"acceptance_hash\": \"1122334455667788112233445566778811223344556677881122334455667788\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agents.slng.ai/v1/agents/tools/agents/{agent_id}/attachments/{attachment_id}/upgrade-accept")
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 \"to_version\": 3,\n \"current_config_hash\": \"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\",\n \"current_tool_version_hash\": \"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\",\n \"target_tool_version_hash\": \"89abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567\",\n \"acceptance_hash\": \"1122334455667788112233445566778811223344556677881122334455667788\"\n}"
response = http.request(request)
puts response.read_body{
"agent_id": "0a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
"attachment_id": "1b2c3d4e-5f60-4718-92a3-b4c5d6e7f809",
"tool_id": "7b2a1c34-5d6e-4f70-8a90-1b2c3d4e5f60",
"from_version": 2,
"to_version": 3,
"current_config_hash": "3f1ab2c4d5e6f708",
"current_tool_version_hash": "8a7b6c5d4e3f2011",
"target_tool_version_hash": "9e8d7c6b5a4f3210",
"acceptance_hash": "a1b2c3d4e5f60718",
"reconciled_attachment": {
"attachment_id": "1b2c3d4e-5f60-4718-92a3-b4c5d6e7f809",
"tool_id": "7b2a1c34-5d6e-4f70-8a90-1b2c3d4e5f60",
"version": 3
},
"added_parameters": [],
"removed_parameters": [],
"renamed_parameters": {},
"type_changed_parameters": {},
"issues": [],
"can_accept": true
}{
"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 agent UUID that owns the attachment being upgraded.
The UUID of the tool attachment on the agent.
Body
The target version and preview hashes to apply.
Request to accept a previewed attachment upgrade, carrying the preview hashes for concurrency checks.
x >= 1^[0-9a-f]{64}$^[0-9a-f]{64}$^[0-9a-f]{64}$^[0-9a-f]{64}$^[0-9a-f]{64}$Response
The applied upgrade, returned in the same shape as the preview, with the attachment now pinned to the target version.
Preview of upgrading an attachment to a target version, with the parameter diff and blocking issues.
A tool bound to an agent at a specific version, with any overrides.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
^[0-9a-f]{64}$ready, preparing, failed 1 <= x <= 60