curl --request POST \
--url https://api.agentsfleet.net/v1/workspaces/{workspace_id}/fleets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "<string>",
"operation_id": "<string>",
"images": [
{
"data": "<string>",
"media_type": "<string>"
}
],
"model_ref": "<string>",
"name": "<string>"
}
'import requests
url = "https://api.agentsfleet.net/v1/workspaces/{workspace_id}/fleets"
payload = {
"message": "<string>",
"operation_id": "<string>",
"images": [
{
"data": "<string>",
"media_type": "<string>"
}
],
"model_ref": "<string>",
"name": "<string>"
}
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({
message: '<string>',
operation_id: '<string>',
images: [{data: '<string>', media_type: '<string>'}],
model_ref: '<string>',
name: '<string>'
})
};
fetch('https://api.agentsfleet.net/v1/workspaces/{workspace_id}/fleets', 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.agentsfleet.net/v1/workspaces/{workspace_id}/fleets",
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([
'message' => '<string>',
'operation_id' => '<string>',
'images' => [
[
'data' => '<string>',
'media_type' => '<string>'
]
],
'model_ref' => '<string>',
'name' => '<string>'
]),
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.agentsfleet.net/v1/workspaces/{workspace_id}/fleets"
payload := strings.NewReader("{\n \"message\": \"<string>\",\n \"operation_id\": \"<string>\",\n \"images\": [\n {\n \"data\": \"<string>\",\n \"media_type\": \"<string>\"\n }\n ],\n \"model_ref\": \"<string>\",\n \"name\": \"<string>\"\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.agentsfleet.net/v1/workspaces/{workspace_id}/fleets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"<string>\",\n \"operation_id\": \"<string>\",\n \"images\": [\n {\n \"data\": \"<string>\",\n \"media_type\": \"<string>\"\n }\n ],\n \"model_ref\": \"<string>\",\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentsfleet.net/v1/workspaces/{workspace_id}/fleets")
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 \"message\": \"<string>\",\n \"operation_id\": \"<string>\",\n \"images\": [\n {\n \"data\": \"<string>\",\n \"media_type\": \"<string>\"\n }\n ],\n \"model_ref\": \"<string>\",\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"accepted": {
"disposition": "started",
"turn_id": "<string>"
},
"fleet": {
"budget_used_nanos": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"etag": "<string>",
"events_processed": "<string>",
"grants": [
{
"id": "<string>",
"kind": "<string>",
"name": "<string>",
"status": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"requested_scope": {},
"scope": {}
}
],
"http_egress": "restricted",
"id": "<string>",
"memory_access": {
"publish": true,
"read": true
},
"model_ref": "<string>",
"name": "<string>",
"package_domains": true,
"pending_approvals": 123,
"schedules": [
{}
],
"status": "<string>",
"triggers": [
{
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"kind": "webhook",
"source": "<string>",
"channel": "<string>",
"events": [
"<string>"
],
"repositories": [
"<string>"
],
"url": "<string>"
}
],
"updated_at": "2023-11-07T05:31:56Z"
},
"replayed": true
}{
"accepted": {
"disposition": "started",
"turn_id": "<string>"
},
"fleet": {
"budget_used_nanos": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"etag": "<string>",
"events_processed": "<string>",
"grants": [
{
"id": "<string>",
"kind": "<string>",
"name": "<string>",
"status": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"requested_scope": {},
"scope": {}
}
],
"http_egress": "restricted",
"id": "<string>",
"memory_access": {
"publish": true,
"read": true
},
"model_ref": "<string>",
"name": "<string>",
"package_domains": true,
"pending_approvals": 123,
"schedules": [
{}
],
"status": "<string>",
"triggers": [
{
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"kind": "webhook",
"source": "<string>",
"channel": "<string>",
"events": [
"<string>"
],
"repositories": [
"<string>"
],
"url": "<string>"
}
],
"updated_at": "2023-11-07T05:31:56Z"
},
"replayed": true
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}Start a fleet with its first message
Creates an active fleet, its thread and its first turn in one transaction. The fleet runs on model_ref, or on the workspace’s selected model when it is omitted. It is named name, or fleet- and the last 12 hex digits of its id. Its answer arrives on GET /v1/workspaces/{workspace_id}/fleets/{fleet_id}/turns/stream. Retry with the same operation_id and body to receive the same fleet with replayed: true. The same key with another body answers 409 UZ-FLEET-004. A key whose fleet was deleted answers 410 UZ-FLEET-006. Invalid images return 400 UZ-AGT-026. A text-only model returns 409 UZ-AGT-027.
curl --request POST \
--url https://api.agentsfleet.net/v1/workspaces/{workspace_id}/fleets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "<string>",
"operation_id": "<string>",
"images": [
{
"data": "<string>",
"media_type": "<string>"
}
],
"model_ref": "<string>",
"name": "<string>"
}
'import requests
url = "https://api.agentsfleet.net/v1/workspaces/{workspace_id}/fleets"
payload = {
"message": "<string>",
"operation_id": "<string>",
"images": [
{
"data": "<string>",
"media_type": "<string>"
}
],
"model_ref": "<string>",
"name": "<string>"
}
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({
message: '<string>',
operation_id: '<string>',
images: [{data: '<string>', media_type: '<string>'}],
model_ref: '<string>',
name: '<string>'
})
};
fetch('https://api.agentsfleet.net/v1/workspaces/{workspace_id}/fleets', 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.agentsfleet.net/v1/workspaces/{workspace_id}/fleets",
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([
'message' => '<string>',
'operation_id' => '<string>',
'images' => [
[
'data' => '<string>',
'media_type' => '<string>'
]
],
'model_ref' => '<string>',
'name' => '<string>'
]),
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.agentsfleet.net/v1/workspaces/{workspace_id}/fleets"
payload := strings.NewReader("{\n \"message\": \"<string>\",\n \"operation_id\": \"<string>\",\n \"images\": [\n {\n \"data\": \"<string>\",\n \"media_type\": \"<string>\"\n }\n ],\n \"model_ref\": \"<string>\",\n \"name\": \"<string>\"\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.agentsfleet.net/v1/workspaces/{workspace_id}/fleets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"<string>\",\n \"operation_id\": \"<string>\",\n \"images\": [\n {\n \"data\": \"<string>\",\n \"media_type\": \"<string>\"\n }\n ],\n \"model_ref\": \"<string>\",\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentsfleet.net/v1/workspaces/{workspace_id}/fleets")
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 \"message\": \"<string>\",\n \"operation_id\": \"<string>\",\n \"images\": [\n {\n \"data\": \"<string>\",\n \"media_type\": \"<string>\"\n }\n ],\n \"model_ref\": \"<string>\",\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"accepted": {
"disposition": "started",
"turn_id": "<string>"
},
"fleet": {
"budget_used_nanos": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"etag": "<string>",
"events_processed": "<string>",
"grants": [
{
"id": "<string>",
"kind": "<string>",
"name": "<string>",
"status": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"requested_scope": {},
"scope": {}
}
],
"http_egress": "restricted",
"id": "<string>",
"memory_access": {
"publish": true,
"read": true
},
"model_ref": "<string>",
"name": "<string>",
"package_domains": true,
"pending_approvals": 123,
"schedules": [
{}
],
"status": "<string>",
"triggers": [
{
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"kind": "webhook",
"source": "<string>",
"channel": "<string>",
"events": [
"<string>"
],
"repositories": [
"<string>"
],
"url": "<string>"
}
],
"updated_at": "2023-11-07T05:31:56Z"
},
"replayed": true
}{
"accepted": {
"disposition": "started",
"turn_id": "<string>"
},
"fleet": {
"budget_used_nanos": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"etag": "<string>",
"events_processed": "<string>",
"grants": [
{
"id": "<string>",
"kind": "<string>",
"name": "<string>",
"status": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"requested_scope": {},
"scope": {}
}
],
"http_egress": "restricted",
"id": "<string>",
"memory_access": {
"publish": true,
"read": true
},
"model_ref": "<string>",
"name": "<string>",
"package_domains": true,
"pending_approvals": 123,
"schedules": [
{}
],
"status": "<string>",
"triggers": [
{
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"kind": "webhook",
"source": "<string>",
"channel": "<string>",
"events": [
"<string>"
],
"repositories": [
"<string>"
],
"url": "<string>"
}
],
"updated_at": "2023-11-07T05:31:56Z"
},
"replayed": true
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}Authorizations
Path Parameters
Body
POST /v1/workspaces/{workspace_id}/fleets: a person's first message makes
an active fleet and its first turn in one transaction.
Response
A repeat of an earlier create: the same fleet and turn
POST /v1/workspaces/{workspace_id}/fleets: the fleet and its first turn.