Set sharing, tool rules, and spending limits for agents
curl --request PUT \
--url https://api.openworklabs.com/v1/org/personal-agent-policy \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"toolPolicy": {
"connections": {},
"tools": {}
},
"monthlyBudgetMicros": 500000000000,
"sharedLogins": true,
"rules": "<string>",
"maxAgentsPerMember": 500
}
'import requests
url = "https://api.openworklabs.com/v1/org/personal-agent-policy"
payload = {
"toolPolicy": {
"connections": {},
"tools": {}
},
"monthlyBudgetMicros": 500000000000,
"sharedLogins": True,
"rules": "<string>",
"maxAgentsPerMember": 500
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
toolPolicy: {connections: {}, tools: {}},
monthlyBudgetMicros: 500000000000,
sharedLogins: true,
rules: '<string>',
maxAgentsPerMember: 500
})
};
fetch('https://api.openworklabs.com/v1/org/personal-agent-policy', 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.openworklabs.com/v1/org/personal-agent-policy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'toolPolicy' => [
'connections' => [
],
'tools' => [
]
],
'monthlyBudgetMicros' => 500000000000,
'sharedLogins' => true,
'rules' => '<string>',
'maxAgentsPerMember' => 500
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.openworklabs.com/v1/org/personal-agent-policy"
payload := strings.NewReader("{\n \"toolPolicy\": {\n \"connections\": {},\n \"tools\": {}\n },\n \"monthlyBudgetMicros\": 500000000000,\n \"sharedLogins\": true,\n \"rules\": \"<string>\",\n \"maxAgentsPerMember\": 500\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.put("https://api.openworklabs.com/v1/org/personal-agent-policy")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"toolPolicy\": {\n \"connections\": {},\n \"tools\": {}\n },\n \"monthlyBudgetMicros\": 500000000000,\n \"sharedLogins\": true,\n \"rules\": \"<string>\",\n \"maxAgentsPerMember\": 500\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/org/personal-agent-policy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"toolPolicy\": {\n \"connections\": {},\n \"tools\": {}\n },\n \"monthlyBudgetMicros\": 500000000000,\n \"sharedLogins\": true,\n \"rules\": \"<string>\",\n \"maxAgentsPerMember\": 500\n}"
response = http.request(request)
puts response.read_body{
"toolPolicy": {
"connections": {},
"tools": {}
},
"monthlyBudgetMicros": 500000000000,
"shareMode": "everyone",
"sharedLogins": false,
"rules": "",
"maxAgentsPerMember": 500
}{
"error": "invalid_request",
"details": [
{
"message": "<string>",
"path": [
"<string>"
]
}
],
"message": "<string>",
"capability": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Agents
Set sharing, tool rules, and spending limits for agents
Admins only. Send only the fields that change. New tool rules and limits apply to every agent in the organization from its next run.
PUT
/
v1
/
org
/
personal-agent-policy
Set sharing, tool rules, and spending limits for agents
curl --request PUT \
--url https://api.openworklabs.com/v1/org/personal-agent-policy \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"toolPolicy": {
"connections": {},
"tools": {}
},
"monthlyBudgetMicros": 500000000000,
"sharedLogins": true,
"rules": "<string>",
"maxAgentsPerMember": 500
}
'import requests
url = "https://api.openworklabs.com/v1/org/personal-agent-policy"
payload = {
"toolPolicy": {
"connections": {},
"tools": {}
},
"monthlyBudgetMicros": 500000000000,
"sharedLogins": True,
"rules": "<string>",
"maxAgentsPerMember": 500
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
toolPolicy: {connections: {}, tools: {}},
monthlyBudgetMicros: 500000000000,
sharedLogins: true,
rules: '<string>',
maxAgentsPerMember: 500
})
};
fetch('https://api.openworklabs.com/v1/org/personal-agent-policy', 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.openworklabs.com/v1/org/personal-agent-policy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'toolPolicy' => [
'connections' => [
],
'tools' => [
]
],
'monthlyBudgetMicros' => 500000000000,
'sharedLogins' => true,
'rules' => '<string>',
'maxAgentsPerMember' => 500
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.openworklabs.com/v1/org/personal-agent-policy"
payload := strings.NewReader("{\n \"toolPolicy\": {\n \"connections\": {},\n \"tools\": {}\n },\n \"monthlyBudgetMicros\": 500000000000,\n \"sharedLogins\": true,\n \"rules\": \"<string>\",\n \"maxAgentsPerMember\": 500\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.put("https://api.openworklabs.com/v1/org/personal-agent-policy")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"toolPolicy\": {\n \"connections\": {},\n \"tools\": {}\n },\n \"monthlyBudgetMicros\": 500000000000,\n \"sharedLogins\": true,\n \"rules\": \"<string>\",\n \"maxAgentsPerMember\": 500\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/org/personal-agent-policy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"toolPolicy\": {\n \"connections\": {},\n \"tools\": {}\n },\n \"monthlyBudgetMicros\": 500000000000,\n \"sharedLogins\": true,\n \"rules\": \"<string>\",\n \"maxAgentsPerMember\": 500\n}"
response = http.request(request)
puts response.read_body{
"toolPolicy": {
"connections": {},
"tools": {}
},
"monthlyBudgetMicros": 500000000000,
"shareMode": "everyone",
"sharedLogins": false,
"rules": "",
"maxAgentsPerMember": 500
}{
"error": "invalid_request",
"details": [
{
"message": "<string>",
"path": [
"<string>"
]
}
],
"message": "<string>",
"capability": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
denApiKeybearerAuth
Body
application/json
Response
Set sharing, tool rules, and spending limits for agents
The most active agents one member may own, or null for no limit. A member at the limit cannot create or duplicate another until they archive one. Agents they already have are kept when the limit is lowered, and an admin can still transfer an agent to them.
Required range:
1 <= x <= 1000Was this page helpful?