Agents
An agent pairs a model with a system prompt, a set of tools, and optional skills. Agents come in two kinds: system agents, curated for the deployment and visible to everyone, and agents you create, which are private to you. The two share one namespace and one object shape.
The registry endpoints below address agents you create by their id. Listing and running also accept system agents. All calls are scoped to the caller: you see and can run system agents plus your own (and any shared with you), and only the owner of an agent can update or delete it.
Running an agent is a single synchronous call to Run an agent; everything else manages the registry. Agents can be scoped to workspaces, which determine the tools and knowledge sources available to a run.
- GET /api/agent/list List agents
- POST /api/agent/db Create an agent
- GET /api/agent/db/id/{agent_id} Retrieve an agent
- PUT /api/agent/db/id/{agent_id} Update an agent
- DEL /api/agent/db/id/{agent_id} Delete an agent
- POST /api/agent/execute Run an agent
- POST /api/agent/generate-system-prompt Generate a system prompt
- POST /api/agent/create-with-llm/chat Draft an agent conversationally
- POST /api/agent/create-with-llm/confirm Create an agent from a draft
- GET /api/agent/db/{agent_name} Manage an agent by name
- GET /api/agent/info/{agent_name} Retrieve a system agent by name
Paths are relative to /agent-hub-api
The agent object
The configuration of a single agent.
Attributes
-
idnullable stringUnique identifier, a UUID. System agents that have not been persisted may report
null. -
namestringDisplay name. For agents you create it matches
^[a-zA-Z0-9_]+$and is unique within your own agents. -
descriptionnullable stringFree-text summary of what the agent does.
-
versionstringAuthor-assigned version string, such as
1.0. -
owner_user_idnullable integerThe user who owns the agent, or
nullfor a system agent. -
domain_idnullable stringThe domain the agent belongs to, or
null. -
domain_slugnullable stringSlug of the agent's domain.
-
domain_namenullable stringDisplay name of the agent's domain.
-
categorynullable stringOptional grouping label.
-
sub_categorynullable stringOptional secondary grouping label.
-
model_namenullable stringIdentifier of the model the agent runs on, from your model catalogue.
-
system_promptnullable stringThe instructions prepended to every run.
-
competenciesarray of stringsFree-text capability tags.
-
skillsarray of stringsDeprecated alias for
competencies, carrying the same values. Readcompetenciesinstead. -
skills_configarray of objectsSkills bound to the agent.
Show child attributes Hide child attributes
-
namestringThe skill name.
-
versionnullable stringPinned skill version, or
nullfor the current one.
-
-
output_formatstringExpected output shape.
Possible values-
text -
json -
widget
-
-
tools_configarray of objectsThe tools available to the agent, each with a
nameand a parameter schema. See Tools. -
model_parametersobjectGeneration parameters such as
temperature,max_tokens,top_p,frequency_penalty, andpresence_penalty. -
is_user_createdbooleantruefor an agent you created,falsefor a system agent. -
workspace_idsarray of stringsIdentifiers of the workspaces the agent belongs to.
-
workspace_slugsarray of stringsSlugs of the workspaces the agent belongs to.
-
skill_tool_gapsobjectFor each bound skill, the tools it declares as allowed that the agent does not currently grant. An empty object means every skill has the tools it expects.
-
created_atstringCreation timestamp, ISO 8601.
-
updated_atstringLast-update timestamp, ISO 8601.
{
"id": "3f1a7b2e-9c4d-4e5a-8b1f-2d6c9a0e4f11",
"name": "quarterly_report_writer",
"description": "Drafts quarterly business reports from supplied figures.",
"version": "1.0",
"owner_user_id": 42,
"domain_id": "b7d34a10-2f6c-4c1e-9a3e-7e2f5c8d1a90",
"domain_slug": "communication",
"domain_name": "Communication",
"category": "communication",
"sub_category": "reporting",
"model_name": "llama-3.3-70b-instruct",
"system_prompt": "You are a concise business report writer. Use the figures provided and do not invent numbers.",
"competencies": [
"summarisation",
"business writing"
],
"skills": [
"summarisation",
"business writing"
],
"skills_config": [
{
"name": "report-formatting",
"version": null
}
],
"output_format": "text",
"tools_config": [
{
"name": "web_search",
"type": "mcp",
"description": "Search the web.",
"parameters_schema": {
"type": "object",
"properties": {
"query": {
"type": "string"
}
},
"required": [
"query"
]
}
}
],
"model_parameters": {
"temperature": 0.7,
"max_tokens": 2000
},
"is_user_created": true,
"workspace_ids": [
"a2c4e6f8-1234-4abc-9def-0123456789ab"
],
"workspace_slugs": [
"finance"
],
"skill_tool_gaps": {},
"created_at": "2026-09-01T09:30:00",
"updated_at": "2026-09-01T09:30:00"
} List agents
GET /agent-hub-api/api/agent/list
Returns the agents the caller can run.
Returns system agents plus the agents you own (and any shared with you). Each entry is a compact summary rather than the full agent object.
Use source to choose where agents are drawn from. Filter to a single workspace with workspace_slug or workspace_id, or with the X-Workspace-Slug header; workspaces shared with your company are included. Send an empty X-Workspace-Slug header to opt out of the active-workspace filter and list every agent.
- Authentication
- Bearer token How it works
Headers
-
X-Workspace-SlugstringActive workspace to filter by. An empty value disables workspace filtering.
Query parameters
-
sourcestringWhere to list agents from:
yamlfor system agents,dbfor stored agents, orallfor both.Possible values-
yaml -
db -
all
-
-
user_onlybooleanWhen
sourceisdb, restrict the result to agents you created. -
domain_idstringReturn only agents in this domain.
-
workspace_slugstringReturn only agents belonging to the workspace with this slug.
-
workspace_idstringReturn only agents belonging to the workspace with this identifier.
Returns
Returns an object with an agents array of agent summaries.
curl "$VDF_BASE_URL/agent-hub-api/api/agent/list?source=all" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" const response = await fetch(`${process.env.VDF_BASE_URL}/agent-hub-api/api/agent/list?source=all`, {
headers: {
Authorization: `Bearer ${process.env.VDF_ACCESS_TOKEN}`,
},
});
if (!response.ok) throw new Error(`Request failed with status ${response.status}`);
const data = await response.json(); import os
import requests
response = requests.get(
f"{os.environ['VDF_BASE_URL']}/agent-hub-api/api/agent/list",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
params={
"source": "all",
},
timeout=30,
)
response.raise_for_status()
data = response.json() {
"ok": true,
"user_id": 42,
"agents": [
{
"id": "3f1a7b2e-9c4d-4e5a-8b1f-2d6c9a0e4f11",
"name": "quarterly_report_writer",
"description": "Drafts quarterly business reports from supplied figures.",
"domain_id": "b7d34a10-2f6c-4c1e-9a3e-7e2f5c8d1a90",
"domain_slug": "communication",
"domain_name": "Communication",
"category": "communication",
"sub_category": "reporting",
"model": "llama-3.3-70b-instruct",
"cached": false,
"source": "db",
"is_user_created": true,
"owner_user_id": 42
}
]
} Create an agent
POST /agent-hub-api/api/agent/db
Creates an agent that you own.
Creates an agent owned by the caller. name and model_name are required; the model must exist in your catalogue.
Tool references may be tool names or objects with a name; each is resolved against the tool catalogue and rejected if unknown. Skill references are validated against the skills visible to you. If you supply one or more workspaces, the agent is added to them, and the domain (when given) must be mapped to each of those workspaces.
- Authentication
- Bearer token How it works
Headers
-
X-Workspace-SlugstringWorkspace to attach the agent to when no
workspace_idsorworkspace_slugsare supplied.
Body parameters application/json
-
namestring RequiredAgent name. Must match
^[a-zA-Z0-9_]+$and be unique among your agents. -
model_namestring RequiredIdentifier of a model in your catalogue.
-
descriptionstringFree-text summary.
-
versionstringVersion string.
-
system_promptstringInstructions prepended to every run.
-
domain_idstringDomain to file the agent under.
-
categorystringOptional grouping label.
-
sub_categorystringOptional secondary grouping label.
-
competenciesarray of stringsFree-text capability tags.
-
output_formatstringExpected output shape.
Possible values-
text -
json -
widget
-
-
toolsarray of stringsTool references, given as names or objects with a
name. Each must resolve to a known tool. -
skills_configarray of objectsSkills to bind, as names or
{name, version}objects. -
model_parametersobjectGeneration parameters such as
temperatureandmax_tokens. -
workspace_idsarray of stringsWorkspaces to attach the agent to, by identifier.
-
workspace_slugsarray of stringsWorkspaces to attach the agent to, by slug.
Returns
Returns the created agent object under data.
Errors
- 400 A required field is missing, or tool, skill, or workspace validation failed.
- 401 The request carries no usable user identity.
- 503 Tool references could not be resolved because the tool service was unavailable.
curl -X POST "$VDF_BASE_URL/agent-hub-api/api/agent/db" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "quarterly_report_writer",
"model_name": "llama-3.3-70b-instruct",
"description": "Drafts quarterly business reports from supplied figures.",
"system_prompt": "You are a concise business report writer. Use the figures provided and do not invent numbers.",
"competencies": [
"summarisation",
"business writing"
],
"output_format": "text",
"tools": [
"web_search"
],
"model_parameters": {
"temperature": 0.7,
"max_tokens": 2000
},
"workspace_slugs": [
"finance"
]
}' const response = await fetch(`${process.env.VDF_BASE_URL}/agent-hub-api/api/agent/db`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.VDF_ACCESS_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'quarterly_report_writer',
model_name: 'llama-3.3-70b-instruct',
description: 'Drafts quarterly business reports from supplied figures.',
system_prompt: 'You are a concise business report writer. Use the figures provided and do not invent numbers.',
competencies: ['summarisation', 'business writing'],
output_format: 'text',
tools: ['web_search'],
model_parameters: {
temperature: 0.7,
max_tokens: 2000,
},
workspace_slugs: ['finance'],
}),
});
if (!response.ok) throw new Error(`Request failed with status ${response.status}`);
const data = await response.json(); import os
import requests
response = requests.post(
f"{os.environ['VDF_BASE_URL']}/agent-hub-api/api/agent/db",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
json={
"name": "quarterly_report_writer",
"model_name": "llama-3.3-70b-instruct",
"description": "Drafts quarterly business reports from supplied figures.",
"system_prompt": "You are a concise business report writer. Use the figures provided and do not invent numbers.",
"competencies": ["summarisation", "business writing"],
"output_format": "text",
"tools": ["web_search"],
"model_parameters": {
"temperature": 0.7,
"max_tokens": 2000,
},
"workspace_slugs": ["finance"],
},
timeout=30,
)
response.raise_for_status()
data = response.json() {
"success": true,
"message": "Agent 'quarterly_report_writer' created in database",
"data": {
"id": "3f1a7b2e-9c4d-4e5a-8b1f-2d6c9a0e4f11",
"name": "quarterly_report_writer",
"description": "Drafts quarterly business reports from supplied figures.",
"version": "1.0",
"owner_user_id": 42,
"model_name": "llama-3.3-70b-instruct",
"output_format": "text",
"competencies": [
"summarisation",
"business writing"
],
"tools_config": [
{
"name": "web_search",
"type": "mcp",
"description": "Search the web.",
"parameters_schema": {
"type": "object",
"properties": {
"query": {
"type": "string"
}
},
"required": [
"query"
]
}
}
],
"model_parameters": {
"temperature": 0.7,
"max_tokens": 2000
},
"is_user_created": true,
"workspace_ids": [
"a2c4e6f8-1234-4abc-9def-0123456789ab"
],
"workspace_slugs": [
"finance"
],
"skill_tool_gaps": {},
"created_at": "2026-09-01T09:30:00",
"updated_at": "2026-09-01T09:30:00"
}
} Retrieve an agent
GET /agent-hub-api/api/agent/db/id/{agent_id}
Retrieves a single agent by its identifier.
Returns the full agent object. System agents are visible to everyone; an agent you created is visible only to you. An agent that is not visible to the caller returns 404.
- Authentication
- Bearer token How it works
Path parameters
-
agent_idstring RequiredThe agent identifier (UUID).
Returns
Returns the agent object under data.
Errors
- 401 The request carries no usable user identity.
- 404 No agent with this identifier is visible to the caller.
curl "$VDF_BASE_URL/agent-hub-api/api/agent/db/id/3f1a7b2e-9c4d-4e5a-8b1f-2d6c9a0e4f11" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" const response = await fetch(`${process.env.VDF_BASE_URL}/agent-hub-api/api/agent/db/id/3f1a7b2e-9c4d-4e5a-8b1f-2d6c9a0e4f11`, {
headers: {
Authorization: `Bearer ${process.env.VDF_ACCESS_TOKEN}`,
},
});
if (!response.ok) throw new Error(`Request failed with status ${response.status}`);
const data = await response.json(); import os
import requests
response = requests.get(
f"{os.environ['VDF_BASE_URL']}/agent-hub-api/api/agent/db/id/3f1a7b2e-9c4d-4e5a-8b1f-2d6c9a0e4f11",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
timeout=30,
)
response.raise_for_status()
data = response.json() {
"success": true,
"data": {
"id": "3f1a7b2e-9c4d-4e5a-8b1f-2d6c9a0e4f11",
"name": "quarterly_report_writer",
"description": "Drafts quarterly business reports from supplied figures.",
"version": "1.0",
"owner_user_id": 42,
"domain_id": "b7d34a10-2f6c-4c1e-9a3e-7e2f5c8d1a90",
"domain_slug": "communication",
"model_name": "llama-3.3-70b-instruct",
"system_prompt": "You are a concise business report writer. Use the figures provided and do not invent numbers.",
"competencies": [
"summarisation",
"business writing"
],
"skills_config": [
{
"name": "report-formatting",
"version": null
}
],
"output_format": "text",
"tools_config": [
{
"name": "web_search",
"type": "mcp",
"description": "Search the web.",
"parameters_schema": {
"type": "object",
"properties": {
"query": {
"type": "string"
}
},
"required": [
"query"
]
}
}
],
"model_parameters": {
"temperature": 0.7,
"max_tokens": 2000
},
"is_user_created": true,
"workspace_ids": [
"a2c4e6f8-1234-4abc-9def-0123456789ab"
],
"workspace_slugs": [
"finance"
],
"skill_tool_gaps": {},
"created_at": "2026-09-01T09:30:00",
"updated_at": "2026-09-01T09:30:00"
}
} Update an agent
PUT /agent-hub-api/api/agent/db/id/{agent_id}
Updates an agent you own.
Applies a partial update: send only the fields you want to change. Only an agent you created can be updated through this endpoint, and only by its owner; anything else returns 404.
Supplying workspace_ids or workspace_slugs replaces the agent's workspace membership, and at least one workspace must remain. Tool references are re-resolved against the catalogue on every update.
- Authentication
- Bearer token How it works
Path parameters
-
agent_idstring RequiredThe agent identifier (UUID).
Body parameters application/json
-
descriptionstringFree-text summary.
-
model_namestringIdentifier of a model in your catalogue.
-
system_promptstringInstructions prepended to every run.
-
domain_idstringDomain to file the agent under.
-
categorystringOptional grouping label.
-
sub_categorystringOptional secondary grouping label.
-
competenciesarray of stringsFree-text capability tags.
-
skills_configarray of objectsSkills to bind, as names or
{name, version}objects. -
output_formatstringExpected output shape.
Possible values-
text -
json -
widget
-
-
versionstringVersion string.
-
toolsarray of stringsTool references, replacing the agent's tools.
-
model_parametersobjectGeneration parameters.
-
workspace_idsarray of stringsReplacement workspace membership, by identifier.
-
workspace_slugsarray of stringsReplacement workspace membership, by slug.
Returns
Returns the updated agent object under data.
Errors
- 400 The body is empty, tool or workspace validation failed, or the agent cannot be updated through this endpoint.
- 401 The request carries no usable user identity.
- 404 No agent with this identifier is owned by the caller.
- 503 Tool references could not be resolved because the tool service was unavailable.
curl -X PUT "$VDF_BASE_URL/agent-hub-api/api/agent/db/id/3f1a7b2e-9c4d-4e5a-8b1f-2d6c9a0e4f11" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"description": "Drafts quarterly and annual business reports.",
"model_parameters": {
"temperature": 0.5,
"max_tokens": 3000
}
}' const response = await fetch(`${process.env.VDF_BASE_URL}/agent-hub-api/api/agent/db/id/3f1a7b2e-9c4d-4e5a-8b1f-2d6c9a0e4f11`, {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.VDF_ACCESS_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
description: 'Drafts quarterly and annual business reports.',
model_parameters: {
temperature: 0.5,
max_tokens: 3000,
},
}),
});
if (!response.ok) throw new Error(`Request failed with status ${response.status}`);
const data = await response.json(); import os
import requests
response = requests.put(
f"{os.environ['VDF_BASE_URL']}/agent-hub-api/api/agent/db/id/3f1a7b2e-9c4d-4e5a-8b1f-2d6c9a0e4f11",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
json={
"description": "Drafts quarterly and annual business reports.",
"model_parameters": {
"temperature": 0.5,
"max_tokens": 3000,
},
},
timeout=30,
)
response.raise_for_status()
data = response.json() {
"success": true,
"data": {
"id": "3f1a7b2e-9c4d-4e5a-8b1f-2d6c9a0e4f11",
"name": "quarterly_report_writer",
"description": "Drafts quarterly and annual business reports.",
"version": "1.0",
"owner_user_id": 42,
"model_name": "llama-3.3-70b-instruct",
"output_format": "text",
"competencies": [
"summarisation",
"business writing"
],
"tools_config": [
{
"name": "web_search",
"type": "mcp",
"description": "Search the web.",
"parameters_schema": {
"type": "object",
"properties": {
"query": {
"type": "string"
}
},
"required": [
"query"
]
}
}
],
"model_parameters": {
"temperature": 0.5,
"max_tokens": 3000
},
"is_user_created": true,
"workspace_ids": [
"a2c4e6f8-1234-4abc-9def-0123456789ab"
],
"workspace_slugs": [
"finance"
],
"skill_tool_gaps": {},
"created_at": "2026-09-01T09:30:00",
"updated_at": "2026-09-02T11:15:00"
}
} Delete an agent
DEL /agent-hub-api/api/agent/db/id/{agent_id}
Permanently deletes an agent you created. Only the owner may delete it; an identifier that is not yours returns 404, and a system agent cannot be deleted through this endpoint.
- Authentication
- Bearer token How it works
Path parameters
-
agent_idstring RequiredThe agent identifier (UUID).
Returns
Returns success: true and a confirmation message once the agent is deleted.
Errors
- 400 The agent cannot be deleted through this endpoint.
- 401 The request carries no usable user identity.
- 404 No agent with this identifier is owned by the caller.
curl -X DELETE "$VDF_BASE_URL/agent-hub-api/api/agent/db/id/3f1a7b2e-9c4d-4e5a-8b1f-2d6c9a0e4f11" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" const response = await fetch(`${process.env.VDF_BASE_URL}/agent-hub-api/api/agent/db/id/3f1a7b2e-9c4d-4e5a-8b1f-2d6c9a0e4f11`, {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.VDF_ACCESS_TOKEN}`,
},
});
if (!response.ok) throw new Error(`Request failed with status ${response.status}`);
const data = await response.json(); import os
import requests
response = requests.delete(
f"{os.environ['VDF_BASE_URL']}/agent-hub-api/api/agent/db/id/3f1a7b2e-9c4d-4e5a-8b1f-2d6c9a0e4f11",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
timeout=30,
)
response.raise_for_status()
data = response.json() {
"success": true,
"message": "Agent deleted"
} Run an agent
POST /agent-hub-api/api/agent/execute
Runs a named agent against a prompt and returns its output, the model that produced it, any tool it called, and the token usage recorded for your licence. Identify the agent by agent_name (system or your own) or by agent_id (an agent you own); one of the two is required, along with prompt.
Before the model is called, the agent's tools are filtered to those you are entitled to use. To run inside a workspace, pass context.workspace_id or context.workspace_slug, or the X-Workspace-Slug header. The workspace is resolved on the server against your visibility and its tools, knowledge sources, and callable templates are applied to the run; any workspace fields you place in context are replaced by the server-resolved values.
This is a synchronous call: the response arrives when the agent has finished, which can take several minutes.
- Authentication
- Bearer token How it works
Headers
-
X-Workspace-SlugstringWorkspace to run inside, used when
contextcarries no workspace.
Body parameters application/json
-
agent_namestringName of the agent to run. Required unless
agent_idis given. -
agent_idstringIdentifier of an agent you own. Required unless
agent_nameis given. -
promptstring RequiredThe instruction or question for the agent.
-
contextobjectOptional run context.
Show child parameters Hide child parameters
-
workspace_idstringWorkspace to scope the run to, by identifier.
-
workspace_slugstringWorkspace to scope the run to, by slug.
-
session_idstringExisting conversation to continue. A new session is created when omitted.
-
client_idstringIdentifier of the calling client application, recorded with the run.
-
Returns
Returns the run result, including the generated output and token usage.
Errors
- 400
promptis missing, or neitheragent_namenoragent_idwas given. - 403 The agent is not permitted for the calling application.
- 404 No agent matching the request is visible to the caller.
- 500 The run failed while calling the model or a tool.
curl -X POST "$VDF_BASE_URL/agent-hub-api/api/agent/execute" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"agent_name": "quarterly_report_writer",
"prompt": "Summarise Q3: revenue 4.2M, up 12% QoQ; churn down to 1.8%.",
"context": {
"workspace_slug": "finance"
}
}' const response = await fetch(`${process.env.VDF_BASE_URL}/agent-hub-api/api/agent/execute`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.VDF_ACCESS_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
agent_name: 'quarterly_report_writer',
prompt: 'Summarise Q3: revenue 4.2M, up 12% QoQ; churn down to 1.8%.',
context: {
workspace_slug: 'finance',
},
}),
});
if (!response.ok) throw new Error(`Request failed with status ${response.status}`);
const data = await response.json(); import os
import requests
response = requests.post(
f"{os.environ['VDF_BASE_URL']}/agent-hub-api/api/agent/execute",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
json={
"agent_name": "quarterly_report_writer",
"prompt": "Summarise Q3: revenue 4.2M, up 12% QoQ; churn down to 1.8%.",
"context": {
"workspace_slug": "finance",
},
},
timeout=600,
)
response.raise_for_status()
data = response.json() {
"success": true,
"agent": "quarterly_report_writer",
"model": "llama-3.3-70b-instruct",
"output": "Q3 revenue reached 4.2M, up 12% quarter over quarter, while churn fell to 1.8%...",
"tool": null,
"tool_result": null,
"usage": {
"input": 210,
"output": 180,
"total": 390
},
"session_id": "d5b9f1a2-3c4e-4f6a-8b0c-1e2d3f4a5b6c",
"execution_id": "e1f2a3b4-5c6d-4e7f-8a9b-0c1d2e3f4a5b"
} Generate a system prompt
POST /agent-hub-api/api/agent/generate-system-prompt
Drafts a system prompt from a description of the agent.
Generates a structured system prompt from an agent's details, to use as a starting point when creating or editing an agent. name, description, and model_name are required. Tools may be given as names or as objects with a name and description. This calls a model and requires your deployment's model provider to be configured.
- Authentication
- Bearer token How it works
Body parameters application/json
-
namestring RequiredThe agent's name.
-
descriptionstring RequiredWhat the agent should do.
-
model_namestring RequiredIdentifier of the model the agent will use.
-
versionstringVersion string.
-
competenciesarray of stringsCapability tags to reflect in the prompt.
-
output_formatstringOutput shape to reflect in the prompt.
Possible values-
text -
json -
widget
-
-
toolsarray of stringsTool references, as names or
{name, description}objects. -
model_parametersobjectGeneration parameters to mention in the prompt.
Returns
Returns the generated prompt as system_prompt.
Errors
- 400 A required field is missing, or the model provider is not configured.
- 500 The prompt could not be generated.
curl -X POST "$VDF_BASE_URL/agent-hub-api/api/agent/generate-system-prompt" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "quarterly_report_writer",
"description": "Drafts quarterly business reports from supplied figures.",
"model_name": "llama-3.3-70b-instruct",
"competencies": [
"summarisation",
"business writing"
],
"output_format": "text",
"tools": [
"web_search"
]
}' const response = await fetch(`${process.env.VDF_BASE_URL}/agent-hub-api/api/agent/generate-system-prompt`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.VDF_ACCESS_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'quarterly_report_writer',
description: 'Drafts quarterly business reports from supplied figures.',
model_name: 'llama-3.3-70b-instruct',
competencies: ['summarisation', 'business writing'],
output_format: 'text',
tools: ['web_search'],
}),
});
if (!response.ok) throw new Error(`Request failed with status ${response.status}`);
const data = await response.json(); import os
import requests
response = requests.post(
f"{os.environ['VDF_BASE_URL']}/agent-hub-api/api/agent/generate-system-prompt",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
json={
"name": "quarterly_report_writer",
"description": "Drafts quarterly business reports from supplied figures.",
"model_name": "llama-3.3-70b-instruct",
"competencies": ["summarisation", "business writing"],
"output_format": "text",
"tools": ["web_search"],
},
timeout=30,
)
response.raise_for_status()
data = response.json() {
"success": true,
"system_prompt": "Role: You are a concise business report writer.\nGoals:\n- Turn supplied figures into a clear quarterly report.\n..."
} Draft an agent conversationally
POST /agent-hub-api/api/agent/create-with-llm/chat
Advances an assisted, chat-driven agent draft one turn.
Takes the conversation so far and the current draft and returns an assistant reply plus an updated draft, so an agent can be assembled through dialogue. The model may only choose from the domains, models, tools, and workspaces available to you. When missing_fields is empty and there are no validation errors, ready_to_create is true and the draft can be sent to Create an agent from a draft.
- Authentication
- Bearer token How it works
Headers
-
X-Workspace-SlugstringActive workspace used to seed the draft's workspace when none is supplied in
context.
Body parameters application/json
-
messagesarray of objects RequiredThe conversation so far. A non-empty list of
{role, content}items whereroleisuserorassistant.Show child parameters Hide child parameters
-
rolestringuserorassistant.Possible values-
user -
assistant
-
-
contentstringMessage text.
-
-
draftobjectThe current agent draft to refine.
-
contextobjectOptional workspace seed.
Show child parameters Hide child parameters
-
workspace_idsarray of stringsWorkspaces to associate the draft with, by identifier.
-
workspace_slugsarray of stringsWorkspaces to associate the draft with, by slug.
-
Returns
Returns the assistant reply, the merged draft, and readiness information.
Errors
- 400
messagesis missing or not a non-empty list of valid{role, content}items. - 401 The request carries no usable user identity.
- 500 The assisted draft could not be generated.
curl -X POST "$VDF_BASE_URL/agent-hub-api/api/agent/create-with-llm/chat" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{
"role": "user",
"content": "I want an agent that drafts quarterly reports."
}
],
"draft": {}
}' const response = await fetch(`${process.env.VDF_BASE_URL}/agent-hub-api/api/agent/create-with-llm/chat`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.VDF_ACCESS_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
messages: [
{
role: 'user',
content: 'I want an agent that drafts quarterly reports.',
},
],
draft: {},
}),
});
if (!response.ok) throw new Error(`Request failed with status ${response.status}`);
const data = await response.json(); import os
import requests
response = requests.post(
f"{os.environ['VDF_BASE_URL']}/agent-hub-api/api/agent/create-with-llm/chat",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
json={
"messages": [
{
"role": "user",
"content": "I want an agent that drafts quarterly reports.",
},
],
"draft": {},
},
timeout=30,
)
response.raise_for_status()
data = response.json() {
"success": true,
"assistant_message": "Which model should it use, and should it be able to search the web?",
"draft": {
"name": "quarterly_report_writer",
"description": "Drafts quarterly business reports.",
"output_format": "text",
"competencies": [
"business writing"
]
},
"missing_fields": [
"model_name",
"domain_id",
"version"
],
"ready_to_create": false
} Create an agent from a draft
POST /agent-hub-api/api/agent/create-with-llm/confirm
Creates an agent from a completed assisted draft.
Validates a completed draft and creates the agent you own. A missing system_prompt is generated automatically from the draft. Tools and skills are resolved and validated, workspaces are attached, and the chosen domain must be mapped to each attached workspace.
- Authentication
- Bearer token How it works
Headers
-
X-Workspace-SlugstringWorkspace to attach the agent to when the draft names none.
Body parameters application/json
-
draftobject RequiredThe completed draft, carrying at least the required fields (
name,description,version,domain_id,model_name,output_format,competencies). -
messagesarray of objectsThe originating conversation, for context.
-
workspace_slugsarray of stringsWorkspaces to attach the agent to, by slug.
Returns
Returns the created agent object under data.
Errors
- 400 The draft failed validation, or tool, workspace, or domain checks failed.
- 401 The request carries no usable user identity.
- 503 Tool references could not be resolved because the tool service was unavailable.
- 500 The agent could not be created.
curl -X POST "$VDF_BASE_URL/agent-hub-api/api/agent/create-with-llm/confirm" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{
"role": "user",
"content": "I want an agent that drafts quarterly reports."
}
],
"draft": {
"name": "quarterly_report_writer",
"description": "Drafts quarterly business reports from supplied figures.",
"version": "1.0",
"domain_id": "b7d34a10-2f6c-4c1e-9a3e-7e2f5c8d1a90",
"model_name": "llama-3.3-70b-instruct",
"output_format": "text",
"competencies": [
"business writing"
],
"tools": [
"web_search"
]
}
}' const response = await fetch(`${process.env.VDF_BASE_URL}/agent-hub-api/api/agent/create-with-llm/confirm`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.VDF_ACCESS_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
messages: [
{
role: 'user',
content: 'I want an agent that drafts quarterly reports.',
},
],
draft: {
name: 'quarterly_report_writer',
description: 'Drafts quarterly business reports from supplied figures.',
version: '1.0',
domain_id: 'b7d34a10-2f6c-4c1e-9a3e-7e2f5c8d1a90',
model_name: 'llama-3.3-70b-instruct',
output_format: 'text',
competencies: ['business writing'],
tools: ['web_search'],
},
}),
});
if (!response.ok) throw new Error(`Request failed with status ${response.status}`);
const data = await response.json(); import os
import requests
response = requests.post(
f"{os.environ['VDF_BASE_URL']}/agent-hub-api/api/agent/create-with-llm/confirm",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
json={
"messages": [
{
"role": "user",
"content": "I want an agent that drafts quarterly reports.",
},
],
"draft": {
"name": "quarterly_report_writer",
"description": "Drafts quarterly business reports from supplied figures.",
"version": "1.0",
"domain_id": "b7d34a10-2f6c-4c1e-9a3e-7e2f5c8d1a90",
"model_name": "llama-3.3-70b-instruct",
"output_format": "text",
"competencies": ["business writing"],
"tools": ["web_search"],
},
},
timeout=30,
)
response.raise_for_status()
data = response.json() {
"success": true,
"message": "Agent 'quarterly_report_writer' created in database",
"data": {
"id": "3f1a7b2e-9c4d-4e5a-8b1f-2d6c9a0e4f11",
"name": "quarterly_report_writer",
"description": "Drafts quarterly business reports from supplied figures.",
"version": "1.0",
"owner_user_id": 42,
"domain_id": "b7d34a10-2f6c-4c1e-9a3e-7e2f5c8d1a90",
"model_name": "llama-3.3-70b-instruct",
"output_format": "text",
"competencies": [
"business writing"
],
"tools_config": [
{
"name": "web_search",
"type": "mcp",
"description": "Search the web.",
"parameters_schema": {
"type": "object",
"properties": {
"query": {
"type": "string"
}
},
"required": [
"query"
]
}
}
],
"model_parameters": {
"temperature": 0.7,
"max_tokens": 2000,
"top_p": 0.95,
"frequency_penalty": 0.2,
"presence_penalty": 0.1
},
"is_user_created": true,
"workspace_ids": [
"a2c4e6f8-1234-4abc-9def-0123456789ab"
],
"workspace_slugs": [
"finance"
],
"skill_tool_gaps": {},
"created_at": "2026-09-01T09:30:00",
"updated_at": "2026-09-01T09:30:00"
}
} Manage an agent by name Deprecated
GET /agent-hub-api/api/agent/db/{agent_name}
Also available as PUT /agent-hub-api/api/agent/db/{agent_name} DEL /agent-hub-api/api/agent/db/{agent_name}
Retired: name-based access to a stored agent is no longer supported.
This path is retired. Because agents you create are addressed by id (names are not unique across users), the GET, PUT, and DELETE methods on this path all return 400 with a message directing you to the identifier-based endpoints. Use Retrieve an agent, Update an agent, and Delete an agent instead.
- Authentication
- Bearer token How it works
Path parameters
-
agent_namestring RequiredIgnored; the request is rejected whatever value is given.
Returns
Always returns 400 directing you to the identifier-based endpoints.
Errors
- 400 Always returned: name-based access is not supported. Use the identifier-based endpoints.
curl "$VDF_BASE_URL/agent-hub-api/api/agent/db/quarterly_report_writer" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" const response = await fetch(`${process.env.VDF_BASE_URL}/agent-hub-api/api/agent/db/quarterly_report_writer`, {
headers: {
Authorization: `Bearer ${process.env.VDF_ACCESS_TOKEN}`,
},
});
if (!response.ok) throw new Error(`Request failed with status ${response.status}`);
const data = await response.json(); import os
import requests
response = requests.get(
f"{os.environ['VDF_BASE_URL']}/agent-hub-api/api/agent/db/quarterly_report_writer",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
timeout=30,
)
response.raise_for_status()
data = response.json() {
"success": false,
"error": "Name-based DB agent lookup is not supported. Use the identifier-based endpoint instead."
} Retrieve a system agent by name Deprecated
GET /agent-hub-api/api/agent/info/{agent_name}
Returns the details of a system agent identified by name. It resolves only system agents (the curated agents visible to everyone), so a name that is not a system agent returns 404. This is a legacy view retained for compatibility; retrieve any agent by its identifier with Retrieve an agent instead.
- Authentication
- Bearer token How it works
Path parameters
-
agent_namestring RequiredName of the system agent to look up.
Query parameters
-
sourcestringWhere to read the agent from:
yamlfor the curated definitions, ordb/hybridfor the stored registry when it is enabled.Possible values-
yaml -
db -
hybrid
-
Returns
Returns the system agent's details.
Errors
- 404 No system agent with this name exists.
- 500 The agent details could not be read.
curl "$VDF_BASE_URL/agent-hub-api/api/agent/info/simple_assistant" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" const response = await fetch(`${process.env.VDF_BASE_URL}/agent-hub-api/api/agent/info/simple_assistant`, {
headers: {
Authorization: `Bearer ${process.env.VDF_ACCESS_TOKEN}`,
},
});
if (!response.ok) throw new Error(`Request failed with status ${response.status}`);
const data = await response.json(); import os
import requests
response = requests.get(
f"{os.environ['VDF_BASE_URL']}/agent-hub-api/api/agent/info/simple_assistant",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
timeout=30,
)
response.raise_for_status()
data = response.json() {
"name": "Simple Assistant",
"description": "A versatile general-purpose assistant.",
"version": "1.1",
"domain_id": "b7d34a10-2f6c-4c1e-9a3e-7e2f5c8d1a90",
"domain_slug": "general",
"domain_name": "General",
"category": "executive",
"sub_category": "general",
"model": {
"name": "llama-3.3-70b-instruct"
},
"tools": [
{
"name": "web_search",
"description": "Search the web."
}
]
}