Skip to main content

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 @include is 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 become PromptFragment rows referenced with {{template "id" .}}. No drift between profiles, but every shared block referenced by an @include must be supplied in the same call.

Existing rows cause ALREADY_EXISTS unless overwrite is true.

Request

Responses

Converted profiles and fragments, as stored