> ## Documentation Index
> Fetch the complete documentation index at: https://docs.plungeai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Experts, personas, backgrounds — shaping WHO the agent is in a run

> Three capability kinds shape an agent's identity and framing (as opposed to skills, which shape its methods). All three inject into the front of the system prompt, in a fixed order, before anything else the run adds:


<!-- sources-of-truth: core/core-base/pack-enrich.ts, orchestration/cnl-engine/harness-mission.ts, orchestration/cnl-engine/schema-types.ts | last-synced: 2026-09-24 -->
Three capability kinds shape an agent's identity and framing (as opposed to skills,
which shape its methods). All three inject into the **front** of the system prompt,
in a fixed order, before anything else the run adds:

```
## BACKGROUND: <id>        ← ambient truth, first, verbatim
<background body>

<persona text>             ← identity and voice

## EXPERT: <id>            ← labeled domain lenses
<expert body>
```

The order is load-bearing: backgrounds frame everything that follows, and putting
them first keeps the prompt prefix stable across runs sharing a background (prompt
caching). Experts are labeled sections precisely so the model can tell "domain lens"
apart from "who I am".

## Backgrounds — always-on ambient context

A **background** is a registry card whose body is standing context: company facts,
product truth, an environment description. Injected FIRST and **verbatim** — no
stripping — because ambient truth must arrive intact.

```yaml
- type: harness
  goal: "Draft the Q3 partner update"
  mission: |
    Write the quarterly partner update.
  backgrounds: [acme-corp]
```

Use a background when every run in a family needs the same grounding ("what Acme is,
our products, our tone"), instead of pasting boilerplate into each mission text.
Backgrounds are per-owner resolvable: your private background card wins for your
runs.

## Persona — one voice per run

A **persona** is an identity/voice text (from the platform's persona store).
Exactly **one** per run — a run speaks with one voice.

```yaml
persona: analyst
```

Accepted spellings, all normalized to the same thing: `persona:` (canonical),
`digital_twin:` (alias), and `personas: [x]` (plural from preset frontmatter — only
the FIRST entry is used). If you list several personas, you did not get a blend; you
got `personas[0]`.

Personas also appear outside missions: `plungeai_execute_agent`/`POST
/v1/agents/{id}/execute` accept a `persona` parameter, and CNL `debate`/`validate`
blocks take `persona`/`digital_twin` per debater, judge, and validator — the same
store, applied per role. That is the idiomatic way to run a multi-perspective panel:
one debate block, different personas per debater.

## Experts — labeled domain lenses (UI name: Specialists)

An **expert** is deep domain instruction material injected as a labeled
`## EXPERT: <id>` section — "reason like a securities lawyer", "apply SRE
practices". Up to **3** load eagerly per run.

```yaml
experts: [securities-law, python-pro]
```

Persona vs expert, the practical line: persona = who the agent IS (voice, identity —
one). Expert = what the agent additionally KNOWS HOW to judge (lenses — up to three
eager). A hedge-fund panel is personas in a debate; a compliance review is one
persona plus a law expert.

## Budgets and degradation (shared with skills)

All eager identity/instruction text — backgrounds + persona + experts + skills —
shares **one 24 KB budget**, with per-kind caps: 3 backgrounds, 1 persona, 3
experts (5 skills). Over cap or over budget, items **defer**: the prompt lists them
under `## AVAILABLE ON DEMAND` and the agent can pull one mid-run with `load_skill`
(matching type). Persona is never deferred — it either resolves or warns.

Missing ids never fail the run; they degrade to warnings:

- `background "<id>" not found or empty`
- `persona "<id>" not found`
- `expert "<id>" not found`

A run that "lost its voice" or ignored company context almost always has one of
these warnings — check the run detail (`plungeai-results-traces`). The other classic
cause: declaring more than the caps and assuming everything injected. Order lists by
importance; the head injects, the tail defers.

**Discover valid ids before declaring them** — the degrade-to-warning behavior
means a guessed id fails silently: `plungeai_list_agents {kind: "experts", search:
"…"}` or `{kind: "personas", search: "…"}` (REST:
`GET /v1/discovery/search?kind=…&q=…`).

## Merge behavior in missions

Like every mission field, these merge per key with **last-wins** across pre-built
card → workflow root → task, and **arrays REPLACE rather than union** (see
`plungeai-missions`). So a task-level `experts: [x]` replaces the card's expert list
— and an explicit empty `experts: []` deliberately clears it. To ADD to a card's list
you must restate the full list.

## Authoring guidance

- Keep each body lean and self-contained: it lands in a prompt with everything else
  competing for 24 KB. A 15 KB background starves persona and experts.
- Backgrounds: facts, not instructions. Instructions belong in mission text or
  skills — a background that says "always do X" fights the mission's own framing.
- Experts: method and judgment criteria ("what a great X checks first"), not essays.
- Test identity injection cheaply: run a `quick`-effort mission whose goal is to
  introduce itself and state its operating context; the answer shows exactly which
  layers landed.
