Skip to main content
Section ID: DOC-API-MODEL-schema-1j5dvgfmr9#overview

PromptFragment

Project-scoped reusable prompt-template text. Profiles and other fragments include it with {{template "fragment_id" .}}; variables come from the conversation’s prompt_variables.

Meaning and usage​

Section ID: DOC-API-MODEL-schema-1j5dvgfmr9#meaning

See the definition above.

Usage profiles​

Section ID: DOC-API-MODEL-schema-1j5dvgfmr9#fields

UsageFields and validation
In requestsView fields
In responsesView fields

In requests​

Section ID: DOC-API-MODEL-schema-1j5dvgfmr9#request

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
Section ID: DOC-API-MODEL-schema-1j5dvgfmr9#request-field-fragmentidfragmentIdstringOptionalStable template name, unique within the project library and used by include actions.
Section ID: DOC-API-MODEL-schema-1j5dvgfmr9#request-field-namenamestringOptionalDisplay name used as a console hint for the reusable prompt fragment.
Section ID: DOC-API-MODEL-schema-1j5dvgfmr9#request-field-contentcontentstringOptionalRaw template text, supporting {{.variable}} placeholders and nested {{template "id" .}} includes.

In responses​

Section ID: DOC-API-MODEL-schema-1j5dvgfmr9#response

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
Section ID: DOC-API-MODEL-schema-1j5dvgfmr9#field-fragmentidSection ID: DOC-API-MODEL-schema-1j5dvgfmr9#response-field-fragmentidfragmentIdstringOptionalStable template name, unique within the project library and used by include actions.
Section ID: DOC-API-MODEL-schema-1j5dvgfmr9#field-nameSection ID: DOC-API-MODEL-schema-1j5dvgfmr9#response-field-namenamestringOptionalDisplay name used as a console hint for the reusable prompt fragment.
Section ID: DOC-API-MODEL-schema-1j5dvgfmr9#field-contentSection ID: DOC-API-MODEL-schema-1j5dvgfmr9#response-field-contentcontentstringOptionalRaw template text, supporting {{.variable}} placeholders and nested {{template "id" .}} includes.

Where used​

Section ID: DOC-API-MODEL-schema-1j5dvgfmr9#where-used

ReferenceRelationship
Create a prompt fragmentPOST /api/v1/prompt-fragments/create
Get a prompt fragmentPOST /api/v1/prompt-fragments/get
Get a fragment set by versionPOST /api/v1/prompt-fragments/get-set
Import a prompt libraryPOST /api/v1/agent-profiles/import
List prompt fragmentsPOST /api/v1/prompt-fragments/list
Update a prompt fragmentPOST /api/v1/prompt-fragments/update

Download the public reference contract.

Document ID: DOC-API-MODEL-schema-1j5dvgfmr9