毕织·星桥,以毕宿之网,织协同之智。
- Python 100%
|
|
||
|---|---|---|
| bixiweave | ||
| bootstrap | ||
| dashboard | ||
| docs | ||
| examples | ||
| tests | ||
| .gitignore | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
| README_AI.md | ||
毕织 (BixiWeave)
以毕宿之网,织协同之智。
毕织 是一个声明式多 Agent 协同框架。
用 JSON DSL 定义 Agent 之间的协作流程,框架自动编译为 asyncio 协程执行——支持编排层原语(run / parallel / judge / transform / foreach)、LLM 决策、MCP 工具调用。
核心概念
数据层(能力契约) → Agent 角色的交互规范
模板层(DSL 流程) → 多 Agent 协作的声明式定义
引擎层(Pipeline) → 编排层原语 + 底层状态机运行时
工厂层(Factory) → 从 DSL 自动创建 Agent 实例
快速安装
git clone https://git.bx.wedata.club/bixiu/bixiweave.git
cd bixiweave
pip install -e .
# 如果需要 LLM Provider(可选):
pip install -e '.[openai]' # OpenAI / DeepSeek(兼容格式)
pip install -e '.[anthropic]' # Claude
pip install -e '.[all]' # 全部
快速开始
统一 CLI 入口(推荐)
# 列出所有可用的自举 Flow
bixiweave bootstrap list
# 跑 Doc-Code Aligner(文档-代码差异扫描与对齐)
bixiweave bootstrap align
# 跑三轮元评审(Pipeline 模式—显式编排轮次)
bixiweave bootstrap review
# 跑三轮元评审(Event 模式—Agent 自驱三轮,推荐)
bixiweave bootstrap review --event
# 查看上次运行结果摘要
bixiweave bootstrap status
不设置
DEEPSEEK_API_KEY会自动降级为 Mock 模式。
底层 CLI(自定义路径)
python3 -m bixiweave.cli run <pipeline.json> \
--agents <agents_dir> \
--actions-module <module.path> \
-s polling
解耦 Demo(旧示例)
# 单 Agent
python3 -m examples.decoupled_demo.demo code_review
# 3 路并行审查
python3 -m examples.decoupled_demo.demo cross_review_3x
# 编码 → 审查 → 测试
python3 -m examples.decoupled_demo.demo write_review_test
项目结构
bixiweave/
├── cli.py # CLI 入口(bixiweave run / bootstrap)
├── agent.py # Agent 运行时
├── system.py # 多 Agent 系统
├── pipeline.py # Pipeline 编排层
├── compiler.py # DSL → 协程编译器
├── dsl.py # DSL 验证器
├── event.py # 事件模型
├── persistence.py # 快照持久化
├── llm/ # LLM Provider
├── mcp/ # MCP 工具管理
bootstrap/
├── README.md # 自举入口文档
├── ROADMAP.md # 路线图 + 元评审 P0/P1
├── flows/ # Pipeline/Event 流程定义(DSL JSON)
├── agents/ # Pipeline 模式 Agent 定义
├── agents-meta/ # Event 模式 Agent 定义
├── actions/ # 动作函数包
└── data/ # 运行产物
tests/ # 60+ 测试
examples/ # 示例
三轮元评审
2026-06-12 完成首次元评审(3 Agent × 3 轮,DeepSeek LLM 模式)。
共识结论(P0)— ✅ 已修复
_periodic_runner异常传播缺失 — ✅ 已修复:异常写入context._task_errors,finally块检测后抛出RuntimeError,主循环不再静默失效- 复合状态栈取消安全 — ✅ 已修复:使用不可变
tuple代替 list,每次修改创建新 tuple,规避跨 await 点修改风险 - 事件广播非原子性 — ✅ 已修复:使用
asyncio.gather(return_exceptions=True)+put_nowait()非阻塞投递,单 Agent 失败不影响其他
查看摘要:bixiweave bootstrap status
完整报告:bootstrap/data/meta_review_report.json
路线图
| 阶段 | 核心目标 |
|---|---|
| A | 自举闭环—Agent 能自己写代码填差距 |
| B | 自我修复—Agent 能读日志自动修 bug |
| C | 多 Agent 协同演化—Agent 之间有来有回地协商 |
详细文档
详见 Wiki:
| 页面 | 内容 |
|---|---|
| Bootstrap 自举 | 统一入口 + 三轮元评审 |
| DSL 参考 | 状态机 DSL 完整语法 |
| Pipeline 编排层原语 | run / parallel / judge / transform / foreach |
| API 参考 | Event / Agent / MultiAgentSystem / Persistence |
| LLM Provider | 各 Provider 用法 |
| MCP 集成 | 工具接入 |
| 架构概览 | 系统分层设计 |
许可
AGPL-3.0