Import a prompt library
POST/api/v1/agent-profiles/import
Bulk-converts an existing prompt library — personas plus the shared blocks they
@include — into profiles and fragments in one call. Conversion happens at import
time; the platform never interprets the source DSL when serving a turn.
Two composition modes:
- Flatten (default,
emit_fragments: false) — each@includeis resolved inline into that profile's system prompt. Profiles end up self-contained and no fragment rows are written. - Fragments (
emit_fragments: true) — shared blocks becomePromptFragmentrows referenced with{{template "id" .}}. No drift between profiles, but every shared block referenced by an@includemust be supplied in the same call.
Existing rows cause ALREADY_EXISTS unless overwrite is true.
Request
Responses
- 200
Converted profiles and fragments, as stored