DuraGraph

Self-hosted, event-sourced orchestration for durable, replayable AI agent workflows in a single binary.

Stars
★ 163
Last updated
12d ago
License
Apache-2.0
Primary language
Go

At a glance

Works with
Portable with changes
You'll need
Go toolchain (for go install or building from source)Embedded PostgreSQL and NATS (bundled in dev mode)Docker (optional, for deploy/ assets and the published image)Shell / CLINetwork accessLocal filesystem
Typical use
Teams running long-lived LLM agents that can execute for hours and who need a worker to resume from the last committed state after a crash rather than losing the run.
Main limitation
Production readiness has documented gaps: multi-tenant and NATS Accounts isolation, production Helm charts, and workflow versioning and migrations are all listed as in flight.

What does this agent do, and when should you use it?

DuraGraph is a self-hosted, enterprise-oriented orchestration layer for AI agent workflows built around one idea: every state transition is written as an immutable event to PostgreSQL in the same transaction as the work itself. That makes runs crash-safe and replayable — if a worker dies mid-tool-call, the engine resumes from the last committed state instead of losing work or re-executing it. The repository is a monorepo: cmd/duragraph holds the single control-plane binary (engine, embedded dashboard, dev bootstrapper), internal/ implements DDD, event sourcing and CQRS layers, dashboard/ is a React + TanStack Router + xyflow console with a visual workflow editor embedded into the binary at build time, python/ and go-sdk/ provide worker SDKs, examples/ ships Go and Python reference agents, and deploy/ carries Docker assets, SQL migrations and Helm charts. The external surface is a stable REST + SSE API over runs, threads, assistants and graphs, and workers register graph definitions on startup through the SDKs — no code generation or DSL. Deployment is two-mode: dev runs embedded PostgreSQL and NATS in the one binary, production points at external Postgres and NATS.

Workers connect to the control plane with the Python or Go SDK and register their graph definitions at startup. Clients create work with POST /api/v1/threads/:id/runs; the graph execution engine then walks nodes, edges, conditional branches, human-in-the-loop interrupts and tool calls, persisting each state transition as an event in the PostgreSQL event store as part of the same transaction. If a worker crashes, the engine resumes from the last committed state without double execution. An outbox relay forwards domain events to NATS JetStream, which drives SSE and dashboard updates decoupled from write throughput. Read paths go through CQRS queries: GET /api/v1/runs/:id fetches run state, GET /api/v1/threads/:id/runs lists a session's runs, GET /api/v1/threads/:id/runs/:run_id/stream streams live execution events, POST /api/v1/assistants registers an assistant and GET /api/v1/assistants/:id/graph introspects graph topology. OpenTelemetry-friendly Prometheus metrics are exposed as well.

  1. Teams running long-lived LLM agents that can execute for hours and who need a worker to resume from the last committed state after a crash rather than losing the run.
  2. Engineering groups that need auditability: every state change is timestamped, ordered and signed by aggregate version, so evals and compliance views can be built directly on the event store.
  3. Developers debugging a failing production run who want to step through the exact sequence of decisions that produced it instead of reading a stack trace and a vague last-known position.
  4. Individuals or small teams who want to try an agent workflow locally with zero infrastructure: one duragraph dev command starts the engine with embedded Postgres and NATS, then the Playground sends the first message.
  5. Existing Go or Python agent codebases that can register graph definitions via go-sdk or the python/ SDK without adopting a new DSL or running a code generator.
  6. Platform teams standardizing on a self-hosted control plane with REST + SSE APIs, an embedded dashboard and Prometheus metrics, planning to swap in external Postgres and NATS for production.

How do you install or deploy this agent?

Four install paths are documented:

# Homebrew (macOS, Linux)
brew install Duragraph/tap/duragraph

# One-line install script
curl -fsSL https://duragraph.ai/install.sh | sh

# From Go
go install github.com/Duragraph/duragraph/cmd/duragraph@latest

# Or grab a prebuilt binary
# → https://github.com/Duragraph/duragraph/releases

For source development:

git clone https://github.com/Duragraph/duragraph.git
cd duragraph
task dev   # runs the engine + dashboard against a local Postgres + NATS
task test  # unit + integration suite

Credentials: none are needed up front — dev mode embeds PostgreSQL and NATS, and the first sign-in uses the bootstrap admin printed in the startup logs. Production expects external PostgreSQL and NATS; deploy/ contains Docker and SQL migrations, while production Helm charts are still listed as in flight.

