Skip to main content
POST
/
agents
Create Agent
curl --request POST \
  --url https://eu-gcp-api.vg-stuff.com/v3/agents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agent": {
    "title": "My Customer Service Agent",
    "description": "An AI agent that handles customer inquiries",
    "nodes": [],
    "ownerID": "workspace_123",
    "lastModified": 1234567890,
    "SECRET_API_KEY": "vg_abcdef123456"
  }
}
'
{
  "success": true,
  "message": "Agent created successfully",
  "data": {
    "ID": "ag_123456789",
    "title": "My Customer Service Agent",
    "description": "An AI agent that handles customer inquiries"
  }
}

Example Request

{
  "agent": {
    "title": "My Customer Service Agent",
    "description": "An AI agent that handles customer inquiries",
    "agentPlatform": "vg"
  }
}

Setting Instructions on Create

To set custom instructions when creating an agent, include the nodes array:
{
  "agent": {
    "title": "My Agent",
    "agentPlatform": "vg",
    "nodes": [
      {
        "id": "__start__",
        "name": "Start",
        "instructions": "You are a helpful customer support agent. Be friendly and concise."
      }
    ]
  }
}

Custom Theme

You can set a custom theme during creation:
{
  "agent": {
    "title": "My Agent",
    "customTheme": {
      "themeType": "dark",
      "primary": "#3B82F6"
    }
  }
}

Notes

  • A unique agent ID and secret API key are auto-generated
  • New agents are created with enableNodes: true by default for vg platform
  • Agent limits are enforced based on your plan

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
agent
object
required

Response

Successful response

success
boolean
required
message
string
required
data
object
required