Apache Burr 0.43.0-incubating 介绍与选型指南
基于官方资料的 Apache Burr 0.43.0-incubating 认知篇:动作/状态机编排模型、可观测与持久化特性、快速上手及 Agent 框架选型对比。
Apache Burr 0.43.0-incubating 介绍与选型指南
一、信息基准
本文为认知篇,内容全部基于官方公开资料联网查证,未做本地安装实测。关键论断随文标注来源,统一查询日期为 2026-10-18。
| 事项 | 说明 |
|---|---|
| 查询日期 | 2026-10-18 |
| 版本依据 | GitHub 仓库 apache/burr 的 releases/latest 返回 tag v0.43.0-incubating(发布于 2026-08-29,官方名称"Apache Burr 0.43.0-incubating");官方发布说明称其为"第三个 Apache 官方版本",源码发布件位于 downloads.apache.org/incubator/burr/0.43.0/,PyPI 包名 apache-burr 0.43.0(来源:GitHub API releases/latest 与官方 Release Notes,2026-10-18 查询) |
| 项目状态 | Apache 孵化器(Incubating)项目;官方 Release Notes 明确"进入孵化器之前的 GitHub Release 不属于 Apache 官方发布",官方发布件以 ASF 分发服务器为准 |
| 许可证 | Apache License 2.0(ASF 项目) |
| Python 兼容 | 核心库兼容 Python 3.9+;[start]/[learn]/[cli] 可选组件要求 Python 3.10+(来源:官方 Release Notes 原文) |
官方来源清单:
| 来源 | 链接 | 用途 |
|---|---|---|
| 官网 | https://burr.apache.org/ | 定位、能力总览、代码示例 |
| 文档 | https://burr.apache.org/docs | 使用文档 |
| GitHub 仓库 | https://github.com/apache/burr | 源码、Release Notes |
| ASF 下载目录 | https://downloads.apache.org/incubator/burr/ | 签名源码发布件 |
| PyPI | https://pypi.org/project/apache-burr/0.43.0/ | 安装包 |
二、软件概述
Apache Burr(Incubating)0.43.0-incubating 是一个纯 Python 的 AI 应用/智能体(Agent)构建框架:以"动作(action)+ 转移(transition)"构成状态机来编排应用决策流,官方口号为"Build reliable AI agents and applications——Pure Python, no magic",覆盖从简单对话机器人到复杂多智能体系统(来源:官网首页 https://burr.apache.org/ ,2026-10-18 查询)。
- 当前版本:0.43.0-incubating(2026-08-29 发布,第三个 Apache 官方版本)。
- 定位:AI 应用编排库(Python 库形态,非常驻服务),强调可靠性、可观测、可测试——官网首页以三组数据自述社区规模:1,500 GitHub Stars、50 万+ PyPI 下载、700+ Discord 成员(来源:官网首页,2026-10-18 查询)。
- 许可证:Apache-2.0;技术栈:Python;自带可视化/追踪 UI(telemetry UI,0.43.0 中已从 CRA 迁移到 Vite 构建,来源:Release Notes)。
- 维护方:Apache 孵化器项目(由 Apache Incubator PMC 监督,源码发布经 PPMC 与 IPMC 投票,来源:v0.43.0-incubating Release Notes 验证章节)。
三、核心概念与工作方式
(来源:官网首页与示例代码,2026-10-18 查询)
- Action(动作):应用的最小计算单元,是一个普通 Python 函数(配合
@action装饰器声明其读取/写入的状态字段),无 DSL、无 YAML——官方强调"just Python functions and decorators"。 - State(状态):贯穿应用的不可变状态对象,动作以纯函数方式读入并返回更新后的状态(
state.update(...)),使每一步可持久化、可回放。 - Transition(转移)与状态机:以
(动作A, 动作B)的形式声明转移关系,动作图构成显式状态机;支持条件转移、分支与并行(官网能力区:Branching & Parallelism——并行执行、fan-out/fan-in、组合子应用成模块化 DAG)。 - ApplicationBuilder:以构建器模式组装动作、转移、初始状态、追踪器与持久化后端,最终
build()出可运行应用(app.run(halt_after=[...], inputs={...}))。 - 持久化(Persistence):官方原文:"Automatically persist state to disk, databases, or custom backends. Resume applications from where they left off."——0.43.0 覆盖本地文件、数据库与 S3 日志分区等后端(Release Notes 提及 S3 分区时间戳修复)。
- 可观测性(Observability):Burr UI 实时监控、调试与追踪每一步的状态变化;0.43.0 新增 Langfuse 追踪桥接(
LangfuseBridge,Release Notes #844),支持暗色模式等 UI 改进。 - Human-in-the-Loop:官方原文:"Pause execution and wait for human input at any step"——在任意动作处暂停等待人工输入,适配审批流与交互式智能体。
- 测试与回放(Testing & Replay):官网能力区列出回放历史运行、基于录制状态做测试的能力,配合状态机模型实现确定性调试。
四、功能特性
(来源:官网首页能力区与 0.43.0 Release Notes,2026-10-18 查询)
- 纯 Python API:无 DSL/YAML,动作与转移即代码,易与既有 Python 生态集成。
- 内建可观测:Burr UI 步骤级追踪与状态可视化;Langfuse 集成。
- 状态持久化与恢复:多后端持久化,应用可从中断点恢复继续执行。
- 人在回路:任意步骤暂停等待人工确认/输入。
- 分支与并行:条件路由、并行动作、fan-out/fan-in、子应用组合。
- 流式动作:0.43.0 允许单步流式动作直接 yield 字典(Release Notes #779)。
- 安全加固:
Condition.safe_expr提供受限 AST 求值的可选项(#820);Pydantic 反序列化支持模块白名单(#794)。 - 云集成文档:0.43.0 新增 AWS 部署与 Bedrock 文档(#763)。
五、快速上手(引自官方文档,未本地实测)
安装(官方 Release Notes 原文):PyPI 包名为 apache-burr 0.43.0,官方给出的安装命令为:
pip install apache-burr[learn]
[learn]/[start]/[cli] 为可选组件(要求 Python 3.10+),核心库仅要求 Python 3.9+。
最小示例(引自官网首页示例代码 chatbot.py,https://burr.apache.org/ ):
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})
示例要点(官方示例即注释级说明):@action 声明读写字段;with_tracker("local") 开启本地追踪(可在 Burr UI 中查看);halt_after 指定运行至哪个动作后停机。更多示例与教程见官方文档 https://burr.apache.org/docs 。
六、适用场景与限制
适用场景:
- LLM 对话机器人、RAG 流水线、多智能体系统等需要显式控制流与状态管理的 AI 应用(官网定位"from simple chatbots to complex multi-agent systems")。
- 需要完整执行追踪、状态回放与确定性测试的工程化智能体团队。
- 需要人工审批环节的工作流(Human-in-the-Loop 内建)。
- 已有 Python 技术栈、不希望引入 YAML/DSL 编排语言的团队。
限制(来源均为官方资料,2026-10-18 查询):
- 项目仍在孵化器阶段,版本号 0.x,API 稳定性承诺有限(0.43.0 与 0.42.0 间即有组件移除,如 BentoBurr)。
- 官方发布件目前仅覆盖源码 tarball 与 PyPI 包,安装可选组件需 Python 3.10+。
- 相对 LangGraph 等头部框架,社区规模(官网自述 1,500 stars)与第三方集成数量仍小,遇到问题可依赖的公开资料有限。
- Burr 管的是"编排与状态",不含模型推理与向量存储等底层能力,需自行组合 LLM 客户端。
七、同类选型对比
对比对象为 Agent 编排框架 LangGraph、LangChain 与 Microsoft AutoGen。GitHub 活跃度数据查询日期为 2026-10-18(来源:GitHub API 对应仓库;AutoGen 许可字段为 GitHub API 识别值)。
| 维度 | Apache Burr 0.43.0 | LangGraph | LangChain | AutoGen |
|---|---|---|---|---|
| 许可证 | Apache-2.0 | MIT | MIT | GitHub 仓库 License 字段为 CC-BY-4.0(识别值) |
| 编排模型 | 显式状态机(action + transition),纯 Python API | 图(Graph)+ 状态通道 | 链/Agent 抽象 + LangGraph 编排 | 多智能体会话(事件驱动对话) |
| 社区活跃度 | 1,500 stars(官网自述),500k+ PyPI 下载 | 43,084 stars / 7,325 forks,2026-10-11 仍有推送 | 147,875 stars / 24,814 forks,2026-10-15 仍有推送 | 61,345 stars / 9,273 forks(仓库推送 2026-04 后放缓) |
| 版本节奏 | 0.43.0(2026-08-29),0.x 快速迭代 | 高频发布(以 Releases 页为准) | 高频发布(以 Releases 页为准) | 以 Releases 页为准 |
| 可观测 | 内建 Burr UI 追踪 + Langfuse 集成 | LangSmith 平台(商业)+ 开源回调 | LangSmith 平台(商业) | AutoGen Studio/追踪 |
| 归属与治理 | Apache 孵化器(基金会中立治理) | LangChain 公司主导 | LangChain 公司主导 | Microsoft 主导 |
一句选型建议:看重基金会中立治理、显式状态机与自带开源可观测 UI,且团队以纯 Python 为主,Burr 值得评估;追求最大生态、现成集成与商业托管可观测平台,选 LangGraph/LangChain 系;多智能体对话研究原型场景 AutoGen 仍具参考价值,但需注意其仓库推进节奏放缓。
八、参考链接
- 官网:https://burr.apache.org/
- 文档:https://burr.apache.org/docs
- GitHub 仓库:https://github.com/apache/burr
- Release v0.43.0-incubating:https://github.com/apache/burr/releases/tag/v0.43.0-incubating
- ASF 下载目录:https://downloads.apache.org/incubator/burr/0.43.0/
- PyPI:https://pypi.org/project/apache-burr/0.43.0/
- incubator 页面:https://projects.apache.org/project.html?burr