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"
}
}
'import requests
url = "https://eu-gcp-api.vg-stuff.com/v3/agents"
payload = { "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"
} }
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({
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'
}
})
};
fetch('https://eu-gcp-api.vg-stuff.com/v3/agents', 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://eu-gcp-api.vg-stuff.com/v3/agents",
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([
'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'
]
]),
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://eu-gcp-api.vg-stuff.com/v3/agents"
payload := strings.NewReader("{\n \"agent\": {\n \"title\": \"My Customer Service Agent\",\n \"description\": \"An AI agent that handles customer inquiries\",\n \"nodes\": [],\n \"ownerID\": \"workspace_123\",\n \"lastModified\": 1234567890,\n \"SECRET_API_KEY\": \"vg_abcdef123456\"\n }\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://eu-gcp-api.vg-stuff.com/v3/agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent\": {\n \"title\": \"My Customer Service Agent\",\n \"description\": \"An AI agent that handles customer inquiries\",\n \"nodes\": [],\n \"ownerID\": \"workspace_123\",\n \"lastModified\": 1234567890,\n \"SECRET_API_KEY\": \"vg_abcdef123456\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu-gcp-api.vg-stuff.com/v3/agents")
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 \"agent\": {\n \"title\": \"My Customer Service Agent\",\n \"description\": \"An AI agent that handles customer inquiries\",\n \"nodes\": [],\n \"ownerID\": \"workspace_123\",\n \"lastModified\": 1234567890,\n \"SECRET_API_KEY\": \"vg_abcdef123456\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Agent created successfully",
"data": {
"ID": "ag_123456789",
"title": "My Customer Service Agent",
"description": "An AI agent that handles customer inquiries"
}
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}Agents
Create Agent
Creates a new AI agent with the specified configuration, this route must use the new V3 endpoints.
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"
}
}
'import requests
url = "https://eu-gcp-api.vg-stuff.com/v3/agents"
payload = { "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"
} }
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({
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'
}
})
};
fetch('https://eu-gcp-api.vg-stuff.com/v3/agents', 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://eu-gcp-api.vg-stuff.com/v3/agents",
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([
'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'
]
]),
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://eu-gcp-api.vg-stuff.com/v3/agents"
payload := strings.NewReader("{\n \"agent\": {\n \"title\": \"My Customer Service Agent\",\n \"description\": \"An AI agent that handles customer inquiries\",\n \"nodes\": [],\n \"ownerID\": \"workspace_123\",\n \"lastModified\": 1234567890,\n \"SECRET_API_KEY\": \"vg_abcdef123456\"\n }\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://eu-gcp-api.vg-stuff.com/v3/agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent\": {\n \"title\": \"My Customer Service Agent\",\n \"description\": \"An AI agent that handles customer inquiries\",\n \"nodes\": [],\n \"ownerID\": \"workspace_123\",\n \"lastModified\": 1234567890,\n \"SECRET_API_KEY\": \"vg_abcdef123456\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu-gcp-api.vg-stuff.com/v3/agents")
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 \"agent\": {\n \"title\": \"My Customer Service Agent\",\n \"description\": \"An AI agent that handles customer inquiries\",\n \"nodes\": [],\n \"ownerID\": \"workspace_123\",\n \"lastModified\": 1234567890,\n \"SECRET_API_KEY\": \"vg_abcdef123456\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Agent created successfully",
"data": {
"ID": "ag_123456789",
"title": "My Customer Service Agent",
"description": "An AI agent that handles customer inquiries"
}
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}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 thenodes 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: trueby default forvgplatform - Agent limits are enforced based on your plan
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Show child attributes
Show child attributes
⌘I
