API Reference

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.

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.

Request
curl "$VDF_BASE_URL/networks-api/admin/intent-templates" \
  -H "Authorization: Bearer $VDF_ACCESS_TOKEN"
Response 200
[
  {
    "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

  • content string Required

    The template as a YAML document. Must include a template_id and renderer and render into a valid network.

  • scope string

    Layer to create in: user is the caller's private layer, system the shared layer (administrators only). Defaults to user for a regular caller and system for 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.
Request
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"
  }'
Response 200
{
  "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_id string Required

    The template's identifier.

Query parameters

  • owner string

    Read 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 owner that is not their own id.
  • 404 No template with this identifier is available to the caller.
Request
curl "$VDF_BASE_URL/networks-api/admin/intent-templates/support-triage-template" \
  -H "Authorization: Bearer $VDF_ACCESS_TOKEN"
Response 200
{
  "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_id string Required

    The template's identifier.

Query parameters

  • owner string

    Update the private copy owned by this user id. A non-administrator may only pass their own id.

Body parameters application/json

  • content string Required

    The replacement template as a YAML document. Its template_id must 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 owner that is not their own id.
  • 404 No matching template exists in the target layer.
  • 422 The content is invalid, or its template_id does not match the path.
Request
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"
  }'
Response 200
{
  "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_id string Required

    The template's identifier.

Query parameters

  • owner string

    Delete 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 owner that is not their own id.
  • 404 No matching template exists in the target layer.
  • 409 The template is required and cannot be deleted.
Request
curl -X DELETE "$VDF_BASE_URL/networks-api/admin/intent-templates/support-triage-template" \
  -H "Authorization: Bearer $VDF_ACCESS_TOKEN"
Response 200
{
  "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.

Request
curl "$VDF_BASE_URL/networks-api/admin/prompts" \
  -H "Authorization: Bearer $VDF_ACCESS_TOKEN"
Response 200
[
  {
    "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

  • content string Required

    The prompt as a YAML mapping with prompt_id, content, and an optional description.

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_id or content.
Request
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"
  }'
Response 200
{
  "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_id string Required

    The prompt's identifier.

Query parameters

  • owner string

    Read 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 owner that is not their own id.
  • 404 No prompt with this identifier is available to the caller.
Request
curl "$VDF_BASE_URL/networks-api/admin/prompts/support_reply_style" \
  -H "Authorization: Bearer $VDF_ACCESS_TOKEN"
Response 200
{
  "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_id string Required

    The prompt's identifier.

Query parameters

  • owner string

    Update the private copy owned by this user id. A non-administrator may only pass their own id.

Body parameters application/json

  • content string Required

    The replacement prompt as a YAML mapping. Its prompt_id must 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 owner that is not their own id.
  • 404 No matching prompt exists in the target layer.
  • 422 The content is invalid, or its prompt_id does not match the path.
Request
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"
  }'
Response 200
{
  "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_id string Required

    The prompt's identifier.

Query parameters

  • owner string

    Delete 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 owner that is not their own id.
  • 404 No matching prompt exists in the target layer.
Request
curl -X DELETE "$VDF_BASE_URL/networks-api/admin/prompts/support_reply_style" \
  -H "Authorization: Bearer $VDF_ACCESS_TOKEN"
Response 200
{
  "status": "deleted",
  "reloaded": true,
  "prompt_id": "support_reply_style",
  "owner_user_id": "42"
}