Skip to main content
A persona is a named, versioned instruction layer applied on top of HASP’s own base behaviour. Personas move through an explicit draft → published lifecycle so that what a caller gets is always a specific, auditable version rather than whatever the prompt happened to say today. Requires the persona.read / persona.write capabilities.

Lifecycle

  • Draft — private to its creator and editable in place.
  • Published — immutable. Editing a published persona means calling revise to open a fresh draft, not PATCH.
  • Promoted — an admin lifts a private persona into the org library, where it becomes selectable by other members.

Create

Created personas start private and in draft.

List and retrieve

The list returns personas visible to the caller — their own, plus published org-library personas. Retrieval follows the same visibility rule.

Update a draft

Takes the same fields as create. Fails with PERSONA_ALREADY_DRAFT or PERSONA_NO_DRAFT when the persona is not in a state that accepts an in-place edit — call revise first if the current version is published.

Publish, revise, promote

  • publish freezes the current draft as a published version.
  • revise opens a new draft from the currently published version.
  • promote is admin-only and requires the persona to be private; it returns PERSONA_NOT_PRIVATE otherwise and ORG_ADMIN_REQUIRED for non-admins.

Delete

Only private personas can be deleted.

Org default persona

Reads and sets the organization’s default persona, applied when a caller has not selected one explicitly. PUT takes a single persona field.

Errors