Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Introduction

Castellan

Self-evolving agent coordination runtime — the harness is the castellan.

Rust MIT CI verified
Install
curl -fsSL https://raw.githubusercontent.com/Alphabetsoup16/Castellan/main/install.sh | bash

Terminal demo — run → episode → multiplexer

Offline / no CDN — static transcript
$ castellan plugin list
$ castellan run --goal "reach target" --plugin gridworld
episode satisfied
$ castellan run --json | head -3

Download castellan-demo.cast · Run live from repo root: ./docs/demo/castellan-demo.sh

Castellan is a Rust coordination runtime: agents wake from a decaying pressure field, verify work through typed harness recursion (RAH), and improve topology from episode logs.

What makes Castellan different

DimensionTypical harnessCastellan
CoordinationScripts / chatStigmergic pressure field + scheduler
TopologyFixedEvolved from .castellan/episodes/
RecursionAPI subagentsRAH verified depth in multiplexer panes
ExecutionVendor PTYIn-tree multiplexer + castellan dashboard

Castellan is not a meta-harness wrapper or workflow DSL. Default castellan run uses deterministic plugins (gridworld, shell) — wire your LLM via MCP, ACP, or remote panes. See What Castellan is / is not.

Conventions

TermMeaning
Binarycastellan — single CLI entrypoint
ConfigLayered castellan.tomlcastellan.toml reference
Workspace.castellan/ — episodes, archive, traces
MCP toolscastellan_* prefix — MCP tools
Socket APINDJSON on multiplexer socket — Socket API

Episode flywheel

flowchart LR
    RUN[castellan run] --> LOG[.castellan/episodes]
    LOG --> EVOLVE[castellan evolve]
    EVOLVE --> GATE[castellan drift-check]
    GATE --> RUN

    classDef runtime stroke:#0969da,stroke-width:2px
    classDef evolve stroke:#d97706,stroke-width:2px
    classDef gate stroke:#1a7f37,stroke-width:2px

    class RUN,LOG runtime
    class EVOLVE evolve
    class GATE gate
  1. Runcastellan run or castellan run --rlm
  2. Log — episode JSON in .castellan/episodes/
  3. Evolve — topology mutations from corpus
  4. Gatecastellan drift-check manifest guardrails
castellan run --goal "reach target" --plugin gridworld

Full walkthrough: Quickstart.

Quick paths

GoalPage
First episodeQuickstart
Daily driver loopDaily driver
Agent in panesAgent guide
CLI surfaceCLI reference

Build this book locally

mdbook build book && mdbook serve book

See Deployment. Live site: castellan-docs.pages.dev.