Kompile × Elthoria · Open-Source Tabletop Harness

A story that remembers.A world that reacts.

Elthoria pairs a rules-owning tabletop engine with the Kompile agent harness. The model tells the story. Tools roll, resolve, persist, and verify the world behind it.

Rules before rhetoricPersistent canonProvider neutral

Elthoria · Kompile harness

● grounded

ashavale@elthoria ~

❯/elthoria-turn I slip through the chapel door before the sentry turns.

target get_play_dashboard · player-safe context

gateway mcp_tool_call → roll_skill_check · stealth · DC 17

result 23 · success · state verified

The sentry's lantern turns away just as you cross the threshold. Black water curls around your boots; somewhere below the chapel, a bell answers without being struck.

Ahead, wet footprints divide: one trail climbs toward the belfry, the other ends at a stone door marked with the Regent's seal.

What does Asha do next?

Illustrative session · player-visible state only

Not another improv chatbot

Narrative is flexible. State isn't.

Each layer has one job. A beautiful answer does not replace a dice roll, rewrite initiative, or change stored campaign history; only successful Elthoria operations establish canon.

01 · Kompile

The reasoning loop

Chooses the model, holds conversation history, applies permissions, recalls knowledge, and orchestrates exact tool calls.

ModelsMemoryPermissions

02 · MCP

The trusted bridge

Discovers hundreds of live actions without stuffing every schema into the prompt, then returns verified results to the GM.

search → call → verify

03 · Elthoria

The source of canon

Owns characters, rules, dice, maps, combat order, scenes, travel, and the living-world clock. Its successful state is what happened.

RulesWorldConsequences

The AI Game Master

One GM at the table. Two deliberate execution modes.

The dedicated harness makes Kompile the external GM by default. It reasons and narrates, while Elthoria remains the source of truth. A second, nested GM exists for explicit delegation—not as a hidden extra model turn.

Default · direct external GM

Kompile runs the turn

elthoria chat --mode standard
01Orient
mcp_tool_call → get_play_dashboard

Call the bounded player-view target through the gateway: campaign, hero, world, scene, combat, map, and next action.

02Discover
mcp_tool_search

Find the live Elthoria operation and its exact namespaced ID instead of guessing a schema.

03Resolve
mcp_tool_call → domain target

Call the exact authoritative operation. Dice, rules, combat, and world state stay in Elthoria.

04Verify
mcp_tool_call → read target

Re-read affected state through the gateway, then turn verified results into concise player-facing fiction.

MCP tool system

A broad game API behind two small schemas.

The Elthoria child boots the full application headlessly over local stdio. Kompile keeps the model prompt lean: search the live catalog first, then call the exact operation through the audited gateway.

Progressive discovery

1 · find the operation

mcp_tool_search { "query": "skill check" }

exact result

mcp__elthoria__roll_skill_check

2 · invoke through the gateway

mcp_tool_call { "tool": "...roll_skill_check", "arguments": {...} }

The permission path, audit policy, and exact server binding still apply.

Characters & rules

Sheets, abilities, saves, attacks, equipment, spells, buffs, and derived totals.

get_character_summarycalculate_armor_class

Dice & oracle

Generic dice, actor-aware checks, saving throws, attacks, and Mythic fate rulings.

roll_skill_checkfate_check

Combat

Campaign-owned encounters, combatants, initiative, rounds, turns, and resources.

start_combatnext_turn

Maps & travel

Tactical grids, hex worlds, terrain, entities, routes, locations, and ASCII views.

get_grid_asciiplan_party_travel

Living world

Weeks, factions, rumors, pressure, visible scenes, quest hooks, and chronicles.

get_world_sim_overviewadvance_world_week

Campaign & lore

Campaigns, journals, NPC context, lore activation, search, action history, and undo.

list_gamesget_activated_entries
HUD

A specifically player-safe dashboard

get_play_dashboard is a bounded eight-line allowlist—not a raw state dump. It can suggest setup, hashes visible context for refresh, and redacts hidden NPC identity. Allowlisted harness mutations refresh it without polling.

Safety boundary

Only the dashboard carries that player-safe guarantee. The GM must filter other domain-tool results instead of exposing raw world, NPC, or rules payloads.

Session context can be pinned inside an isolated stdio child. Shared transports require an explicit campaign ID on each scoped call.

Memory architecture

Two memory lanes. Deliberately separate.

The direct harness and the optional nested GM solve different memory problems. Keeping their boundaries explicit avoids duplicate servers, accidental writeback, and ambiguous ownership.

Default local harness

Conversation + campaign knowledge

Active
  • Kompile owns the outer chat transcript and model session.
  • Rulebooks, lore, notes, PDFs, and JSON share one folder-local crawl profile.
  • Knowledge search and graph reasoning run directly in the same Kompile process.
  • The Elthoria child reports resolved paths; it never starts a second local knowledge server.

SOURCE

input_documents/elthoria

LOCAL KB

kompile-harness-knowledge

GRAPH

graph.kgraph

Optional in-app / nested GM

Campaign-turn writeback

Configured mode
  • Resolve a campaign-specific Kompile fact sheet before choosing the inner provider.
  • Recall a bounded recent window by exact payload IDs, then render it chronologically.
  • After a successful grounded reply, stage an immutable turn payload and a compact graph fact.
  • Publish the newest-first index last, so interrupted writes remain recoverable and idempotent.