How do you use this agent?

Start the server:

duragraph dev
# → Engine + dashboard on http://localhost:8081

Run your first agent: open http://localhost:8081, sign in with the bootstrap admin printed in the logs, go to Playground, pick a registered assistant and send a message. Each node lights up as it runs, the full graph topology is visible, and a replayable event log is available under Traces. The examples/ directory has RAG, tool-using agent, document processing and eval references in Go and Python that run against duragraph dev out of the box.

Connect your own agent: start a worker and register graph definitions through the python/ or go-sdk/ SDK, then drive runs over the REST + SSE API:

POST   /api/v1/threads/:id/runs                  # create a run
GET    /api/v1/runs/:id                          # fetch run state
GET    /api/v1/threads/:id/runs                  # list a session's runs
GET    /api/v1/threads/:id/runs/:run_id/stream   # SSE: live execution events
POST   /api/v1/assistants                        # register an assistant
GET    /api/v1/assistants/:id/graph              # introspect graph topology

What are this agent's strengths and limitations?

Pros
  • Genuine event sourcing + CQRS + outbox implementation: every state transition is committed in the same PostgreSQL transaction as the work, so a crashed worker resumes from the last committed state with no double execution, and any run can be replayed from its event log for debugging or audit.
  • Near-zero setup friction in dev: a single binary embeds PostgreSQL and NATS, so duragraph dev brings up the engine and dashboard without docker compose or infrastructure provisioning.
  • Two first-class worker SDKs (Python package duragraph on PyPI, plus go-sdk): workers register graph definitions on startup, and no code generation or custom DSL is required.
  • Broad operational surface: a stable REST + SSE API, an embedded React + xyflow dashboard with a visual workflow editor and Traces session view, OpenTelemetry-friendly Prometheus metrics, plus Docker assets and SQL migrations under deploy/.
  • Apache-2.0 licensed, with the control plane, SDKs, dashboard and docs kept in one monorepo so they evolve against a single spec.
Limitations
  • Production readiness has documented gaps: multi-tenant and NATS Accounts isolation, production Helm charts, and workflow versioning and migrations are all listed as in flight.
  • Observability is incomplete today: the per-node REST spans endpoint does not exist yet and execution events are SSE-only.
  • Production deployment reintroduces infrastructure burden: dev embeds Postgres and NATS, but the README states production uses external PostgreSQL and NATS, so you take on operating both.
  • The architecture requires buy-in: teams need to understand event sourcing, CQRS and the outbox relay pattern, which is real cognitive overhead if all you wanted was a linear agent script.
  • No LLM provider or model adapter is documented, and no migration path is described for moving from other agent runtimes, so model-side fit cannot be judged from the available evidence.

How does this agent compare with similar options?

The README positions DuraGraph as "Temporal for AI agents" and states it uses the same architecture Temporal applies to general-purpose durable workflows, specialized for the shape of AI agent graphs (nodes, edges, conditional branches, human-in-the-loop interrupts, tool calls). It also contrasts with LangChain-class orchestrators, which store only the current state of a run and leave you with a stack trace and a vague last-known position when something breaks.

Key facts side by side with the most closely related agents.

Agent Source review Stars Updated Language Full support on
DuraGraph This agent 45 · Major gaps ★ 163 12d ago Go
Babysitter 52 · Major gaps ★ 1.8k 23d ago JavaScript Claude Code
Maze: Distributed Framework for LLM Agents 51 · Major gaps ★ 611 1mo ago Python
Self-hosted AI Starter Kit 50 · Major gaps ★ 15k 2mo ago

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
45/ 100 5-point scale 2.3 / 5
Trust 10/29
Reliability 6/14
Adaptability 10/18
Convention 9/18
Effectiveness 7/13
Verifiability 3/8
Why each dimension lost points
Trust10 / 29 · 1.7/5

README describes event sourcing, outbox, and replayability, but provides no permission model, least-privilege configuration, user confirmation flow, data-flow transparency, or sensitive-data handling policy; SECURITY.md only offers a vulnerability reporting email with no security design details. The dependency list (go.mod) includes many third-party libraries but no vulnerability scanning or lockfile strategy evidence. Rollback is only implied via event replay, with no explicit rollback procedure. Publisher identity is unverified, and source attribution relies solely on the LICENSE copyright notice. Trust-related evidence is thin across the board, so all items score low.

