Skip to content

Architecture ​

How Kitsoki works: the deterministic engine, the LLM boundary, and the surfaces where the runtime reaches the outside world.

If you are writing a story, start with ../stories/. If you are testing or debugging one, use ../tracing/.

Reading paths ​

GoalRead
Understand the thesisconcept.md -> overview.md
Evaluate the design against other systemsconcept.md -> prior-art.md
Change runtime behavioroverview.md -> hosts.md -> semantic-routing.md
Work on external agentsmcp-studio.md -> agent-plugin.md -> agent-launch-policy.md
Contribute safelydeveloper-guide.md -> ../tracing/testing.md

Start here ​

  • concept.md — control inversion, progressive determinism, and why the LLM returns bounded results instead of driving the workflow.
  • overview.md — system layers, turn loop, LLM boundary, multi-surface sessions, persistence, replay, and trust model.
  • prior-art.md — what Kitsoki borrows from and rejects from interactive fiction, statecharts, workflow engines, and dialogue managers.

Runtime core ​

  • hosts.md — authoritative host-effect contracts. hosts/ is the shorter family index.
  • starlark.md — deterministic glue scripts, CodeAct snippets, cassettes, validation, and the narrow ctx capability surface.
  • semantic-routing.md — deterministic routing, synonyms, templates, typed slots, the turn cache, and replay tooling.
  • system-prompt.md — layered, cache-friendly prompts for routing and host.agent.* calls.
  • room-workbench.md — the workbench: primitive and its deterministic-seam rule.
  • prompt-intercept.md — pre-LLM prompt classification, conservative gates, and decision recording.
  • ambient-mining.md — propose/apply mining loop for staged story improvements.

Agents and studio ​

  • mcp-studio.md — the MCP facade for authoring, driving, testing, inspecting, and exporting Kitsoki sessions.
  • agent-plugin.md — external agent declarations and the invoke: host.agent.<verb> contract.
  • agent-providers.md — per-call Anthropic-compatible backend selection.
  • agent-backends.md — --agent claude|copilot|codex backend behavior and parity expectations.
  • agent-cli.md — standalone JSON/CLI access to host.agent.* verbs.
  • agent-launch.md and agent-launch-policy.md — launch-plan resolution and protected-checkout guardrails.
  • operator-ask.md — forwarding agent questions to a live operator instead of using headless-broken AskUserQuestion.
  • harness-profiles.md — repeatable profile selection for synthetic, replayed, and live harnesses.

Integrations and surfaces ​

Project infrastructure ​

See also ​