exact recall→provider turn→grounding→payload→graph fact→index
i

Important runtime boundary: the default folder-local harness intentionally disables managed/remote Kompile inside the Elthoria child. Its nested campaign-turn adapter is therefore dormant; the outer Kompile transcript and local knowledge workspace are the active memory. Campaign-turn writeback activates only for the configured managed/remote in-app or nested path.

Example play flows

What actually happens after you type.

Each flow starts with player intent, crosses the smallest authoritative interfaces, and ends only after the result is checked. The prose is the presentation—not the transaction.

Skill check01

“I search the flooded chapel for a hidden way below.”

  1. Context

    mcp_tool_call → get_play_dashboard
  2. Discover

    mcp_tool_search("skill check")
  3. Resolve

    mcp_tool_call → roll_skill_check(character_id, PERCEPTION, dc)
  4. Respond

    Narrate the returned die, bonus, total, and result

The check resolves uncertainty; it does not silently mutate the scene.

Fate & world02

“Does the Regent’s patrol reach Blackwater before us?”

  1. Read

    mcp_tool_call → get_world_sim_overview
  2. Ask

    mcp_tool_call → fate_check(question, odds, log_as_canon)
  3. Advance

    mcp_tool_call → advance_world_week — only when story time passes
  4. Verify

    mcp_tool_call → get_world_latest_week → dashboard refresh

The oracle uses the live chaos factor; a logged ruling can shape the next world reaction.

Lore recall03

“What promise did I make to the ferryman?”

  1. Search

    knowledge_search against crawled campaign sources
  2. Activate

    mcp_tool_call → get_activated_entries for live campaign lore
  3. Cross-check

    mcp_tool_call → campaign, scene, and journal reads
  4. Answer

    Return only relevant player-visible evidence

The outer Kompile knowledge tools handle documents; Elthoria handles live campaign lore.

Combat turn04

“I strike the warden, then fall back behind the pillar.”

  1. Establish

    mcp_tool_call → campaign-scoped combat and current actor
  2. Strike

    mcp_tool_call → roll_attack; then explicit damage / HP mutation
  3. Move

    mcp_tool_call → move_entity_on_grid → list_grid_entities
  4. Advance

    mcp_tool_call → next_turn → verify dashboard actor

An attack roll does not apply damage automatically, and Elthoria—not prose—owns initiative.

The Marches

Week 17 · Deep Winter

World in motion
Asha
Iron Regent▲ pressure
Blackwater● rumor

Latest chronicle

The western road closes at dusk. Merchants whisper that the Regent's riders are searching every cart bound for Blackwater.

A living campaign

The world takes a turn, too.

Time in Elthoria is more than a timestamp. When the story advances, NPCs pursue plans, rumors spread, faction pressure changes, travel progresses, and a new chronicle records what became visible to the players.

World pressure

Factions, conflicts, deadlines, and reputations evolve from durable state.

Oracle with consequences

Fate checks use the live chaos factor and can enter the ruling into canon.

Scenes you can return to

Player-visible scenes retain their turns, consequences, location, and outcome.

Grounded by design

From player choice to campaign canon.

The harness follows a repeatable turn contract. It can be imaginative about voice and pacing, but verified Elthoria results—not its prose—decide whether an action succeeded and what canonical state changed.

01

Read the moment

Start from a bounded, player-safe view of the hero, scene, map, combat, and living world.

02

Resolve with tools

The GM discovers the exact Elthoria action and rolls before narrating uncertain outcomes.

03

Commit the consequence

Only successful tool results update authoritative campaign state; prose alone changes nothing.

04

Carry it forward

Kompile retains the conversation and local knowledge while Elthoria advances durable world state.

Local campaign knowledge

Bring your lore. Keep one local source.

Rulebooks, campaign notes, maps, and lore live in the same folder-scoped Kompile knowledge system as the harness. Search and graph reasoning use that one local identity without starting a second knowledge server inside Elthoria.

PDFs, Markdown, JSON, and notes
Folder-local search and knowledge graph
Kompile-owned conversation history
The same context across model providers

Elthoria knowledge

One local project · one knowledge graph

Ready

12

Rulebooks

148

Lore entries

2.4k

Linked facts

knowledge_search

“What promise did Asha make to the ferryman at Blackwater?”

Illustrative local index · model routing follows your configured provider

Built into the harness

Start with intent, not tool syntax.

Packaged skills guide the GM through safe, verified play loops. The GM invokes Elthoria's compact world-command façade through tools; these are not direct Kompile slash commands.

/elthoria-play→

Enter the campaign

Find the right campaign, establish player-safe context, and resume from the current scene.

/elthoria-turn→

Resolve an action

Inspect state, call the narrowest game tool, roll when needed, and verify the consequence.

/elthoria-recap→

Remember the road

Rebuild a concise recap from visible scenes, journals, and the latest week in the world.

/elthoria-rules→

Make a grounded ruling

Answer from the active character, configured mechanics, and ingested rulebooks—not guesswork.

Elthoria tool commands/fate/rumors/travel/where/who/factions/scene/hooks

Your next campaign deserves more than a blank prompt.

Give the GM tools, the campaign durable context, and every choice a consequence that survives the next message.

$~/.elthoria/bin/elthoria chat --mode standard