Why poo?
Many JS-written harnesses like pi promote a self-improving agent. poo promotes an engineered agent.
Each approach fits different work. A self-improving harness fits when you want an agent that writes and loads its own extensions at runtime. poo fits when you want fixed capability boundaries, headless automation, or a custom Go binary.
From one Go codebase, poo ships two deliverables:
- A headless CLI (with an interactive REPL) that runs sessions without a full terminal UI.
- An embeddable Go library that a wrapping application links into its own binary.
Unlinked packages cannot be reached at runtime. A read-only build omits bash, so no prompt or config can invoke a shell.
The Extensibility Ladder
Not every customization requires writing Go. poo separates operational configuration from structural capability across three layers:
- Drop-in manifests (no rebuild): Extend an existing
poobinary with declarative JSON/YAML files on disk:cli-registrymanifests to expose CLI tools throughcall_cli(andfind_toolwhen a catalog grows large).mcp.jsonmanifests for MCP servers and resource feeds.feedsmanifests for long-lived command streams that deliver events into a session.skillsdirectories (SKILL.md) for on-demand procedural guidance.
- YAML profiles & prompt sections (no rebuild): Shape behavior per project or role in
settings.yaml. Compose profiles (base,code,search, or custom profiles), append or swap named prompt sections, and tune compaction strategies. You can also attach permission rules, asker chains, andbwrapsandboxing. - Compile-time Go binary (
server.New): Use this layer when you need hard capability boundaries, custom tools, custom executors, or a bespoke wire server. Importpooas a library, wire your packages intoserver.New, and ship a single static binary. See Build Your Own Binary.
Stdlib-Only Core
The core packages — poo, poo/prompt, poo/decide, and poo/wire/protocol — depend on the Go standard library only. internal/depcheck enforces this boundary in go test.
Opt-in packages (YAML/TOML config, MCP SDK, QuickJS/Starlark codemode, SQLite, readline) live outside the core. Consumers embedding poo only pull in the dependencies they actually link.
Explicit FSM & Closed Settle Reasons
Agent loops built around while True and exception-driven control flow make wire protocols, session replay, and headless automation fragile. poo runs an explicit finite state machine:
idle → requesting → streaming → executing → compacting → settling → settledEvery run terminates with a closed, typed settle reason (such as completed, cancelled, turn/token/duration limit, or truncation). Runs never rely on a magic string printed to stdout or a control message mixed into the transcript. Tool calls are recorded as typed records with explicit outcomes, and the finish tool carries a schema-validated result.
Non-Silent History
poo enforces a single governing rule for transcripts: nothing rewrites the model's view of history silently.
- The append-only session store preserves the full trajectory.
- Compaction never mutates or drops older turns behind the scenes. Strategies like
summary,handoff,mine,pointer, andnativerecord a visible, typed replacement in the session log while leaving the underlying store intact. - The rendered system prompt is frozen for the length of a run so provider prompt caches remain valid.
Proven on Evals
Architecture claims only matter if the harness can drive models through real multi-step engineering tasks. poo ships both a 20-task local evaluation suite (poo-eval) and a Harbor adapter (evals/harbor) for Terminal-Bench and SWE-bench.
In head-to-head Terminal-Bench runs on locally hosted glm-5.3-flash, poo beat pi and tied mini-swe-agent. That is not an exhaustive benchmark across every frontier model, and results will vary by model and dataset. Still, it shows that poo's explicit FSM, stateless shell contract, and compaction pipeline hold up under relentless autonomous runs.
Further Reading
- Prior Art — exactly what
poocopies and rejects frommini-swe-agentandpi-durable. - Evals & Benchmarks — running
poo-evaland the Harbor Terminal-Bench / SWE-bench adapter. - Build Your Own Binary — wiring custom tools, profiles, and conformance tests at compile time.
