Skip to main content
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": {}
  }
}
'
{
  "result": {
    "status": "success",
    "message": "Agent group created successfully",
    "data": {
      "group": {
        "id": "grp_9f3ac2",
        "name": "Brand QA",
        "agentIds": [],
        "metadata": { "apiKey": "ak_xxx" },
        "createdAt": 1711900000000,
        "updatedAt": 1711900000000
      }
    }
  }
}

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 create an agent group. Groups are lightweight named collections that reference existing agents via an agentIds array — agents themselves remain independent documents and can belong to multiple groups. metadata is an optional, free-form object — mirroring the agent create contract. The workspace apiKey is merged into metadata.apiKey server-side. metadata is immutable after creation — there is no way to modify it via Update Group. If you need document or organization context on a group, embed it inside metadata on create. The schema uses .strict() so unknown top-level fields are rejected with a clear validation error. Limits:
  • Workspace cap: MAX_GROUPS_PER_API_KEY = 50 (enforced via Firestore count() on create)
  • Per-group cap: MAX_AGENTS_PER_GROUP = 100 (enforced inside a Firestore transaction)

Endpoint

POST https://api.velt.dev/v2/agents/groups/create

Headers

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

Body

Params

data
object
required

Example Requests

1. Minimal group

{
  "data": {
    "name": "Brand QA"
  }
}

2. Full group with members and metadata

{
  "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
      }
    }
  }
}

Failure Response

{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "RESOURCE_EXHAUSTED"
  }
}
Errors:
  • INVALID_ARGUMENT — Zod validation failure (missing name, unknown top-level field, etc.)
  • RESOURCE_EXHAUSTED — workspace already has MAX_GROUPS_PER_API_KEY groups, OR initial agentIds exceeds MAX_AGENTS_PER_GROUP
  • NOT_FOUND — one of the initial agentIds does not exist
{
  "result": {
    "status": "success",
    "message": "Agent group created successfully",
    "data": {
      "group": {
        "id": "grp_9f3ac2",
        "name": "Brand QA",
        "agentIds": [],
        "metadata": { "apiKey": "ak_xxx" },
        "createdAt": 1711900000000,
        "updatedAt": 1711900000000
      }
    }
  }
}