AgentLoop
Run until done
An agent that calls tools, observes results, and decides when to stop — bounded by an explicit turn limit, recoverable across restarts.
Case study · Open source
A DAG workflow engine for durable jobs and autonomous LLM coding pipelines. One Go binary, an embedded NATS server, and step types — AgentLoop, Planner, Approval, Continue-As-New — that other engines treat as application-layer concerns.
Project
Durable workflow engine
Engagement
Original engine design and build
Status
v0.1 · alpha · open source
Overview
Describe work as a directed acyclic graph of tasks. The engine runs the graph, retries failures, recovers from crashes, and reconstructs state from an immutable event log.
The deploy is scp dagnats user@host && ./dagnats serve. No Postgres to migrate, no Redis to monitor, no broker to configure. The embedded NATS server is the entire substrate.

Step types
Most engines treat “run an agent until it’s done” as application-layer code you write per project. DagNats ships those primitives in the workflow language.
AgentLoop
An agent that calls tools, observes results, and decides when to stop — bounded by an explicit turn limit, recoverable across restarts.
Planner
Generate a sub-DAG of work from a brief, then run the sub-DAG through the same engine — recursion as data, not call stack.
Approval
Halt the run, surface a question to a human, and resume the workflow when an external signal arrives.
Continue-As-New
Carry state into a fresh run instead of unbounded loops — explicit, audit-friendly, terminating.
Architecture
All workflow state lives in NATS JetStream — durable streams for events, KV buckets for snapshots and run metadata. There is no separate database.

Compared to neighbors
Temporal, Hatchet, and Inngest each have their place. DagNats is the niche where native agent step types, a one-binary deploy, and zero external databases all matter.

Specifications
Language
Go (no CGo)
Module
github.com/danmestas/dagnats
Transport
NATS JetStream (embedded)
State
Event-sourced + KV snapshots
Binaries
1 — dagnats serve
SDKs
Go · HTTP bridge
Discipline
TigerStyle · bounded loops
License
Apache-2.0 · alpha
Related
DagNats orchestrates work that libfossil stores and EdgeSync distributes — three pieces of one substrate for autonomous coding agents.
Reach out
Questions about the engine, want to use it for something, or just want to compare notes — send me an email.
[email protected]