A reliable orchestrator for multi-step tasks. It decomposes a high-level goal into discrete steps, dispatches them to specialized vessels, monitors execution, and adapts the plan based on results. You can watch its reasoning and progress in real-time. 🛶
Live URL: https://loop-closure.casey-digennaro.workers.dev
Most agent orchestrators lock you into a platform, obscure their reasoning, or halt completely on a single failure. You can use this to run actual work, see every decision, and maintain full ownership. No lock-in.
- Fork this repository.
- Deploy to Cloudflare Workers:
- Link your forked repo to Cloudflare.
- Create a KV namespace named
LOOP_KVand bind it. - Add your
DEEPSEEK_API_KEYas a secret variable.
- Customize the system prompt and vessel routing logic in
src/index.ts. You can have a basic orchestrator running in about 10 minutes.
Loop Closure is a single Cloudflare Worker with zero dependencies. It uses a KV namespace for persistent loop state and makes external API calls to LLMs for planning and to other fleet vessels for execution.
- Goal Decomposition: Parses a natural language goal into a sequence of runnable steps. It asks for clarification if the goal is ambiguous.
- Vessel Dispatch: Routes each step to a specialized worker capable of executing it.
- Live Monitoring: Tracks the status of every step in real-time.
- Iterative Refinement: On a step failure, it will replan up to two times before marking the loop as stalled.
- Persistent State: Maintains full loop context in KV storage across deployments and cold starts.
- Transparent UI: A simple interface to submit goals and observe the execution log.
- State Size: Each loop's execution state is limited to 128 KB due to Cloudflare KV transaction size constraints. Complex loops with many steps may approach this limit.
- It is an orchestrator, not an agent runtime. It delegates execution to external, specialized workers, avoiding bloated execution contexts.
- There is no hidden state. Every plan, decision, and error is logged and visible.
- It has zero dependencies. You deploy one Worker and bind one KV namespace.
MIT License.
Built with Cocapn — the open-source agent runtime. Part of the Lucineer fleet