In just weeks since joining the Apache Incubator, Apache Burr has already attracted over 2,100 GitHub stars and 100+ upvotes on Hacker News. The project, built by the team behind Hamilton (the dataflow framework from DagWorks Inc.), is solving a real problem that every AI builder faces: how do you build stateful, observable, and reliable AI applications without wrestling with spaghetti code?
Burr provides a clean Python API for expressing AI applications as state machines -- a concept that might sound academic but delivers real results in production. Think of it as giving your AI agent a nervous system: memory, decision logic, persistence, and full visibility into every thought process.
Why State Machines for AI?
The prevailing approach to building AI agents has been simple chains or loops: prompt the LLM, get a response, repeat. This works for basic chatbots but breaks down when you need anything more complex -- conditional branching, parallel execution, human-in-the-loop approval, error recovery, or full audit trails.
Burr takes a different approach. You define your application as a graph of actions (Python functions), where each action reads and writes named state variables. The framework handles transitions between actions, persistence, observability, and replay -- so you focus on the logic, not the plumbing.
Key Features
Simple Python API
Define actions with decorators -- no DSL, no YAML config files. Just Python functions with @action decorators that read and write state variables.
Built-in Observability UI
Real-time monitoring and debugging dashboard. See every state change, every LLM call, and every decision as it happens. No third-party tracing required.
Persistence & State Management
Automatically save and restore application state to disk, databases, or custom backends. Resume exactly where you left off.
Human-in-the-Loop
Pause execution at any step and wait for human input. Perfect for approval workflows, content review, or safety gates.
Branching & Parallelism
Run actions in parallel, fan out/fan in patterns, and build complex directed acyclic graphs (DAGs). Compose sub-applications for modular design.
Testing & Replay
Replay past runs, unit test individual actions, and validate state transitions. Build genuine confidence in your AI systems.
How It Works in Practice
Here's a minimal Burr application -- a simple chatbot -- that demonstrates the API:
from burr.core import action, State, ApplicationBuilder
@action(reads=["messages"], writes=["messages"])
def chat(state: State, llm_client) -> State:
response = llm_client.chat(state["messages"])
return state.update(
messages=[*state["messages"], response]
)
app = (
ApplicationBuilder()
.with_actions(chat)
.with_transitions(("chat", "chat"))
.with_state(messages=[])
.with_tracker("local")
.build()
)
app.run(halt_after=["chat"], inputs={"llm_client": client})
That's it. Burr handles the state management, the loop, the persistence, and the tracing. Want to add a human approval step? Add another action and a conditional transition. Want to persist between restarts? Configure a database persister. The framework was designed to grow with your application.
Integrations
Burr doesn't try to replace your existing stack -- it works alongside it. The framework integrates with all major AI providers and developer tools:
- ☑ OpenAI -- Chat completions, function calling
- ☑ Anthropic -- Claude API access
- ☑ LangChain -- Full LangChain tool and agent integration
- ☑ Haystack -- Document pipelines and retrieval
- ☑ FastAPI -- Expose Burr applications as web services
- ☑ PostgreSQL -- Persistent state storage
- ☑ Pydantic & Instructor -- Structured output validation
- ☑ Streamlit -- Quick UI prototyping
No vendor lock-in. Burr doesn't wrap or abstract the LLM APIs -- you use them directly. Burr just manages the flow, state, and observability around them.
Who Is It For?
Burr is designed for teams and developers building production AI applications that go beyond simple chat prompts. If you're building any of these, Burr could save you weeks of infrastructure work:
- ☑ Customer service agents with approval workflows and escalation paths
- ☑ Research assistants that browse, summarize, and cite sources with full audit trails
- ☑ Data analysis pipelines with conditional branching based on LLM decisions
- ☑ Multi-agent systems where different agents handle different tasks in a coordinated workflow
- ☑ Simulation environments where state needs to be tracked and replayed
Getting Started
Installation
pip install "apache-burr[start]"
Run the Telemetry UI
burr
This launches Burr's built-in observability dashboard with demo data so you can explore the UI immediately.
Try the Hello World Example
git clone https://github.com/apache/burr && cd burr/examples/hello-world-counter
python application.py
The Bigger Picture
Apache Burr joins a growing ecosystem of AI agent frameworks, but its focus on reliability through state management sets it apart. While other frameworks emphasize agentic reasoning or tool use, Burr emphasizes observability, reproducibility, and human oversight -- the things that actually matter when AI applications move from prototype to production.
The project's recent acceptance into the Apache Incubator is a significant milestone. It signals that the broader open-source community recognizes state machine-based AI application development as a serious architectural pattern. Combined with Burr's clean API and battle-tested foundation (the same team that built Hamilton), it's worth watching closely.
Links: GitHub · Website · Discord · @burr_framework