# Apache Burr: The New Open-Source Framework for Building Reliable AI Agents

Apache Burr (incubating) — a state machine framework from the Hamilton team at DagWorks Inc. for building stateful, observable AI agents and applications. 2.4K+ GitHub stars, Pure Python.

## The Problem Burr Solves

Most modern AI frameworks focus on the *what* — which LLM to call, how to format the prompt, which tools to use. But they often leave developers to figure out the harder part: **how to manage state across a multi-step AI application, track what happened at every step, and debug when things go wrong**.

Enter Apache Burr (incubating) — a Python framework that treats AI applications as **state machines**. Instead of writing spaghetti code with scattered variables and API calls, you define your application as a series of explicit computational steps (called "actions") that read from and write to a shared state, connected by clear transitions. Every step is observable, traceable, and reversible.

The result? AI agents that are actually debuggable, testable, and production-ready — not just demo-worthy.

## Who Built It

Burr was created by **Stefan Krawczyk** and **Elijah ben Izzy**, the original creators of [Apache Hamilton](https://hamilton.apache.org/) — another Apache-incubating project for building reliable data pipelines and ML workflows. Together, they founded **DagWorks Inc.** (a Y Combinator-backed company based in San Francisco) to build open-source tools for reliable AI applications.

The two projects share a philosophy: **explicit over implicit, observable over magical**. Hamilton manages data flow between functions; Burr manages state flow between computational steps. Originally, Burr was built as a companion to Hamilton — a way to handle state between Hamilton DAG executions (since DAGs can't have cycles). But the team realized Burr's approach was far more general and released it as its own project.

The naming is a playful nod to their partnership: Burr is named after [Aaron Burr](https://en.wikipedia.org/wiki/Aaron_Burr), founding father and third U.S. Vice President — and nemesis of Alexander Hamilton. "We imagine a world in which Burr and Hamilton lived in harmony and saw through their differences to better the union," the project explains.

## How Burr Works

At its core, Burr is deceptively simple. You define Python functions decorated with `@action` that read from and write to a shared `State` object. You then wire these actions together with transitions. That's it.

@action(reads=[], writes=["prompt", "chat_history"])
def human_input(state: State, prompt: str) -> State:
chat_item = {"role": "user", "content": prompt}
return state.update(prompt=prompt).append(chat_history=chat_item)

@action(reads=["chat_history"], writes=["response", "chat_history"])
def ai_response(state: State) -> State:
response = _query_llm(state["chat_history"])
chat_item = {"role": "system", "content": response}
return state.update(response=response).append(chat_history=chat_item)

app = (
ApplicationBuilder()
.with_actions(human_input, ai_response)
.with_transitions(("human_input", "ai_response"), ("ai_response", "human_input"))
.with_state(chat_history=[])
.with_entrypoint("human_input")
.build()
)

That's the entire application. Burr handles execution, state management, and tracing automatically. The key insight is that **Burr doesn't care what your actions do internally** — they can call any LLM, query any API, run any logic. Burr just manages the orchestration, state, and observability.

## Core Features

### State Machine Abstraction

Unlike graph-based frameworks that treat everything as nodes and edges, Burr models applications as explicit state machines. Every action has declared `reads` and `writes` — a contract that makes reasoning about data flow trivial. This enables powerful capabilities that other frameworks struggle with:

- **Deterministic replay:** Replay any past run exactly, step by step, with full state inspection

- **Forking:** Fork an application at any point in its history and explore alternative paths

- **Human-in-the-loop:** Pause execution at any step and wait for human input before continuing

- **Self-persistence:** State is automatically persisted to disk, databases, or custom backends — resume from where you left off

### Built-In Observability

Burr comes with a **local tracking UI** that visualizes your application's execution in real-time. Every action's inputs, outputs, and state changes are captured and displayed. You can see exactly which action ran, what state it read, what it produced, and how the application flowed between steps.

The tracking system integrates with **OpenTelemetry**, so you can also send traces to any standard observability backend (Jaeger, Zipkin, etc.). The UI can be self-hosted locally, embedded in a FastAPI application, or run via Docker.

### Parallelism & Concurrency

Burr supports running actions in parallel, fan-out/fan-in patterns, and complex DAGs. You can build multi-agent systems where several agents run concurrently, share state, and coordinate through transitions.

### Testing & Verification

Because Burr applications are structured as pure functions with explicit inputs and outputs, they're naturally testable. Burr provides utilities to generate pytest fixtures from traces, making it easy to write unit and integration tests for AI applications — something most LLM frameworks make difficult.

### Framework-Agnostic

Burr does not dictate how you build your models or query APIs. It integrates with OpenAI, Anthropic, LangChain, LlamaIndex, Haystack, Apache Hamilton, Pydantic, Instructor, and more. It also supports PostgreSQL for persistent storage and can be deployed with FastAPI.

## Burr vs. The Competition

Burr positions itself against the dominant players in AI agent orchestration. Here's how it compares:

| **Feature** | **Apache Burr** | **LangGraph** | **CrewAI** | **AutoGen**|
--- | --- | --- | --- | ---
| **State Machine Model** | ✓ Explicit state machine | ✓ Graph-based | ✗ Role-based | ✗ Multi-agent|
| **Builds on Hamilton** | ✓ Yes | ✗ No | ✗ No | ✗ No|
| **Persistence** | ✓ Built-in | ✓ Built-in | ✗ Manual | ✗ Manual|
| **Human-in-the-Loop** | ✓ First-class | ✓ Supported | ✗ Limited | ✓ Supported|
| **Replay & Forking** | ✓ Full | ✓ Partial | ✗ None | ✗ None|
| **LLM-Agnostic** | ✓ Yes | ✓ Yes | ✓ Yes | ✓ Yes|
| **Apache License** | ✓ Apache 2.0 | ✓ MIT | ✓ MIT | ✓ MIT|
| **Dependency-Free Core** | ✓ Yes | ✗ No | ✗ No | ✗ No|
| **Self-Hostable UI** | ✓ Built-in | ✗ None | ✗ None | ✗ None|

The key differentiator is Burr's **state machine approach**. While LangGraph uses a graph model where execution is driven by edge conditions, Burr uses an explicit state machine where every action has declared data dependencies. This results in superior debuggability, testability, and deterministic replay.

As one Reddit developer noted in r/LocalLlama: *"Of course, you can use it [LangChain], but whether it's really production-ready and improves the time from 'code-to-prod' [...] honestly, take a look at Burr. Thank me later."*

## Real-World Use Cases

Burr's examples demonstrate its versatility beyond chatbots:

-
- **Stateful RAG chatbot** — Conversational retrieval with full conversation history management

-
- **Multi-agent collaboration** — Multiple AI agents working together with shared state

-
- **LLM-based adventure games** — Dynamic story generation with persistent world state

-
- **Email assistant** — Interactive drafting with human approval at key steps

-
- **Time-series simulations** — Non-LLM use case for modeling dynamic systems

-
- **ML hyperparameter tuning** — Automated experimentation loops

The framework's general-purpose nature means it's not limited to LLM applications — any system that needs structured state management, observability, and human-in-the-loop workflows can benefit from Burr.

## The Apache Incubation Story

Burr was open-sourced in **2024** and initially released under the BSD-3 license. In early 2025, it entered the **Apache Incubator** under sponsorship from the Apache Incubator Program Management Committee (PMC). The project transitioned to the **Apache 2.0 license** as part of the incubation process.

The Apache Burr **0.42.0-incubating** release was announced on May 12, 2026 — the second official Apache release, following the project's name and packaging transition. Notable features included AWS Bedrock integration, cloud-native AWS deployment support, an embeddable UI for FastAPI apps, and removal of phone-home telemetry per ASF policy.

Incubation at the ASF provides important guarantees for enterprise adopters:

- **Vendor neutrality:** The project is governed by the ASF, not controlled by any single company

- **Community-driven development:** Decisions are made through public mailing lists and meritocratic consensus

- **Legal compliance:** All code is properly licensed and contributor agreements are in place

- **Sustainable governance:** A clear path from contributor to committer to PMC member

## Community & Adoption

Burr has built a growing community since its open-source debut:

- **2,432+ GitHub stars** and 165+ forks

- **15+ contributors** from around the globe

- **160+ Discord members** actively helping each other

- **350+ pull requests** and 100+ issues on GitHub

- **Multiple adopters** across robotics (Peanut Robotics), AI startups (Watto.ai), and enterprise (Provectus, TaskHuman, Paxton AI)

"After evaluating several other obfuscating LLM frameworks, their elegant yet comprehensive state management solution proved to be the powerful answer to rolling out robots driven by AI decision-making."

— **Ashish Ghosh**, CTO, Peanut Robotics

"Moving from LangChain to Burr was a game-changer! It took me just a few hours to get started with Burr, compared to the days and weeks I spent trying to navigate LangChain."

— **Aditya K.**, DS Architect, TaskHuman

## Getting Started

Installation is straightforward via pip:

# Install Burr with extras
pip install "apache-burr[start]"

# Start the tracking UI
burr

# Run the hello-world example
git clone https://github.com/apache/burr
cd burr/examples/hello-world-counter
python application.py

The tracking UI opens automatically in your browser, and the hello-world example demonstrates Burr's state machine in action with live visualization.

## What's Next

The Burr team has a clear roadmap for the project:

-
- **FastAPI integration** — First-class support for deploying Burr applications as REST APIs

-
- **Retries & exception management** — Built-in resilience patterns for production workloads

-
- **More framework integrations** — LCEL, LlamaIndex, Apache Hamilton, and others

-
- **Burr Cloud** — A hosted option for teams that want managed Burr execution

-
- **Additional storage backends** — MySQL, S3, and more cloud-native storage options

Burr Cloud represents a potential revenue model for DagWorks Inc. that keeps the core framework fully open-source while offering managed hosting for enterprise customers.

### Why Burr Matters

As AI applications move from experiments to production, the gap between "it works in a demo" and "it works reliably in production" becomes stark. Burr addresses this gap head-on by providing the one thing most AI frameworks lack: **structured, observable, testable state management**. In a landscape of frameworks that promise the world but leave you to build the hard parts yourself, Burr offers a pragmatic, Python-native approach to building AI applications that are actually maintainable.

## Related Articles

[**GLM-5.2**](/glm-5-2-new-open-source-llm-beats-claude-opus-frontier.html) — The New Open-Source LLM That's Top of the AI Leaderboard
[**Claude Fable 5 Suspended**](/claude-fable-5-suspended-us-government-export-control.html) — Why open-source matters more than ever
