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
| Usage | Fields and validation |
|---|---|
| In requests | View fields |
| In responses | View fields |
In requests
Section ID: DOC-API-MODEL-schema-1j5dvgfmr9#request
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
Section ID: DOC-API-MODEL-schema-1j5dvgfmr9#request-field-fragmentidfragmentId | string | Optional | Stable template name, unique within the project library and used by include actions. |
Section ID: DOC-API-MODEL-schema-1j5dvgfmr9#request-field-namename | string | Optional | Display name used as a console hint for the reusable prompt fragment. |
Section ID: DOC-API-MODEL-schema-1j5dvgfmr9#request-field-contentcontent | string | Optional | Raw 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).
| Field | Type | Presence | Meaning |
|---|---|---|---|
Section ID: DOC-API-MODEL-schema-1j5dvgfmr9#field-fragmentidSection ID: DOC-API-MODEL-schema-1j5dvgfmr9#response-field-fragmentidfragmentId | string | Optional | Stable 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-namename | string | Optional | Display 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-contentcontent | string | Optional | Raw template text, supporting {{.variable}} placeholders and nested {{template "id" .}} includes. |
Where used
Section ID: DOC-API-MODEL-schema-1j5dvgfmr9#where-used
| Reference | Relationship |
|---|---|
| Create a prompt fragment | POST /api/v1/prompt-fragments/create |
| Get a prompt fragment | POST /api/v1/prompt-fragments/get |
| Get a fragment set by version | POST /api/v1/prompt-fragments/get-set |
| Import a prompt library | POST /api/v1/agent-profiles/import |
| List prompt fragments | POST /api/v1/prompt-fragments/list |
| Update a prompt fragment | POST /api/v1/prompt-fragments/update |
Download the public reference contract.
Document ID: DOC-API-MODEL-schema-1j5dvgfmr9