Skip to main content
POST
/
v2
/
agents
/
groups
/
add-agents
Add Agents to Group
curl --request POST \
  --url https://api.velt.dev/v2/agents/groups/add-agents \
  --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": {
    "groupId": "<string>",
    "agentIds": [
      "<string>"
    ]
  }
}
'
{
  "result": {
    "status": "success",
    "message": "Agents added to group successfully",
    "data": {
      "group": {
        "id": "grp_9f3ac2",
        "name": "Brand QA",
        "agentIds": ["abc123def456"],
        "metadata": { "apiKey": "ak_xxx" },
        "createdAt": 1711900000000,
        "updatedAt": 1711950000000
      }
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://velt-raghul-agent-docs.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Use this API to add one or more agents to an existing group. The operation is idempotent — adding an id that is already a member is a silent success (no duplicate appended, no error). The post-add membership size is enforced atomically inside a Firestore transaction at MAX_AGENTS_PER_GROUP = 100. Built-in agent ids are accepted without a Firestore lookup; custom agent ids are validated in a single batched read before the transaction.

Endpoint

POST https://api.velt.dev/v2/agents/groups/add-agents

Headers

x-velt-api-key
string
required
Your API key.
x-velt-auth-token
string
required

Body

Params

data
object
required

Example Requests

1. Add a single custom agent

{
  "data": {
    "groupId": "grp_9f3ac2",
    "agentIds": ["abc123def456"]
  }
}

2. Add multiple agents (mix of custom and built-in)

{
  "data": {
    "groupId": "grp_9f3ac2",
    "agentIds": ["abc123def456", "spell-check", "broken-links"]
  }
}

Response

Success Response

{
  "result": {
    "status": "success",
    "message": "Agents added to group successfully",
    "data": {
      "group": {
        "id": "grp_9f3ac2",
        "name": "Brand QA",
        "agentIds": ["abc123def456", "spell-check", "broken-links"],
        "metadata": { "apiKey": "ak_xxx" },
        "createdAt": 1711900000000,
        "updatedAt": 1711950000000
      }
    }
  }
}
FieldTypeDescription
data.groupobjectThe updated group document

Failure Response

{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "RESOURCE_EXHAUSTED"
  }
}
Errors:
  • NOT_FOUND — group does not exist, OR any provided custom agentId does not exist
  • RESOURCE_EXHAUSTED — resulting group size would exceed MAX_AGENTS_PER_GROUP
  • INVALID_ARGUMENT — empty agentIds array, or any id is empty
{
  "result": {
    "status": "success",
    "message": "Agents added to group successfully",
    "data": {
      "group": {
        "id": "grp_9f3ac2",
        "name": "Brand QA",
        "agentIds": ["abc123def456"],
        "metadata": { "apiKey": "ak_xxx" },
        "createdAt": 1711900000000,
        "updatedAt": 1711950000000
      }
    }
  }
}