The Emission Surface
A field-by-field guide to the structured document every world turn produces, in the wire format agents receive.
What the Emission Surface Is
Every time someone asks the world a question — whether through the browser, the REST API, an MCP tool, or a directive — the Protocol Emission Engine (PEE) runs an inference turn. The output of that turn is not a chat message. It is a structured, layered document called the Emission Surface.
The Emission Surface carries everything a consumer needs to present, analyze, or build on what the world just thought: the prose response, every entity and setting the reasoning touched, resolved imagery for each, atmospheric signals from the settings involved, how dense or sparse the territory is, what claims were made and how confident the system is, and session context that carries forward into the next turn.
This is what makes Starholder's output a media substrate rather than a text response. A documentary agent reads the prose and media layers. A podcast agent reads the prose and epistemic layers. An interactive experience reads the refs and topology layers. A research tool reads the claims and contradictions. They all consume the same document — they just use different parts of it.
Current turns carry schema: "starholder.emission.v2". Snapshots persisted before v2 can carry starholder.emission.v1; on the wire the difference is the shape of a media bundle (see Bundles).
How to Get the Emission Surface
Every API that returns a surface sends the same compact wire document, published in the OpenAPI document as WireEmissionSurface. This guide describes that document.
| Transport | Endpoint | Where the surface is |
|---|---|---|
| Execute | POST /api/v1/world/{worldId}/execute | data.output.surface, when data.output.kind is emission_surface |
| Consult | POST /api/v1/world/{worldId}/consult | data.output.surface |
| Snapshot | GET /api/v1/world/{worldId}/turns/{turnId}/surface | The response body. Fetch any completed turn. |
| Room reply stream | POST /api/v1/chat/rooms/{chatRoomId}/continue with Accept: text/event-stream | data.data.surface of the surface_complete event |
| Room feed stream | GET /api/v1/chat/rooms/{chatRoomId}/feed with Accept: text/event-stream | stream.frame.data.data.surface of the persona.stream.delta event whose stream.frame.type is surface_complete |
| World stream | GET /api/v1/world/{worldId}/stream | The surface_complete event. This stream is currently switched off; see SSE Streaming. |
A snapshot written by an older turn can be stored in the expanded form instead, where refs is an object holding catalog, accepted, and anomalies arrays. A wire document's refs is a map keyed by ref.
Layer Projection
You don't always need all eight layers. Add ?layers=text,refs,context to POST .../execute, POST .../consult, or the snapshot route and you'll get only those layers (plus identity, which is always included). The surface is then a projection, { schema, requestedLayers, surface }, whose surface holds just the requested layers and whose schema ends in .projection. Unknown layer names are ignored.
The Eight Layers
| Layer | What It Tells You |
|---|---|
| identity | Who produced this turn, when, under what directive, and with what authority |
| text | The finalized prose: annotated with ref tags, and clean for display |
| refs | Every ref the turn considered or used, where each appears in the text, and which were rejected — with navigable API links |
| media | Resolved imagery per entity or setting, positioned against specific mentions in the text |
| context | Atmosphere from the dominant setting (sounds, smells, light, temperature, horizon), environment-matching text, music, and semantic scene profiling |
| topology | Retrieval density, confidence metrics, what drove the retrieval, and how much prior reasoning exists |
| epistemic | Claims made, confidence scores, uncertainty, contradictions detected, and reasoning mode |
| session | Cross-turn memory: entity momentum, accumulated claims, open threads, warm summaries |
Identity Layer
Provenance for the turn. Every field you need to know who triggered it, when, and under what conditions.
| Field | Type | Description |
|---|---|---|
turnId | string | Unique identifier for this reasoning turn |
executionId | string | Execution run identifier (groups related operations) |
packetId | string, null, or absent | The ThoughtPacket (structured reasoning artifact) committed from this turn. Null or absent if the turn was aborted or its commit deferred. |
worldId | string | Which world this turn ran against |
sessionId | string | Conversation session identifier |
timestamp | string | ISO 8601 when the turn completed |
turnDurationMs | number | Wall-clock time for the turn in milliseconds |
ownerUserId | string | The user account that owns this action |
actorId | string | The actor ref: human:user_..., persona:persona_..., or agent:ext_... |
actorKind | string | human, persona, or external_agent |
apiKeyId | string or absent | Present when an external agent triggered the turn |
originSystem | string or absent | The agent's self-reported system name |
voiceRef | string or absent | The narrating voice the turn spoke as; API turns use the world's lore voice |
ham | object or absent | The platform turn record this surface belongs to: turnId, sessionId, and, once recorded, receiptRef |
runtime | object or absent | Where the turn ran: scopeKey, contextId, sessionId, worldRef, actorRef |
directive | object or absent | Present when the turn was triggered by a structured directive |
Directive block (when present):
| Field | Description |
|---|---|
schemaVersion | directive.identity.v2 |
directiveId | The directive's unique ID |
intent | What the directive asked the persona to do |
anchorRefs | Entity or setting refs the persona should focus on |
sourceGapId | The gap coordinate motivating this directive |
targetBountyId | The bounty being fulfilled |
mode | answer (direct response), explore (open investigation), bridge (connect two things), canonize (establish facts) |
creativeDirection | Freeform creative guidance |
Payload-guided turns, such as those started from a card, also carry interactionMode: "payload_guided" and the instance that guided them; personality-card turns add a card object identifying the card and its session.
Text Layer
The persona's finalized prose in two parallel forms.
| Field | Type | What It's For |
|---|---|---|
annotated | string | Finalized text with inline ref tags such as [ent:starholder_main:dr_chen] or [set:…]. Build navigable, linked text from this. |
clean | string | The same text with the [ent:…] and [set:…] tags removed. Ready for display, TTS, search indexing, or text analysis. |
The text that streamed during generation (content events) is provisional. annotated and clean are the turn's final word and replace it.
Mentions. Each entry in refs carries spans: the [start, end) character offsets of every place that ref is mentioned in clean. To list mentions in reading order, collect every span from every ref and sort by start. A mention's position in that sorted list is its mention index, the number media placements use as spanIndex.
Refs Layer
refs is a map keyed by canonical ref (for example ent:starholder_main:elara_mihai). It holds every ref the turn's retrieval considered, every ref the persona used, and every ref it tried to use but was refused. The prefix gives the kind: ent: an entity (a person, organization, technology), set: a setting (a place, era, institution), txt: a story, pkt: a prior ThoughtPacket.
| Field | Description |
|---|---|
href | API URL to fetch the full object. Empty for an anomaly the retrieval never found. |
spans | [start, end] offsets of each mention in text.clean. Empty when the ref was considered or accepted but not named in the prose. |
score | Relevance to the query, 0.0–1.0. Omitted when 0. |
label | Human-readable name. Omitted when the server has nothing better than the ref itself; humanize the ref in that case. |
status | "anomaly" for a refused ref; omitted otherwise |
reason | Present with status: "anomaly": not_in_traversal_outputs (the persona named something retrieval never returned) or forbidden_by_policy (a valid ref not allowed in this context) |
The wire does not separate refs that were only considered from refs the persona used: both appear without status. A ref with spans was named in the prose. To follow which refs the persona accepted, and when they were validated, watch the ref_accepted events on a stream: each carries renderState render_provisional while the persona is writing and commit_validated after validation.
For builders: anomalies are a quality signal. A high rate of not_in_traversal_outputs means the persona is reaching past what the world's graph supplied.
Media Layer
Resolved imagery for every entity and setting referenced, with per-mention placement context.
Bundles
media.bundles is a map from ref to that ref's imagery. In a v2 surface each value is an object; in a v1 snapshot it can be the bare items array.
| Field | Description |
|---|---|
authority | runtime_explicit (imagery tagged to this ref) or runtime_provisional (the best available stand-in while explicit imagery is unresolved) |
replacementKey / revision | Identify this bundle across streamed updates: a later revision with the same key replaces an earlier one |
items[].mediaRef | Asset reference |
items[].score | Relevance to this ref (0.0–1.0) |
items[].tier | Quality: 0 = exact match (tagged to this ref), 1 = contextually relevant, 2 = fallback |
items[].provenance | direct (explicitly tagged), semantic (found by vector similarity), fallback (best available when nothing better exists) |
items[].resolveHref | URL to fetch the image file: /api/media/resolve/{mediaRef} |
Placements
media.placements maps specific mentions to specific images. If Dr. Chen is mentioned three times in different contexts, each mention gets its own best-match image based on the surrounding sentence.
| Field | Description |
|---|---|
ref | The entity or setting |
spanIndex | Which mention in the text: the mention index described under Text Layer |
mentionKey | The same position as a key, mention:<spanIndex> |
phrase | The surrounding sentence that influenced image selection |
role | context_anchor (eligible to lead the turn's imagery; the earliest admitted one does) or mention_support (illustrates its mention only) |
primaryMediaRef | Best image for this mention in this context; primary carries its full item when present |
score | How well the image matches this specific mention context |
alternates | Other candidate images with scores |
authority, replacementKey, revision | As for bundles; placements are always runtime_provisional |
Outcomes
media.outcomes, when present, records how the media search ended for each ref:
outcome | Meaning |
|---|---|
resolved | Explicit imagery was found; finalMediaRef is the chosen image |
provisional_only | Only a stand-in was found; finalMediaRef is the stand-in |
no_media | The ref legitimately has no imagery |
failed | The search did not complete; reasonCode says why (inventory_miss, resolver_miss, exposure_omission, or incomplete) |
Context Layer
The richest layer for immersive applications. Contains atmospheric signals, environment-matching text, music, and semantic scene profiling. This layer has several independent components that serve different purposes.
Environment Matching
Used by renderers to select visual environments, color palettes, and mood.
| Field | Description |
|---|---|
contextText | Embedding-ready text for environment matching: the turn's output, the accepted entity names, and the user's message. Populated even when no settings are involved. |
priorityRefKeys | Up to 10 accepted entity labels in relevance order, used to boost media scores. Despite the name, these are labels, not refs. |
semanticInputConcepts / semanticOutputConcepts | Optional phrase evidence from the user's message and from the persona's output, each { text, phraseType } |
Structured Atmosphere
Sensory signals extracted from the dominant setting — the most relevant setting the persona referenced during reasoning. These are parsed from structured descriptors stored on each setting record. atmosphere is null when no setting supplied them; otherwise each field is an array of descriptive strings.
| Field | Description |
|---|---|
atmosphere.sound | Ambient sounds (e.g., "the gentle hum of electronic equipment and the distant pulse of neon lights") |
atmosphere.smell | Scent descriptions (e.g., "a faint metallic tang, reminiscent of advanced technology") |
atmosphere.temperature | Climate signals (e.g., "cool, with a subtle chill from the glass walls") |
atmosphere.light | Lighting conditions (e.g., "soft, ambient glow from the console, casting gentle reflections") |
atmosphere.tactile | Physical textures (e.g., "smooth, polished surfaces, cool to the touch") |
atmosphere.horizon | What you'd see looking out (e.g., "an unobstructed view of the city below, a lattice of light and shadow") |
visualSignature | The setting's visual identity distilled into one descriptive line, or null |
essence | The setting's emotional and thematic core in one line (e.g., "a sanctuary of digital echoes and contemplative light"), or null |
When no settings are referenced in the turn, atmosphere, visualSignature, and essence are null. That is correct — there is no setting data to surface. Environment matching still works because contextText is always populated.
Canonical Setting
The dominant setting that atmosphere was extracted from, with confidence scoring. Null when there is none.
| Field | Description |
|---|---|
canonicalSetting.ref | Setting ref |
canonicalSetting.label | Human-readable name |
canonicalSetting.confidence | How confident the system is that this is the right setting for this turn |
canonicalSetting.scoring | Detailed breakdown: retrievalScore, sceneSimilarity, lexicalAlignment, mismatchPenalty, finalScore |
Semantic Scene Profile
A structured analysis of the turn's semantic content, categorized into thematic phrase buckets. Useful for advanced rendering that adapts to the semantic character of the turn. Null when no profile was built.
| Field | Description |
|---|---|
semanticSceneProfile.phrasesByCategory | Key phrases organized by thematic category (e.g., "technology", "conflict", "nature") |
semanticSceneProfile.signaturesByCategory | Detailed signatures per category with phrase, score, phraseType, sourceText, sourceSegmentId, and sentenceImportance |
Derivation Mode
How the context layer was assembled — useful for debugging and quality assessment.
| Value | Meaning |
|---|---|
semantic | Normal path — atmosphere extracted from semantically matched settings |
setting_surface_fallback | Settings were found but semantic matching failed; fell back to surface-level extraction |
lexical_emergency | Last resort — no semantic or setting match; used lexical heuristics |
Music
Server-side music selection based on phrase extraction from the turn's output. musicRef is null when no track was chosen.
| Field | Description |
|---|---|
musicRef.ref | Audio asset reference |
musicRef.resolveHref | URL to stream or download the audio |
musicRef.confidence | How well this track matches the turn's mood (0.0–1.0) |
musicRef.queryPhrase | The phrase extracted from the turn that drove the music search |
Primary Subject
The dominant entity or setting for this turn — the "main character" of this particular reasoning act.
| Field | Description |
|---|---|
primarySubjectRef | Canonical ref, or null. A set: prefix means a setting; anything else is an entity. |
primarySubjectLabel | Human-readable name; omitted when the server has nothing better than the ref |
Selection priority: dominant setting (if any) > highest-relevance entity > null.
Topology Layer
Retrieval quality metrics. Tells you how dense or sparse the territory is, what drove the retrieval, and how much prior reasoning the persona had to build on.
| Field | Description |
|---|---|
resultCount | Total retrieval results found |
meanScore | Average relevance score across all results |
topScore | Best match relevance (0.0–1.0) |
bottomScore | Weakest match in the result set |
scoreStdDev | Score spread — high std dev means a mix of strong and weak matches |
sparsity | Density classification: dense, moderate, sparse, void |
perIndex.entity | Results from entity indexes |
perIndex.setting | Results from setting indexes |
perIndex.textchunk | Results from story content indexes |
seedCount | Retrieval seeds (starting points) used |
expandedCount | Candidates found through graph expansion from seeds |
inferentialCount | Prior ThoughtPackets found as retrievable context — this is the compounding effect. High numbers mean the persona is building on a rich foundation of prior reasoning. Low numbers mean it's mostly working from source material. |
anchors | Starting points for retrieval, each { ref, source, label? }, where source is direct_canonical_name (matched by name), hot_frontier (from session momentum), or seed (from a seed signal) |
For builders: Use sparsity to frame output confidence. If it's void, warn users they're in uncharted territory. If inferentialCount is high, the output is well-grounded in prior analysis. Entertainment products can narrate this: "This connection is well-documented across seventeen prior explorations" vs "We're venturing into thin territory here — the historical record is sparse."
Epistemic Layer
What the persona claims to know and how confidently it knows it.
| Field | Description |
|---|---|
uncertainty | 0.0 = fully grounded in retrieved evidence, 1.0 = pure speculation |
supportScore | Evidence grounding strength — how well the retrieved material supports the output |
mode | Reasoning mode: answer (direct response), explore (open-ended), bridge (connecting entities), canonize (establishing new facts) |
intentTags | Descriptive tags: factual_answer, depth_synthesis, bridge_discovery, etc. |
claimPreviews | Optional candidate claims gathered while the persona was writing, each with a source and, while unsettled, a status of forming or rejected |
Claims
Specific factual assertions the persona made, with the evidence backing them.
| Field | Description |
|---|---|
text | The verbatim claim |
refs | Entity and setting references that support it |
confidence | 0.0–1.0 |
Contradictions
When the persona's reasoning encounters conflicting information in the knowledge graph.
| Field | Description |
|---|---|
claimA / claimB | The two conflicting claims |
severity | reconcilable (both can be true — different perspectives, unreliable narration, timeline evolution) or irreconcilable (logical impossibility) |
For builders: Contradictions are narrative texture, not errors. A podcast frames reconcilable contradictions as "competing accounts." A documentary presents both sides. An interactive experience lets users investigate. Only irreconcilable contradictions indicate actual data quality issues.
Session Layer
Accumulated state across turns. This is what gives multi-turn conversations coherence.
| Field | Description |
|---|---|
turnCount | Turns completed in this session |
activeFactKeys | Entity and setting refs established as grounded knowledge in prior turns |
entityMomentum | Which entities keep appearing, weighted by recency and frequency. High-momentum entities are the session's "main characters." Each entry has ref and weight. |
accumulatedClaims | Every claim across all turns, with turn number, confidence, and cited refs. Track how understanding evolved. |
openThreads | Unresolved questions or topics. Each has text, status (open, partially_addressed, resolved), and introducedAtTurn. |
warmSummaries | Condensed per-turn summaries: turn, what the user asked (queryIntent), what the system concluded (summary), and the refs covered (coveredRefKeys). |
Every other layer describes only the turn that produced the surface. session is the one layer that carries forward: it reflects the conversation's accumulated knowledge, momentum, and open threads as of this turn.
SSE Event Lifecycle
When you follow a turn on a stream, events arrive in this order. The reply text arrives as content events and the surface as surface_complete; every other event shown arrives as a pee_event, named by its envelope's event.type. On the world stream that is data.event.type; room frames nest one level deeper, at data.data.event.type. See SSE Streaming.
| Phase | Events | What's Happening |
|---|---|---|
| Streaming | content | The reply text, in delta. The current runtime sends the finished annotated text in one event. |
| Streaming | ref_accepted (renderState: render_provisional) | Between generation bursts, refs the persona has touched are flushed through a side channel. |
| Streaming | ref_media_bundle | Imagery resolved for those refs, also flushed between generation bursts. |
| Validation | ref_accepted (renderState: commit_validated) | Refs that passed post-generation validation. |
| Validation | ref_anomaly | Refs that failed validation (not returned by retrieval, or forbidden by policy). |
| Post-generation | media_placement_map | Per-mention image placements resolved against the final text. |
| Post-generation | atmosphere_context | The context layer: atmosphere, canonical setting, music, scene profile. |
| Commit | thoughtpacket_committed | The ThoughtPacket has been written to the knowledge graph. Carries epistemic data. |
| Commit | contradiction_detected | Conflicts found during reasoning (if any). |
| Terminal | surface_complete | The full, authoritative Emission Surface in wire format, including the finalized text that replaces the streamed text. This is the turn's final word. |
Other PEE Events
These also arrive as pee_event envelopes and give additional operational visibility:
| Event | Description |
|---|---|
budget_warning | The turn is approaching a resource limit (dimension, remaining, threshold) |
engine_error | A recoverable or non-recoverable error during reasoning |
turn_committed | The PEE terminal signal — ThoughtPacket written, turn complete |
turn_aborted | The turn failed and no ThoughtPacket was committed |
commit_deferred | Commit was delayed (e.g., pending governance review) |
story_materialization_ready | The system detected enough accumulated reasoning to suggest a story could be materialized from this topic |
thoughtpacket:draft:complete | A draft prose rendering of the ThoughtPacket was completed |
World Stream Control Events
The world stream adds two events of its own: ping every 30 seconds, and timeout after about five minutes without events, just before it closes. Reconnect with Last-Event-ID or ?lastSeq=.
Quick Reference: Event to Surface Field
Each streamed event previews part of the surface that surface_complete delivers whole.
| Event | Previews | How to accumulate |
|---|---|---|
content | text.annotated | Append delta; replace with text at surface_complete |
ref_accepted | refs[ref] | Upsert by ref |
ref_anomaly | refs[ref] with status: "anomaly" | Upsert by ref |
ref_media_bundle | media.bundles[ref] | Replace when revision is higher for the same replacementKey |
media_placement_map | media.placements | Upsert by ref and mentionKey |
atmosphere_context | context | Replace |
thoughtpacket_committed | epistemic | Merge |
contradiction_detected | epistemic.contradictions | Append |
surface_complete | The whole surface | Replace everything |
