curl --request POST \
--url https://app.trustivan.com/api/v1/agents/{id}/tools \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"required_permission": "<string>",
"irreversible": true
}
'import requests
url = "https://app.trustivan.com/api/v1/agents/{id}/tools"
payload = {
"name": "<string>",
"description": "<string>",
"required_permission": "<string>",
"irreversible": 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({
name: '<string>',
description: '<string>',
required_permission: '<string>',
irreversible: true
})
};
fetch('https://app.trustivan.com/api/v1/agents/{id}/tools', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/agents/{id}/tools"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"required_permission\": \"<string>\",\n \"irreversible\": 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))
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Declare a tool
Registers one capability. A tool is a NARROWING and never a source of
authority: required_permission is what invoking it DEMANDS, checked
against the authority the delegation already produced. An agent that
declares a tool requiring findings:suppress has not thereby gained
findings:suppress.
An UNKNOWN permission name is refused, because it would register a tool whose requirement no check can ever satisfy, so the agent would be denied forever with no explanation. A permission the agent does not currently hold is ACCEPTED: the delegation may widen tomorrow, and the invocation is where it is decided, which is what leaves a record.
A permission ungrantable to a machine is refused outright. No agent may ever hold one, so a tool requiring it advertises a capability the system will always refuse.
irreversible marks a tool whose invocation cannot be undone. Such a
tool takes the step-up path: the broker demands a human be present
before a machine does something nobody can reverse. It is declared per
tool rather than derived from the name, because the agent’s author
chooses the name and TRUSTIVAN decides what it means.
A human holding workloads:manage may declare tools on any agent; an
agent may declare its own and no other’s. An agent editing a peer’s
inventory would be an escalation path between two principals
deliberately delegated different authority.
curl --request POST \
--url https://app.trustivan.com/api/v1/agents/{id}/tools \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"required_permission": "<string>",
"irreversible": true
}
'import requests
url = "https://app.trustivan.com/api/v1/agents/{id}/tools"
payload = {
"name": "<string>",
"description": "<string>",
"required_permission": "<string>",
"irreversible": 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({
name: '<string>',
description: '<string>',
required_permission: '<string>',
irreversible: true
})
};
fetch('https://app.trustivan.com/api/v1/agents/{id}/tools', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/agents/{id}/tools"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"required_permission\": \"<string>\",\n \"irreversible\": 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))
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Authorizations
Body
Response
The declared tool.