Open app
Moonborn — Developers

Ensemble relationships

Typed, bidirectional edges between personas — friend, ex-lover, mentor, rival, parent-child — that the chat runtime injects into multi-character scene prompts.

Ensembles are how Moonborn handles multi-character scenes. Without explicit relationships, two personas in the same session drift toward each other; their voices converge, their backstories blur. The ensemble layer prevents that by giving the runtime a graph to consult when it assembles the per-turn prompt.

What a relationship is

{
  "personaId": "persona_mert",
  "with": "persona_leyla",
  "type": "ex-lover",
  "note": "Co-founders who split a company and a partnership in the same quarter.",
  "bidirectional": true
}

type is one of the built-in relationship vocabulary:

  • friend, ex-friend, acquaintance
  • family, parent-child, sibling
  • romantic-partner, ex-lover, spouse
  • colleague, boss, subordinate
  • mentor, mentee, rival, adversary
  • stranger

Custom types via engine.ensemble.types.{name} config items (Team+).

How the runtime uses it

When you open a session with multiple personas (ensemble: [...]), each turn's prompt assembly includes the relationship edges adjacent to the current speaker. Mert speaks → the runtime appends "Mert is talking to Leyla, his ex-lover" plus the note.

This is intentionally lightweight: the LLM sees the relationship as prose, not as an embedding. Heavier-weight scene state — whose turn, scene phase, branching narrative — is the consumer's responsibility.

API

  • POST /v1/personas/{id}/relationships — create an edge.
  • GET /v1/personas/{id}/relationships — list the persona's ensemble.
  • DELETE /v1/personas/{id}/relationships/{otherId} — remove an edge.
  • GET /v1/personas/{id}/ensemble — the full subgraph reachable from this persona, useful for visualizing scenes.

Tier

Pro and up for the relationship graph + multi-persona chat sessions.

Honest scope

Ensembles are a relationship layer, not a scene engine. We don't manage turn order, scene state, or branching narrative. Pair Moonborn's ensemble with your own orchestration framework — see Multi-character scenes.