Introduction
Flock
Self-evolving agent coordination runtime — the harness is the flock.
Flock is a Rust coordination runtime where agents wake from a decaying pressure field, verify work through typed harness recursion (RAH), and improve topology from episode logs.
What makes Flock different
| Dimension | Typical harness (Claude Code, OpenCode) | Flock |
|---|---|---|
| Coordination | Scripts / chat / manager | Stigmergic pressure field + scheduler |
| Topology | Fixed | Evolved from .flock/episodes/ |
| Recursion | API subagents | RAH verified depth in multiplexer panes |
| Execution | Vendor PTY | In-tree flock-multiplexer + flock dashboard |
Flock is not a meta-harness wrapper or workflow DSL. Default flock run uses deterministic plugins (gridworld, shell) — wire your LLM via MCP, ACP, or remote panes. See What Flock is / is not.
Episode flywheel
flowchart LR
RUN[flock run] --> LOG[.flock/episodes]
LOG --> EVOLVE[flock evolve]
EVOLVE --> GATE[flock drift-check]
GATE --> RUN
class RUN runtime
class LOG runtime
class EVOLVE evolve
class GATE gate
- Run — scheduler-led goal loop (
flock run) or RLM verify/act (flock run --rlm) - Log — reproducible episode JSON with optional pane topology
- Evolve — topology mutations from episode corpus
- Gate —
flock drift-checkmanifest guardrails
First success in one command after install:
flock run --goal "reach target" --plugin gridworld
Episode JSON lands in .flock/episodes/. Full walkthrough: Quickstart.
Quick paths
| Goal | Page |
|---|---|
| First episode in 2 minutes | Quickstart |
| Multiplexer → dashboard → run | Daily driver |
| Cursor / Claude / Codex in panes | Agent guide |
| NDJSON socket automation | Socket API |
| MCP tool catalog | MCP tools |
| Full CLI surface | CLI reference |
Build this book locally
cargo install mdbook mdbook-mermaid
mdbook-mermaid install book
mdbook build book
mdbook serve book # http://localhost:3000
Or run ./scripts/smoke-docs.sh (included in ./scripts/verify.sh).
Live site: flock-docs.pages.dev — deploy via .github/workflows/docs.yml.
For LLM agents: llms.txt.