cd /news/ai-agents/krystal-loop-protocol-a-bounded-work… · home topics ai-agents article
[ARTICLE · art-101307] src=github.com ↗ pub= topic=ai-agents verified=true sentiment=· neutral

Krystal Loop Protocol – a bounded worker/critic loop for AI coding agents

Krystal Loop Protocol (KLP) is a new operating pattern for AI coding agents that aims to keep multi-agent projects coherent and under human control by using a bounded worker/critic loop. The protocol, which requires no special model or infrastructure, structures work into scoped tasks with deterministic checks and independent read-only critics, and stops for human review on material changes. It addresses common agent failures such as overlapping edits, self-certified work, and false critic findings.

read4 min views3 publishedAug 18, 2026
Krystal Loop Protocol – a bounded worker/critic loop for AI coding agents
Image: Michielbdejong (auto-discovered)

Use fast AI agents for the grunt work. Use a lead agent and real checks to keep the project coherent, working, and under your control.

AI coding agents can produce a lot of code quickly. The harder problem begins after the first impressive demo: agents lose context, overlap each other's changes, trust confident summaries, reopen solved problems, and quietly break features that worked yesterday.

Krystal Loop Protocol (KLP) is a practical operating pattern for continuing to build with multiple AI agents without handing them control of the project.

Scope it. Write down the outcome, allowed files, forbidden actions, checks, budget, and stop conditions.Split it. Give each worker one small outcome that can be judged on its own.Build it. The worker returns the exact revision and a factual handover, not its own pass verdict.Check it. Run tests, linters, builds, or other deterministic checks before asking another model what it thinks.Critique it. A fresh, read-only critic reviews the exact revision against the original task and direct evidence.Adjudicate and repair it. Confirm or refute each critic finding with direct evidence, then fix confirmed blockers within declared limits.Integrate it. Treat the combined system as a new artifact and check it again.Govern it. The loop completes automatically inside its delegation. A person decides only material changes and consequential actions.

Common agent failure KLP response
Two agents edit the same shared file. Give each worker an explicit file and action boundary.
A worker says its own work is complete. Separate factual handover from independent acceptance.
A critic reviews an outdated build. Bind every verdict to an exact artifact revision.
A critic confidently reports a false problem. Confirm or refute every finding with direct evidence.
Agents keep looping without improvement. Stop on repeated findings, exhausted budgets, or a plateau.
Unit changes pass but break when combined. Review integration as a new artifact.
A test or agent message is treated as permission to deploy. Keep live actions behind an explicit human decision.

Give this to the lead agent before a multi-agent build:

Work under Krystal Loop Protocol Core.

Before changing files, write a bounded task contract containing:
- its ID, revision, parent identity, and coordinator delegation;
- the exact outcome;
- allowed and protected paths;
- forbidden actions and live side effects;
- deterministic checks and required evidence;
- time, cost, and repair-round limits;
- conditions that require stopping for human review.

Split the task into independently judgeable work units. Workers must return
factual handovers tied to exact revisions and must not certify their own work.
Run deterministic checks before independent, read-only criticism. Confirm,
refute, or leave each critic finding unresolved using direct evidence. Treat
the integrated result as a new artifact. Normal repair rounds may proceed under
the recorded delegation; material changes and consequential actions stop at
the authority boundary.

KLP does not require a special model, database, vector store, or message bus. You can start with Git and Markdown files, then add durable coordination when the project needs it.

The included examples demonstrate one complete bounded path:

DeepSeek Flash worker
  -> exact revision and deterministic checks
  -> controller-redacted, sealed review packet
  -> different-family read-only critic
  -> evidence-backed finding dispositions
  -> bounded repair or integration

Start with the DeepSeek Codex worker, then use the OpenAI-compatible critic harness. The worker launcher uses an isolated Codex profile and a reviewed assignment. The critic makes one request, validates its structured verdict locally, and cannot edit or authorize any action. The examples do not automatically connect worker output to critic input; the controller must inspect and redact the review packet first.

The fail-review-repair fixture proves a complete bounded lifecycle without provider egress or model spend:

output="$(mktemp -d)/klp-fixture"
python3 examples/fail-review-repair/run_fixture.py --out-dir "$output"
python3 -m json.tool "$output/final-receipt.json"

It creates a temporary Git project, records a deliberately incomplete worker revision, captures a failed check, runs the sealed critic harness against a loopback fake provider, confirms one real finding, refutes one false finding, applies one authorized repair, and re-checks the integrated artifact. A second test proves a zero-round repair budget stops instead of overrunning authority.

KLP Core protocolInstructions for AI agents and orchestratorsOptional runtime profilesSafety and limitsDeepSeek Codex worker exampleOpenAI-compatible critic exampleOffline fail-review-repair fixtureHermes Kanban adapter example

KLP is not an autonomous software factory, deployment platform, model router, or claim that tests prove a product has no defects. It is a portable way to bound multi-agent work, retain useful evidence, and make uncertainty visible.

KLP is inspired by public builder/critic systems such as the Gauntlet Loop. It does not claim to invent multi-agent coding, independent review, or automated testing. Its focus is what happens after the demo, when a real project must remain understandable and working across many changes.

KLP Core v0.2 is a provisional public profile. This repository includes a portable worker launcher, a sealed-packet critic harness, local fake-provider tests, example contracts, and a reproducible offline fail-review-repair fixture. The fixture proves protocol mechanics; it does not certify model quality, production safety, or a particular agent framework.

Krystal Loop Protocol uses split licensing:

  • software, scripts, schemas, configuration examples, and tests are licensed under Apache License 2.0(Apache-2.0

); - protocol and documentation text are licensed under Creative Commons Attribution 4.0(CC-BY-4.0

).

See the licensing map for the file-level boundary.

── more in #ai-agents 4 stories · sorted by recency
── more on @krystal loop protocol 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/krystal-loop-protoco…] indexed:0 read:4min 2026-08-18 ·