Create Agent Group
curl --request POST \
--url https://api.velt.dev/v2/agents/groups/create \
--header 'Content-Type: application/json' \
--header 'x-velt-api-key: <x-velt-api-key>' \
--header 'x-velt-auth-token: <x-velt-auth-token>' \
--data '
{
"data": {
"name": "<string>",
"description": "<string>",
"agentIds": [
"<string>"
],
"metadata": {}
}
}
'import requests
url = "https://api.velt.dev/v2/agents/groups/create"
payload = { "data": {
"name": "<string>",
"description": "<string>",
"agentIds": ["<string>"],
"metadata": {}
} }
headers = {
"x-velt-api-key": "<x-velt-api-key>",
"x-velt-auth-token": "<x-velt-auth-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-velt-api-key': '<x-velt-api-key>',
'x-velt-auth-token': '<x-velt-auth-token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
name: '<string>',
description: '<string>',
agentIds: ['<string>'],
metadata: {}
}
})
};
fetch('https://api.velt.dev/v2/agents/groups/create', 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.velt.dev/v2/agents/groups/create",
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([
'data' => [
'name' => '<string>',
'description' => '<string>',
'agentIds' => [
'<string>'
],
'metadata' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-velt-api-key: <x-velt-api-key>",
"x-velt-auth-token: <x-velt-auth-token>"
],
]);
$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.velt.dev/v2/agents/groups/create"
payload := strings.NewReader("{\n \"data\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"agentIds\": [\n \"<string>\"\n ],\n \"metadata\": {}\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-velt-api-key", "<x-velt-api-key>")
req.Header.Add("x-velt-auth-token", "<x-velt-auth-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.velt.dev/v2/agents/groups/create")
.header("x-velt-api-key", "<x-velt-api-key>")
.header("x-velt-auth-token", "<x-velt-auth-token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"agentIds\": [\n \"<string>\"\n ],\n \"metadata\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.velt.dev/v2/agents/groups/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-velt-api-key"] = '<x-velt-api-key>'
request["x-velt-auth-token"] = '<x-velt-auth-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"agentIds\": [\n \"<string>\"\n ],\n \"metadata\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"result": {
"status": "success",
"message": "Agent group created successfully",
"data": {
"group": {
"id": "grp_9f3ac2",
"name": "Brand QA",
"agentIds": ["abc123def456", "spell-check"],
"metadata": { "apiKey": "ak_xxx" },
"createdAt": 1711900000000,
"updatedAt": 1711900000000
}
}
}
}
Groups
Create Agent Group
POST
/
v2
/
agents
/
groups
/
create
Create Agent Group
curl --request POST \
--url https://api.velt.dev/v2/agents/groups/create \
--header 'Content-Type: application/json' \
--header 'x-velt-api-key: <x-velt-api-key>' \
--header 'x-velt-auth-token: <x-velt-auth-token>' \
--data '
{
"data": {
"name": "<string>",
"description": "<string>",
"agentIds": [
"<string>"
],
"metadata": {}
}
}
'import requests
url = "https://api.velt.dev/v2/agents/groups/create"
payload = { "data": {
"name": "<string>",
"description": "<string>",
"agentIds": ["<string>"],
"metadata": {}
} }
headers = {
"x-velt-api-key": "<x-velt-api-key>",
"x-velt-auth-token": "<x-velt-auth-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-velt-api-key': '<x-velt-api-key>',
'x-velt-auth-token': '<x-velt-auth-token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
name: '<string>',
description: '<string>',
agentIds: ['<string>'],
metadata: {}
}
})
};
fetch('https://api.velt.dev/v2/agents/groups/create', 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.velt.dev/v2/agents/groups/create",
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([
'data' => [
'name' => '<string>',
'description' => '<string>',
'agentIds' => [
'<string>'
],
'metadata' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-velt-api-key: <x-velt-api-key>",
"x-velt-auth-token: <x-velt-auth-token>"
],
]);
$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.velt.dev/v2/agents/groups/create"
payload := strings.NewReader("{\n \"data\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"agentIds\": [\n \"<string>\"\n ],\n \"metadata\": {}\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-velt-api-key", "<x-velt-api-key>")
req.Header.Add("x-velt-auth-token", "<x-velt-auth-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.velt.dev/v2/agents/groups/create")
.header("x-velt-api-key", "<x-velt-api-key>")
.header("x-velt-auth-token", "<x-velt-auth-token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"agentIds\": [\n \"<string>\"\n ],\n \"metadata\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.velt.dev/v2/agents/groups/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-velt-api-key"] = '<x-velt-api-key>'
request["x-velt-auth-token"] = '<x-velt-auth-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"agentIds\": [\n \"<string>\"\n ],\n \"metadata\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"result": {
"status": "success",
"message": "Agent group created successfully",
"data": {
"group": {
"id": "grp_9f3ac2",
"name": "Brand QA",
"agentIds": ["abc123def456", "spell-check"],
"metadata": { "apiKey": "ak_xxx" },
"createdAt": 1711900000000,
"updatedAt": 1711900000000
}
}
}
}
Use this API to create an agent group. Groups let you bundle custom and/or built-in agents together and filter execution/list responses by group. Agents remain independent documents — a group only stores an
Unknown top-level fields are rejected (
Errors:
agentIds array that references them, and an agent can belong to multiple groups.
Groups are stored at the Firestore path
apiKey/{apiKey}/agentGroup/{groupId}. A workspace may have at most 50 groups (MAX_GROUPS_PER_API_KEY), and each group may contain at most 100 agents (MAX_AGENTS_PER_GROUP).metadata is immutable after creation. There is no way to modify it later — the update endpoint only changes name/description. If you need document or organization context on a group, embed it inside the metadata object you send here. The workspace apiKey is always merged into metadata.apiKey server-side.Endpoint
POST https://api.velt.dev/v2/agents/groups/create
Headers
Your API key.
Your Auth Token.
Body
Params
Show properties
Show properties
Human-readable group name. Trimmed, min 1 char, max 200 chars.
Optional description. Trimmed, max 2000 chars.
Initial members. Each id must be min 1 char. Deduped server-side and capped at 100. Unknown custom-agent ids return
NOT_FOUND; built-in agent ids (e.g. spell-check) are accepted without a lookup.Free-form key/value metadata. Persisted verbatim with the workspace
apiKey merged in as metadata.apiKey. Immutable after creation..strict()).
Example Requests
{
"data": {
"name": "Brand QA",
"description": "All brand-quality agents",
"agentIds": ["abc123def456", "spell-check"],
"metadata": {
"organizationId": "server_org_001",
"documentId": "server_doc_001",
"clientOrganizationId": "org_001",
"clientDocumentId": "doc_001"
}
}
}
Response
Success Response
{
"result": {
"status": "success",
"message": "Agent group created successfully",
"data": {
"group": {
"id": "grp_9f3ac2",
"name": "Brand QA",
"description": "All brand-quality agents",
"agentIds": ["abc123def456", "spell-check"],
"metadata": {
"apiKey": "ak_xxx",
"organizationId": "server_org_001",
"documentId": "server_doc_001",
"clientOrganizationId": "org_001",
"clientDocumentId": "doc_001"
},
"createdAt": 1711900000000,
"updatedAt": 1711900000000
}
}
}
}
| Field | Type | Description |
|---|---|---|
group.id | string | Server-generated group id. |
group.name | string | Group name. |
group.description | string | Group description (omitted if not provided). |
group.agentIds | string[] | Member agent ids (deduped). |
group.metadata | object | Stored metadata, including the merged apiKey. |
group.createdAt | number | Epoch ms creation timestamp. |
group.updatedAt | number | Epoch ms last-updated timestamp. |
Failure Response
{
"error": {
"message": "ERROR_MESSAGE",
"status": "RESOURCE_EXHAUSTED"
}
}
RESOURCE_EXHAUSTED— workspace already hasMAX_GROUPS_PER_API_KEY(50) groups.RESOURCE_EXHAUSTED— initialagentIdsexceedsMAX_AGENTS_PER_GROUP(100).NOT_FOUND— one of the initialagentIdsdoes not exist.INVALID_ARGUMENT— validation failure (missing/emptyname, unknown fields, over-length values).
{
"result": {
"status": "success",
"message": "Agent group created successfully",
"data": {
"group": {
"id": "grp_9f3ac2",
"name": "Brand QA",
"agentIds": ["abc123def456", "spell-check"],
"metadata": { "apiKey": "ak_xxx" },
"createdAt": 1711900000000,
"updatedAt": 1711900000000
}
}
}
}
Was this page helpful?
⌘I

