curl --request DELETE \
--url https://api.openworklabs.com/v1/personal-agents/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.openworklabs.com/v1/personal-agents/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.openworklabs.com/v1/personal-agents/{id}', 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/personal-agents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.openworklabs.com/v1/personal-agents/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.openworklabs.com/v1/personal-agents/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/personal-agents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"agent": {
"id": "<string>",
"organizationId": "<string>",
"ownerMemberId": "<string>",
"name": "<string>",
"state": "active",
"currentRevisionId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"archivedAt": "2023-11-07T05:31:56Z",
"pausedAt": "2023-11-07T05:31:56Z"
},
"revision": {
"id": "<string>",
"agentId": "<string>",
"version": 123,
"brief": "<string>",
"toolPolicy": {
"connections": {},
"tools": {}
},
"defaultExecutionTarget": "desktop",
"monthlyBudgetMicros": 500000000000,
"digest": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
},
"routineCount": 4503599627370495,
"role": "owner",
"owner": {
"memberId": "<string>",
"name": "<string>"
},
"sharedWith": [],
"routines": [
{
"id": "<string>",
"name": "<string>",
"state": "active",
"schedule": {
"kind": "once",
"timezone": "<string>",
"at": 4503599627370495
},
"nextDueAt": "2023-11-07T05:31:56Z",
"latestRun": {
"id": "<string>",
"status": "queued",
"createdAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z"
}
}
],
"spend": {
"monthMicros": 4503599627370495,
"unpricedTokens": 4503599627370495,
"budgetMicros": 500000000000,
"ownerBudgetMicros": 500000000000,
"adminBudgetMicros": 500000000000,
"overBudget": true
},
"openRequestCount": 0,
"audience": {
"organization": false,
"autoAddOrganization": false,
"teams": []
},
"listed": true,
"canShare": true
}{
"error": "invalid_request",
"details": [
{
"message": "<string>",
"path": [
"<string>"
]
}
],
"message": "<string>",
"capability": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Archive an agent
An agent has an owner, a name, a brief that says how it works, and rules for which tools it can use. Every change to the brief or tool policy makes a new version. An agent does its work through routines. A routine is a Cloud Automation that belongs to the agent, so it also appears in the Automation capabilities; each run starts from the agent’s brief and can use only what the agent’s tool policy allows. The owner can share the agent with teammates. Managers can change who can collaborate. The owner must approve changes a manager proposes to the brief, tool policy or routines. Collaborators can use the agent and ask for changes. Runs started by a teammate are private. Scheduled runs use the owner’s accounts and share their results with the team. Archiving also archives the agent’s routines, so nothing keeps running. Run history is kept.
curl --request DELETE \
--url https://api.openworklabs.com/v1/personal-agents/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.openworklabs.com/v1/personal-agents/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.openworklabs.com/v1/personal-agents/{id}', 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/personal-agents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.openworklabs.com/v1/personal-agents/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.openworklabs.com/v1/personal-agents/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/personal-agents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"agent": {
"id": "<string>",
"organizationId": "<string>",
"ownerMemberId": "<string>",
"name": "<string>",
"state": "active",
"currentRevisionId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"archivedAt": "2023-11-07T05:31:56Z",
"pausedAt": "2023-11-07T05:31:56Z"
},
"revision": {
"id": "<string>",
"agentId": "<string>",
"version": 123,
"brief": "<string>",
"toolPolicy": {
"connections": {},
"tools": {}
},
"defaultExecutionTarget": "desktop",
"monthlyBudgetMicros": 500000000000,
"digest": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
},
"routineCount": 4503599627370495,
"role": "owner",
"owner": {
"memberId": "<string>",
"name": "<string>"
},
"sharedWith": [],
"routines": [
{
"id": "<string>",
"name": "<string>",
"state": "active",
"schedule": {
"kind": "once",
"timezone": "<string>",
"at": 4503599627370495
},
"nextDueAt": "2023-11-07T05:31:56Z",
"latestRun": {
"id": "<string>",
"status": "queued",
"createdAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z"
}
}
],
"spend": {
"monthMicros": 4503599627370495,
"unpricedTokens": 4503599627370495,
"budgetMicros": 500000000000,
"ownerBudgetMicros": 500000000000,
"adminBudgetMicros": 500000000000,
"overBudget": true
},
"openRequestCount": 0,
"audience": {
"organization": false,
"autoAddOrganization": false,
"teams": []
},
"listed": true,
"canShare": true
}{
"error": "invalid_request",
"details": [
{
"message": "<string>",
"path": [
"<string>"
]
}
],
"message": "<string>",
"capability": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
Response
Agent archived.
Was this page helpful?