Personas
Personas are the durable identity layer that sits above individual sessions. Kheish separates:- a mutable persona record owned by the daemon
- an immutable session persona binding copied into each session that binds it
What a persona is
A persona record is a reusable instruction template stored under the daemon state root. It carries:- a stable
persona_id - a user-visible
display_name - one
soultext body - a monotonically increasing version
- an optional
capability_scopebaseline - optional
default_skillsassignments for inline skills - optional metadata
soul is the exact instruction body that future sessions can bind. The capability baseline and default inline skills are also part of what future sessions inherit from that persona.
Use personas when you want one reusable identity such as:
- reviewer
- researcher
- planner
- customer-support style responder
The two-layer model
The critical design rule is:- persona records are mutable
- session bindings are immutable snapshots
persona_idpersona_versiondisplay_name- the captured
soul - the captured persona
capability_scope - the resolved
default_inline_skillssnapshot - a digest of the captured instructions
- the bind timestamp
- updating a persona record does not rewrite existing sessions
- future sessions see the latest persona version
- existing sessions keep the persona snapshot they already bound
- default inline skills are frozen into the binding that each session captured
- capability restrictions are also frozen into that binding
Capability baseline and defaults
Personas do more than carry prompt text. A persona can define:- a
capability_scopebaseline that restricts which skills and MCP surfaces future bound sessions can see default_skillsassignments that resolve into inline skill snapshots when the persona is bound
- the capability scope is a visibility and authorization boundary
- the default skills are the inline skill activations that start enabled for new bound sessions
- persona binding baseline
- restricted by the session capability scope
sessions get exposes both the persisted session capability_scope and the derived effective_capability_scope.
Binding flow
Typical lifecycle:- Create or import a persona record.
- Bind it when you create a session, or later with
sessions set-persona. - Run work inside that session.
- Update the persona record when you want future sessions to use a new version.
review-root keeps the old snapshot. A newly created session binds the new one.
Markdown import
The CLI supports importing personas directly from Markdown:- import accepts
.mdand.markdownfiles - the full file content becomes the persona
soul --display-nameoverrides the derived name- otherwise the first Markdown heading becomes the display name
- if the file has no heading, the file stem is used
--metadata-jsonand--metadata-filecan attach metadata to the imported persona
/v1/personas.
Session mutation rules
Binding or clearing a session persona is stricter than normal input submission. Kheish only allows persona changes while the session is idle for topology mutation. In practice, mutation is blocked when the session still has:- an active or queued run
- pending approvals or questions
- mailbox backlog
- waiting agent state
- live descendant work
Sidechains
Sidechains inherit the parent session’s current persona snapshot at spawn time. That inheritance is:- snapshot-based
- local to the new child session
- independent from later persona updates on the parent or on the source persona record
Prompt semantics
When a session has a bound persona snapshot, the runtime injects it as a dedicatedpersona section in the system prompt.
Two details matter:
- the session persona is restored after daemon restart because the binding lives in session metadata
- a daemon-level
override_promptsuppresses the persona section, because that override replaces the normal base prompt assembly
Recovery and operations
Persona durability is split across two stores:- mutable persona records live under the state root
- bound session persona snapshots live inside session metadata
- stable restart behavior for existing sessions
- repairable persona indexes from on-disk persona records
- session recovery that does not depend on the persona record remaining unchanged
- recovery of persona capability baselines and resolved default inline skills from the session binding itself
personacapability_scopeeffective_capability_scope
Related surfaces
- Read Sessions and runs for queueing and waiting semantics.
- Read Agents and sidechains for child-session behavior.
- Read State and recovery for restore semantics.
- Read Personas API for the concrete HTTP and CLI surface.
