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.
Usage profiles
| Usage | Fields and validation |
|---|---|
| In requests | View fields |
| In responses | View fields |
In requests
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
fragmentId | string | Optional | Stable template name, unique within the project library and used by include actions. |
name | string | Optional | Display name for the reusable prompt fragment. |
content | string | Optional | Raw template text, supporting {{.variable}} placeholders and nested {{template "id" .}} includes. |
In responses
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
fragmentId | string | Optional | Stable template name, unique within the project library and used by include actions. |
name | string | Optional | Display name for the reusable prompt fragment. |
content | string | Optional | Raw template text, supporting {{.variable}} placeholders and nested {{template "id" .}} includes. |
Where used
| Reference | Relationship |
|---|---|
| Create a prompt fragment | POST /api/v1/prompt-fragments/create |
| Update a prompt fragment | POST /api/v1/prompt-fragments/update |
| 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 |
Download the public reference contract.
Document: DOC-API-MODEL-prompt-fragment.