Skip to content

Upstream Kompile Harness Integration ​

Elthoria Harness is built specifically to run on top of the upstream Kompile Harness ↗. Instead of reimplementing model providers, auth stores, chat UIs, memory, policy enforcement, or document crawling inside the RPG server, Elthoria delegates all general agent infrastructure to Kompile and focuses strictly on authoritative tabletop roleplay state.


Process & responsibility boundary ​

text
┌────────────────────────────────────────────────────────────────────┐
│  Upstream Kompile Harness (`kompile chat` / `kompile chat --web`)  │
│  • Model providers, OAuth/API auth, local-runtime GPUs             │
│  • TUI / Web Chat, slash commands, transcripts, persistent memory  │
│  • Enforcer, Judge, subagents, skills, reminders, peers            │
│  • Folder-local crawl, hybrid RAG & .kgraph knowledge reasoning    │
│  • Dynamic MCP tool discovery (`mcp_tool_search`, `mcp_tool_call`) │
└───────────────────────────────┬────────────────────────────────────┘
                                │ stdio (.mcp.json) — ELTHORIA_KOMPILE_HARNESS_CHILD=true
                                ▼
┌────────────────────────────────────────────────────────────────────┐
│  Elthoria MCP Server (`elthoria server --transport stdio --port 0`)│
│  • Authoritative campaign, character, NPC, inventory & spell DB    │
│  • Deterministic rules engine, bonus stacking, dice & fate oracle  │
│  • Initiative tracker, combat commands & stealth NPC runtime       │
│  • Living world simulation, story candidates & counterfactual sims │
│  • Persisted hex & tactical boards, ANTLR map DSL, lorebooks       │
│  • Pinned `get_play_dashboard` & guarded PDF Content Workbench     │
└────────────────────────────────────────────────────────────────────┘

Why the boundary matters ​

  1. No schema bloat on every turn. Elthoria registers 300+ domain tools. In the Kompile harness workspace, the elthoria-gm role exposes only mcp_tool_search and mcp_tool_call (plus Kompile's native knowledge/pipeline tools), discovering and invoking exact Elthoria tools on demand without stuffing hundreds of JSON schemas into every LLM context window.
  2. One folder-scoped knowledge identity. ${ELTHORIA_HOME:-~/.elthoria}/kompile-harness is the single Kompile project and knowledge-base identity (kompile-harness-knowledge). Managed documents live in data/input_documents/elthoria/, and crawl/graph artifacts persist under data/crawls/kompile-harness-knowledge/ (including graph.kgraph). Elthoria never launches a second Kompile server; in child mode (ELTHORIA_KOMPILE_HARNESS_CHILD=true), legacy remote Kompile config is force-disabled.
  3. Separate install roots. Elthoria installs under ~/.elthoria; Kompile lives under ~/.kompile. Upgrading either component never clobbers the other's binaries, credentials, or workspaces.

TIP

For a complete architectural breakdown of how Elthoria's authoritative DB, elthoria-memory, journals/Lorebooks, folder-local .kgraph KB, and Kompile's persistent <memory_context> work together on every turn, read the Memory Deep Dive.


Generated harness workspace layout ​

Running elthoria (or elthoria web, elthoria exec, elthoria crawl) automatically provisions and verifies ${ELTHORIA_WORKSPACE:-~/.elthoria/kompile-harness}:

PathRole
.mcp.jsonSpawns elthoria server --transport stdio --port 0 with ELTHORIA_KOMPILE_HARNESS_CHILD=true and configures kompile.dashboard (mcp__elthoria__get_play_dashboard) plus exact mutation refresh triggers. Always regenerated and validated on launch.
.kompile/roles/elthoria-gm.mdExternal-GM persona & tool policy. Set ELTHORIA_HARNESS_SYNC=0 to preserve custom local edits.
.kompile/skills/elthoria-play.mdPrompt orchestration for starting or resuming play sessions.
.kompile/skills/elthoria-turn.mdStructured GM turn loop (query → roll → mutate → refresh dashboard → narrate).
.kompile/skills/elthoria-recap.mdGrounded player-facing session recaps from journal/world state.
.kompile/skills/elthoria-rules.mdRules & lore lookup workflow combining typed Elthoria tools with local Kompile search/graph reasoning.
.kompile/skills/elthoria-content.mdGuarded PDF intake, parsing, review, publication, and roll-table catalog import workflow.
AGENTS.mdFallback grounding contract, visibility rules, and board/content safety invariants.
kompile.project.jsonRegisters the workspace with Kompile's folder-local crawl profile.
data/input_documents/elthoria/Managed retrieval root for user-owned rulebooks and player-safe published derivatives.
data/crawls/kompile-harness-knowledge/Persisted lexical/vector index and graph.kgraph knowledge graph.

Where to go in the upstream Kompile docs ​

Use this directory whenever you want deeper configuration or operational tooling beyond Elthoria's roleplay tools:

TopicUpstream Kompile Guide
Install Kompile & channels (prerelease / stable)Installation & Updates ↗
Provider auth & OAuth (OpenAI/Codex, Claude, Antigravity, Copilot, OpenRouter, Fireworks, Together)Quickstarts by Audience ↗ & CLI Auth ↗
Starting agents & remote SSH/LAN sign-inStarting & Remote Sign-In Walkthroughs ↗
CLI TUI vs. browser Web HarnessCLI vs. Web Harness ↗ & Web Harness ↗
Slash commands (/model, /usage, /cost, /status, /compact, …)Slash Commands (/) ↗
Local LLMs, embeddings & GPU acceleration (local-runtime)Local Models & local-runtime ↗
Document crawling, RAG & .kgraph reasoningGraphs & Grounded Reasoning ↗ & Document Ingestion ↗
Enforcer, Judge, Reminders & Persistent MemoryWhy Kompile Is Opinionated ↗, The Enforcer ↗, Persistent Memory ↗
Multi-agent workflows, Subagents & SkillsInteractive Workflows ↗, Subagents ↗, Skills & Skill Manager ↗
MCP server architecture, profiles & custom MCP serversHow the MCP Server Works ↗ & MCP Tool Reference ↗
Packaging custom .kspin personasKompile Spins ↗
Public Agent Skill (SKILL.md)Agent Skill (SKILL.md) ↗

Built on the upstream Kompile harness. Released under the MIT License.