Intent templates and prompts
An intent template is a reusable blueprint: the intent layer renders it into a fresh network for each task, filling in placeholders such as ${task} and ${network_id}. A prompt is a named, reusable system-prompt entry that a template's nodes can reference. These endpoints read and edit both.
Content sits in three layers. The product ships a set of built-in templates and prompts. A shared layer of overrides sits on top of those, visible to everyone. Each signed-in user also has a private layer of their own. For a given caller the effective item is their private copy if one exists, otherwise the shared override, otherwise the built-in.
Any signed-in user may read these endpoints and create, edit, and delete items in their own private layer. Private items are visible only to their owner and to administrators. The shared layer that every user sees, and the built-in items, can be created or changed only by an administrator. Requests without a valid access token are rejected.
- GET /admin/intent-templates List intent templates
- POST /admin/intent-templates Create an intent template
- GET /admin/intent-templates/{template_id} Retrieve an intent template
- PUT /admin/intent-templates/{template_id} Update an intent template
- DEL /admin/intent-templates/{template_id} Delete an intent template
- GET /admin/prompts List prompts
- POST /admin/prompts Create a prompt
- GET /admin/prompts/{prompt_id} Retrieve a prompt
- PUT /admin/prompts/{prompt_id} Update a prompt
- DEL /admin/prompts/{prompt_id} Delete a prompt
Paths are relative to /networks-api
List intent templates
GET /networks-api/admin/intent-templates
Lists the intent templates available to the caller.
Returns the shared templates (built-ins and shared overrides) together with the caller's own private templates. Each entry carries its identifier, renderer, routing metadata, a display name and description drawn from the template's network block, and flags describing whether the caller may edit or delete it.
An administrator additionally sees every user's private templates, each tagged with its owner_user_id.
- Authentication
- Bearer token How it works
Parameters
No parameters.
Returns
Returns an array of template summaries.
curl "$VDF_BASE_URL/networks-api/admin/intent-templates" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" const response = await fetch(`${process.env.VDF_BASE_URL}/networks-api/admin/intent-templates`, {
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']}/networks-api/admin/intent-templates",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
timeout=30,
)
response.raise_for_status()
data = response.json() [
{
"template_id": "document_review",
"renderer": "static_spec",
"task_classes": [
"document_review"
],
"domain_ids": [],
"network_name": "Attached Document Review",
"is_builtin": true,
"is_global_override": false,
"is_private": false,
"owner_user_id": null,
"editable": false,
"deletable": false
},
{
"template_id": "support-triage-template",
"renderer": "static_spec",
"task_classes": [
"generic"
],
"domain_ids": [
"customer-success"
],
"network_name": "Support triage",
"is_builtin": false,
"is_global_override": false,
"is_private": true,
"owner_user_id": "42",
"editable": true,
"deletable": true
}
] Create an intent template
POST /networks-api/admin/intent-templates
Creates an intent template from a YAML document supplied as content. The content is fully validated before it is stored: it must parse, use only supported placeholders, resolve any prompt and evaluation references, and render into a valid network. The template_id is taken from the content.
By default a signed-in user creates the template in their own private layer. Pass scope: "system" to create it in the shared layer that every user sees; that is reserved for administrators. An administrator who omits scope writes to the shared layer.
- Authentication
- Bearer token How it works
- Permission
- Creating a template in the shared layer (
scope: "system") requires an administrator account; any signed-in user may create a private template.
Body parameters application/json
-
contentstring RequiredThe template as a YAML document. Must include a
template_idandrendererand render into a valid network. -
scopestringLayer to create in:
useris the caller's private layer,systemthe shared layer (administrators only). Defaults touserfor a regular caller andsystemfor an administrator.Possible values-
system -
user
-
Returns
Returns the created template's identifier and the layer it was stored in.
Errors
- 403 A non-administrator requested
scope: "system". - 409 A template with this identifier already exists in the target layer.
- 422 The content is not valid YAML, uses an unsupported placeholder or reference, or does not render into a valid network.
curl -X POST "$VDF_BASE_URL/networks-api/admin/intent-templates" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"content": "template_id: support-triage-template\nrenderer: static_spec\ntask_classes:\n - generic\nnetwork:\n network_id: \"${network_id}\"\n version: \"1.0\"\n name: Support triage\n description: \"${task}\"\n domain_id: \"${domain_id}\"\n mode: execute\n created_by: intent-layer\n nodes:\n - node_id: classify\n type: LLMAgent\n label: Classify the ticket\n model_routing:\n strategy: auto\n required_capability: analysis\n edges: []\n"
}' const response = await fetch(`${process.env.VDF_BASE_URL}/networks-api/admin/intent-templates`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.VDF_ACCESS_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
content: 'template_id: support-triage-template\nrenderer: static_spec\ntask_classes:\n - generic\nnetwork:\n network_id: "${network_id}"\n version: "1.0"\n name: Support triage\n description: "${task}"\n domain_id: "${domain_id}"\n mode: execute\n created_by: intent-layer\n nodes:\n - node_id: classify\n type: LLMAgent\n label: Classify the ticket\n model_routing:\n strategy: auto\n required_capability: analysis\n edges: []\n',
}),
});
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']}/networks-api/admin/intent-templates",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
json={
"content": "template_id: support-triage-template\nrenderer: static_spec\ntask_classes:\n - generic\nnetwork:\n network_id: \"${network_id}\"\n version: \"1.0\"\n name: Support triage\n description: \"${task}\"\n domain_id: \"${domain_id}\"\n mode: execute\n created_by: intent-layer\n nodes:\n - node_id: classify\n type: LLMAgent\n label: Classify the ticket\n model_routing:\n strategy: auto\n required_capability: analysis\n edges: []\n",
},
timeout=30,
)
response.raise_for_status()
data = response.json() {
"status": "created",
"reloaded": true,
"template_id": "support-triage-template",
"scope": "user",
"owner_user_id": "42",
"is_private": true
} Retrieve an intent template
GET /networks-api/admin/intent-templates/{template_id}
Retrieves an intent template's YAML content.
Returns the effective content for this identifier: the caller's private copy if they have one, otherwise the shared override, otherwise the built-in. The response includes the raw YAML content and flags describing whether the caller may edit or delete it.
An administrator may pass owner to read a specific user's private copy.
- Authentication
- Bearer token How it works
Path parameters
-
template_idstring RequiredThe template's identifier.
Query parameters
-
ownerstringRead the private copy owned by this user id. A non-administrator may only pass their own id.
Returns
Returns the template's content and ownership flags.
Errors
- 403 A non-administrator passed an
ownerthat is not their own id. - 404 No template with this identifier is available to the caller.
curl "$VDF_BASE_URL/networks-api/admin/intent-templates/support-triage-template" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" const response = await fetch(`${process.env.VDF_BASE_URL}/networks-api/admin/intent-templates/support-triage-template`, {
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']}/networks-api/admin/intent-templates/support-triage-template",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
timeout=30,
)
response.raise_for_status()
data = response.json() {
"template_id": "support-triage-template",
"content": "template_id: support-triage-template\nrenderer: static_spec\ntask_classes:\n - generic\nnetwork:\n network_id: \"${network_id}\"\n version: \"1.0\"\n name: Support triage\n description: \"${task}\"\n domain_id: \"${domain_id}\"\n mode: execute\n created_by: intent-layer\n nodes:\n - node_id: classify\n type: LLMAgent\n label: Classify the ticket\n model_routing:\n strategy: auto\n required_capability: analysis\n edges: []\n",
"is_builtin": false,
"is_global_override": false,
"is_private": true,
"owner_user_id": "42",
"editable": true,
"deletable": true
} Update an intent template
PUT /networks-api/admin/intent-templates/{template_id}
Replaces the template's content, applying the same validation as Create an intent template. The template_id inside the content must match the one in the path.
A signed-in user may update a template in their own private layer. Changing a built-in or a shared template requires an administrator. An administrator may pass owner to update a specific user's private copy.
- Authentication
- Bearer token How it works
- Permission
- Changing a built-in or shared template requires an administrator account; any other caller may only update their own private template.
Path parameters
-
template_idstring RequiredThe template's identifier.
Query parameters
-
ownerstringUpdate the private copy owned by this user id. A non-administrator may only pass their own id.
Body parameters application/json
-
contentstring RequiredThe replacement template as a YAML document. Its
template_idmust match the path.
Returns
Returns the updated identifier and the layer it was written to.
Errors
- 403 A non-administrator tried to change a built-in or shared template, or passed an
ownerthat is not their own id. - 404 No matching template exists in the target layer.
- 422 The content is invalid, or its
template_iddoes not match the path.
curl -X PUT "$VDF_BASE_URL/networks-api/admin/intent-templates/support-triage-template" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"content": "template_id: support-triage-template\nrenderer: static_spec\ntask_classes:\n - generic\nnetwork:\n network_id: \"${network_id}\"\n version: \"1.0\"\n name: Support triage\n description: \"${task}\"\n domain_id: \"${domain_id}\"\n mode: execute\n created_by: intent-layer\n nodes:\n - node_id: classify\n type: LLMAgent\n label: Classify and route the ticket\n model_routing:\n strategy: auto\n required_capability: analysis\n edges: []\n"
}' const response = await fetch(`${process.env.VDF_BASE_URL}/networks-api/admin/intent-templates/support-triage-template`, {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.VDF_ACCESS_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
content: 'template_id: support-triage-template\nrenderer: static_spec\ntask_classes:\n - generic\nnetwork:\n network_id: "${network_id}"\n version: "1.0"\n name: Support triage\n description: "${task}"\n domain_id: "${domain_id}"\n mode: execute\n created_by: intent-layer\n nodes:\n - node_id: classify\n type: LLMAgent\n label: Classify and route the ticket\n model_routing:\n strategy: auto\n required_capability: analysis\n edges: []\n',
}),
});
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']}/networks-api/admin/intent-templates/support-triage-template",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
json={
"content": "template_id: support-triage-template\nrenderer: static_spec\ntask_classes:\n - generic\nnetwork:\n network_id: \"${network_id}\"\n version: \"1.0\"\n name: Support triage\n description: \"${task}\"\n domain_id: \"${domain_id}\"\n mode: execute\n created_by: intent-layer\n nodes:\n - node_id: classify\n type: LLMAgent\n label: Classify and route the ticket\n model_routing:\n strategy: auto\n required_capability: analysis\n edges: []\n",
},
timeout=30,
)
response.raise_for_status()
data = response.json() {
"status": "ok",
"reloaded": true,
"template_id": "support-triage-template",
"owner_user_id": "42"
} Delete an intent template
DEL /networks-api/admin/intent-templates/{template_id}
Deletes an intent template or reverts an override.
Removes a template. Deleting a private template drops it. For an administrator working on the shared layer, deleting a shared override restores the built-in beneath it, and deleting a built-in hides it for everyone. A small set of required built-in templates cannot be removed.
An administrator may pass owner to delete a specific user's private copy.
- Authentication
- Bearer token How it works
- Permission
- Deleting a built-in or shared template requires an administrator account; any other caller may only delete their own private template.
Path parameters
-
template_idstring RequiredThe template's identifier.
Query parameters
-
ownerstringDelete the private copy owned by this user id. A non-administrator may only pass their own id.
Returns
Returns the deleted identifier.
Errors
- 403 A non-administrator tried to delete a built-in or shared template, or passed an
ownerthat is not their own id. - 404 No matching template exists in the target layer.
- 409 The template is required and cannot be deleted.
curl -X DELETE "$VDF_BASE_URL/networks-api/admin/intent-templates/support-triage-template" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" const response = await fetch(`${process.env.VDF_BASE_URL}/networks-api/admin/intent-templates/support-triage-template`, {
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']}/networks-api/admin/intent-templates/support-triage-template",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
timeout=30,
)
response.raise_for_status()
data = response.json() {
"status": "deleted",
"reloaded": true,
"template_id": "support-triage-template",
"owner_user_id": "42"
} List prompts
GET /networks-api/admin/prompts
Lists the prompts available to the caller.
Returns the shared prompts (built-ins and shared overrides) together with the caller's own private prompts. Each entry carries its identifier, a one-line description, and flags describing whether the caller may edit or delete it. An administrator additionally sees every user's private prompts, each tagged with its owner_user_id.
- Authentication
- Bearer token How it works
Parameters
No parameters.
Returns
Returns an array of prompt summaries.
curl "$VDF_BASE_URL/networks-api/admin/prompts" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" const response = await fetch(`${process.env.VDF_BASE_URL}/networks-api/admin/prompts`, {
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']}/networks-api/admin/prompts",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
timeout=30,
)
response.raise_for_status()
data = response.json() [
{
"prompt_id": "document_review",
"description": "User-facing review of an attached document, grounded strictly in the extracted text.",
"is_builtin": true,
"is_global_override": false,
"is_private": false,
"owner_user_id": null,
"editable": false,
"deletable": false
},
{
"prompt_id": "support_reply_style",
"description": "House style for replies to support tickets.",
"is_builtin": false,
"is_global_override": false,
"is_private": true,
"owner_user_id": "42",
"editable": true,
"deletable": true
}
] Create a prompt
POST /networks-api/admin/prompts
Creates a prompt from a YAML document supplied as content. The content must be a mapping with a non-empty prompt_id and a non-empty content field; an optional description is shown in listings.
A signed-in user creates the prompt in their own private layer. An administrator creates it in the shared layer that every user sees.
- Authentication
- Bearer token How it works
- Permission
- An administrator creates a prompt in the shared layer; any other caller creates it in their own private layer.
Body parameters application/json
-
contentstring RequiredThe prompt as a YAML mapping with
prompt_id,content, and an optionaldescription.
Returns
Returns the created prompt's identifier.
Errors
- 409 A prompt with this identifier already exists in the target layer.
- 422 The content is not a valid YAML mapping, or is missing
prompt_idorcontent.
curl -X POST "$VDF_BASE_URL/networks-api/admin/prompts" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"content": "prompt_id: support_reply_style\ndescription: House style for replies to support tickets.\ncontent: |\n Write a warm, concise reply. Lead with the answer, keep to the facts in the ticket,\n and close with one clear next step.\n"
}' const response = await fetch(`${process.env.VDF_BASE_URL}/networks-api/admin/prompts`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.VDF_ACCESS_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
content: 'prompt_id: support_reply_style\ndescription: House style for replies to support tickets.\ncontent: |\n Write a warm, concise reply. Lead with the answer, keep to the facts in the ticket,\n and close with one clear next step.\n',
}),
});
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']}/networks-api/admin/prompts",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
json={
"content": "prompt_id: support_reply_style\ndescription: House style for replies to support tickets.\ncontent: |\n Write a warm, concise reply. Lead with the answer, keep to the facts in the ticket,\n and close with one clear next step.\n",
},
timeout=30,
)
response.raise_for_status()
data = response.json() {
"status": "created",
"reloaded": true,
"prompt_id": "support_reply_style",
"owner_user_id": "42",
"is_private": true
} Retrieve a prompt
GET /networks-api/admin/prompts/{prompt_id}
Retrieves a prompt's YAML content.
Returns the effective content for this identifier: the caller's private copy if they have one, otherwise the shared override, otherwise the built-in. An administrator may pass owner to read a specific user's private copy.
- Authentication
- Bearer token How it works
Path parameters
-
prompt_idstring RequiredThe prompt's identifier.
Query parameters
-
ownerstringRead the private copy owned by this user id. A non-administrator may only pass their own id.
Returns
Returns the prompt's content and ownership flags.
Errors
- 403 A non-administrator passed an
ownerthat is not their own id. - 404 No prompt with this identifier is available to the caller.
curl "$VDF_BASE_URL/networks-api/admin/prompts/support_reply_style" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" const response = await fetch(`${process.env.VDF_BASE_URL}/networks-api/admin/prompts/support_reply_style`, {
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']}/networks-api/admin/prompts/support_reply_style",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
timeout=30,
)
response.raise_for_status()
data = response.json() {
"prompt_id": "support_reply_style",
"content": "prompt_id: support_reply_style\ndescription: House style for replies to support tickets.\ncontent: |\n Write a warm, concise reply. Lead with the answer, keep to the facts in the ticket,\n and close with one clear next step.\n",
"is_builtin": false,
"is_global_override": false,
"is_private": true,
"owner_user_id": "42",
"editable": true,
"deletable": true
} Update a prompt
PUT /networks-api/admin/prompts/{prompt_id}
Replaces a prompt's YAML content.
Replaces the prompt's content. The prompt_id inside the content must match the one in the path. A signed-in user may update a prompt in their own private layer; changing a built-in or shared prompt requires an administrator. An administrator may pass owner to update a specific user's private copy.
- Authentication
- Bearer token How it works
- Permission
- Changing a built-in or shared prompt requires an administrator account; any other caller may only update their own private prompt.
Path parameters
-
prompt_idstring RequiredThe prompt's identifier.
Query parameters
-
ownerstringUpdate the private copy owned by this user id. A non-administrator may only pass their own id.
Body parameters application/json
-
contentstring RequiredThe replacement prompt as a YAML mapping. Its
prompt_idmust match the path.
Returns
Returns the updated identifier and the layer it was written to.
Errors
- 403 A non-administrator tried to change a built-in or shared prompt, or passed an
ownerthat is not their own id. - 404 No matching prompt exists in the target layer.
- 422 The content is invalid, or its
prompt_iddoes not match the path.
curl -X PUT "$VDF_BASE_URL/networks-api/admin/prompts/support_reply_style" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"content": "prompt_id: support_reply_style\ndescription: House style for replies to support tickets.\ncontent: |\n Write a warm, concise reply in the customer'\''s language. Lead with the answer and\n close with one clear next step.\n"
}' const response = await fetch(`${process.env.VDF_BASE_URL}/networks-api/admin/prompts/support_reply_style`, {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.VDF_ACCESS_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
content: 'prompt_id: support_reply_style\ndescription: House style for replies to support tickets.\ncontent: |\n Write a warm, concise reply in the customer\'s language. Lead with the answer and\n close with one clear next step.\n',
}),
});
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']}/networks-api/admin/prompts/support_reply_style",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
json={
"content": "prompt_id: support_reply_style\ndescription: House style for replies to support tickets.\ncontent: |\n Write a warm, concise reply in the customer's language. Lead with the answer and\n close with one clear next step.\n",
},
timeout=30,
)
response.raise_for_status()
data = response.json() {
"status": "ok",
"reloaded": true,
"prompt_id": "support_reply_style",
"owner_user_id": "42"
} Delete a prompt
DEL /networks-api/admin/prompts/{prompt_id}
Deletes a prompt or reverts an override.
Removes a prompt. Deleting a private prompt drops it. For an administrator working on the shared layer, deleting a shared override restores the built-in beneath it, and deleting a built-in hides it for everyone. An administrator may pass owner to delete a specific user's private copy.
- Authentication
- Bearer token How it works
- Permission
- Deleting a built-in or shared prompt requires an administrator account; any other caller may only delete their own private prompt.
Path parameters
-
prompt_idstring RequiredThe prompt's identifier.
Query parameters
-
ownerstringDelete the private copy owned by this user id. A non-administrator may only pass their own id.
Returns
Returns the deleted identifier.
Errors
- 403 A non-administrator tried to delete a built-in or shared prompt, or passed an
ownerthat is not their own id. - 404 No matching prompt exists in the target layer.
curl -X DELETE "$VDF_BASE_URL/networks-api/admin/prompts/support_reply_style" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" const response = await fetch(`${process.env.VDF_BASE_URL}/networks-api/admin/prompts/support_reply_style`, {
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']}/networks-api/admin/prompts/support_reply_style",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
timeout=30,
)
response.raise_for_status()
data = response.json() {
"status": "deleted",
"reloaded": true,
"prompt_id": "support_reply_style",
"owner_user_id": "42"
}