Reliability6 / 14 · 2.1/5

README is fairly consistent in describing architecture, status, and API endpoints, and aligns with go.mod dependencies (embedded-postgres, nats-server, echo, etc.), so self-consistency is adequate. However, dependency availability rests only on go.mod declarations with no version pinning or supply-chain verification; failure messages are evidenced only by tests raising errors (e.g., ValueError), with no user-facing error design. Thus self-consistency scores 2, others 1.

Adaptability10 / 18 · 2.8/5

README clearly targets self-hosted enterprise users, offering dev mode, single binary, and Python/Go SDKs, with scenarios reasonably covered; the 'Status' section lists implemented and in-flight features, clarifying boundaries. But trigger precision (CLI commands, API trigger conditions) lacks detail, and environment fit only mentions embedded Postgres/NATS versus external production dependencies without a concrete environment matrix. Hence audience/scenarios, capability boundaries, and environment fit score 2; trigger precision scores 1.

Convention9 / 18 · 2.5/5

README information architecture is clear (install, run, architecture, API, status, contributing), and install notes are specific (brew, curl, go install). However, naming stability has no versioning evidence; examples and FAQ only point to an examples/ directory without content; known limitations are listed in the Status section; license is complete (Apache-2.0); versioning changelog is absent; maintenance responsibility points only to GitHub Issues/Discussions with an unverified publisher. Thus license scores 3; information architecture, install notes, and known limitations score 2; others score 1 or 0.

Effectiveness7 / 13 · 2.7/5

For output usability, README provides a runnable quick start and API endpoints but no actual output examples or result demonstrations; marginal value lies in event sourcing and replayability as differentiators for AI workflows, but there is no quantified comparison against alternatives; cost-benefit lacks resource consumption, performance, or operational cost data. Hence output usability and marginal value score 2, cost-benefit scores 1.

Verifiability3 / 8 · 1.9/5

Claims in README (e.g., crash-safe, replayable) have no corresponding tests or code references for traceability; test files only cover Python SDK async execution and CLI, not core engine claims; cross-source corroboration is limited, with go.mod and README dependency descriptions consistent but insufficient to verify functionality. Fact-inference separation is weak: README mixes factual descriptions with marketing inferences (e.g., 'Temporal for AI agents') without clear distinction. All items score 1.

Risks and how to mitigate them
  • Publisher identity is unverified, and maintenance responsibility and update path are unclear; enterprises should assess supply-chain risk independently before adoption.
  • Core claims such as crash-safety and replayability in README lack traceable test or code evidence and cannot be verified via static review.
  • The dependency list includes many third-party libraries with no vulnerability scanning or lockfile strategy evidence, posing supply-chain risk.
  • Versioning changelog and naming stability notes are absent, leaving upgrade and compatibility risks unknown.
  • Security policy only provides a vulnerability reporting email, with no permission model, data-flow transparency, or sensitive-data handling details.
Evidence confidence: Low Reviewed Sep 17, 2026 Reviewed revision 09a18ab59923
See the full review method →

FAQ

Does dev mode truly need no external infrastructure?
Yes. DuraGraph ships as a single binary with embedded PostgreSQL and NATS. duragraph dev serves the engine and dashboard on http://localhost:8081 with nothing to provision and no docker compose; production deployments switch to external PostgreSQL and NATS.
What happens when a worker crashes or a tool call fails?
The state transition is persisted in the same transaction as the work, so it is already in the event store. On restart the engine resumes from the last committed state — per the README, with no double-execution and no lost work.
How do I observe execution outside the dashboard?
Subscribe to SSE at GET /api/v1/threads/:id/runs/:run_id/stream for live execution events, or poll GET /api/v1/runs/:id for run state. Domain events are also relayed to NATS JetStream via the outbox. A per-node REST spans endpoint is not available yet.
Which LLM providers are supported?
No model-provider adapters or supported-model list appear in the README or repository description, so model-side compatibility cannot be determined from the available material and needs to be verified before adoption.
Can it be used in a multi-tenant setup?
Not yet. Multi-tenant and NATS Accounts isolation are still listed as in flight. Dashboard access currently uses the bootstrap admin credentials printed in the startup logs.
View on GitHub ↗ Install ↓

Related agents