Skip to content

Commit 33f9414

Browse files
committed
docs: sharpen cross-harness positioning
1 parent f495eec commit 33f9414

14 files changed

Lines changed: 144 additions & 46 deletions

README.md

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Bayesian-Agent
1+
# Bayesian-Agent: A Bayesian Self-Evolving Agent Framework with Cross-Harness Adaptation
22

33
<div align="center">
44
<img src="assets/banner.png" width="920" alt="Bayesian-Agent banner"/>
@@ -10,13 +10,19 @@
1010
<a href="https://github.com/DataArcTech/Bayesian-Agent">GitHub</a>
1111
</p>
1212

13-
Bayesian-Agent is a standalone Bayesian self-evolving agent framework for turning agent failures into reusable, evidence-weighted Skills and SOPs.
13+
Bayesian-Agent is a Bayesian self-evolving layer for turning agent failures into reusable, evidence-weighted Skills and SOPs across agent frameworks and execution harnesses.
14+
15+
It is designed to stand out from monolithic agent frameworks in three ways:
16+
17+
- **Run from scratch**: start with no prior traces and evolve Skills during full benchmark or production runs.
18+
- **Repair incrementally**: attach to an existing agent, read its failed trajectories, and rerun only the tasks that need repair.
19+
- **Adapt across harnesses**: integrate with GenericAgent today, and with other agent frameworks through a portable trajectory schema and adapter boundary.
1420

1521
> v0.4 is the first standalone release. It includes the core Bayesian Skill Evolution package, schemas, CLI utilities, experiment artifacts, and a clean GenericAgent integration boundary. GenericAgent itself is not copied, vendored, or forked.
1622
1723
## 📅 News
1824

19-
- **2026-05-09:** Released Bayesian-Agent v0.4 as a standalone package with core Bayesian Skill Evolution primitives, schemas, CLI utilities, and experiment artifacts.
25+
- **2026-05-09:** Released Bayesian-Agent v0.4 as a standalone cross-harness Bayesian Skill Evolution package with schemas, CLI utilities, and experiment artifacts.
2026
- **2026-05-09:** Added the optional GenericAgent adapter boundary without copying or vendoring GenericAgent.
2127
- **2026-05-09:** Published bilingual project documentation and the Bayesian-Agent framework diagram.
2228

@@ -38,12 +44,12 @@ In that setting, **Skills** and **SOPs** become first-class engineering assets.
3844
- which failure modes to avoid
3945
- when to stop, retry, or rewrite the procedure
4046

41-
Bayesian-Agent asks a simple question: if Skills are hypotheses about how to solve tasks, why should they evolve by anecdote instead of evidence?
47+
Bayesian-Agent asks a simple question: if Skills are hypotheses about how to solve tasks, why should they evolve by anecdote instead of evidence? The answer is a framework-agnostic evolution layer that can bootstrap Skills from scratch, repair existing agents incrementally, and move across harnesses as long as they emit verified trajectories.
4248

4349
<div align="center">
4450
<img src="assets/bayesian_agent_overview.png" width="900" alt="Bayesian-Agent overview"/>
4551
<br/>
46-
<em>Bayesian-Agent turns verified agent trajectories into posterior-weighted Skills and SOPs.</em>
52+
<em>Bayesian-Agent turns verified trajectories from any compatible harness into posterior-weighted Skills and SOPs.</em>
4753
</div>
4854

4955
## 🧠 Core Idea
@@ -83,8 +89,9 @@ After each verified trajectory, the framework updates a posterior belief over th
8389
- **Bayesian Skill registry**: maintain Beta posteriors, failure modes, token cost, latency, turns, and context distribution.
8490
- **Failure-mode-aware repair**: identify recurring errors and generate focused repair plans.
8591
- **Token-aware context building**: inject only the Skills with useful posterior evidence.
86-
- **Full and incremental modes**: evolve from scratch or attach to an existing agent as a repair layer.
87-
- **Framework-agnostic boundary**: integrate with GenericAgent and other harnesses through adapters instead of vendoring their code.
92+
- **Full self-evolution from scratch**: run all tasks, collect evidence online, and evolve Skills without prior traces.
93+
- **Incremental repair for existing agents**: consume failed trajectories from a baseline agent and rerun only the failed tasks.
94+
- **Cross-harness adaptation**: integrate with GenericAgent today and other agent frameworks through adapters instead of vendoring their code.
8895
- **Standard-library-first core**: v0.4 has no runtime dependency beyond Python.
8996

9097
## 🧬 Self-Evolution Mechanism
@@ -197,7 +204,7 @@ skill_context = SkillContextBuilder(registry).render(task_context="sop_bench")
197204
print(skill_context)
198205
```
199206

200-
## 🔁 Two Operating Modes
207+
## 🔁 Three Operating Patterns
201208

202209
### 🌱 Full Self-Evolving Mode
203210

@@ -215,6 +222,16 @@ Base Agent -> Failure Traces -> Bayesian Skill Evolution -> Rerun Failures -> Hi
215222

216223
This is the recommended production path because it improves an existing agent without retraining the model or replacing the original harness.
217224

225+
### 🔌 Cross-Harness Adaptation Mode
226+
227+
Bayesian-Agent is not tied to a single agent runtime. Any agent framework can become a backend if it emits the common trajectory schema and accepts posterior-weighted Skill context through an adapter.
228+
229+
```text
230+
Any Agent Harness -> Trajectory Schema -> Bayesian Skill Registry -> Adapter -> Next Harness Run
231+
```
232+
233+
This makes Bayesian-Agent a portable Skill/SOP evolution layer rather than another closed agent framework.
234+
218235
## 📊 Experimental Results
219236

220237
The v0.4 prototype was validated with GenericAgent and `deepseek-v4-flash` on SOP-Bench and Lifelong AgentBench.
@@ -247,13 +264,13 @@ In incremental mode, Bayesian-Agent only reran failed GenericAgent tasks:
247264
| SOP-Bench | GA+BayesianIncremental | deepseek-v4-flash | 100% | 216k | 10k | 226k | 17.73 |
248265
| Lifelong AgentBench | GA+BayesianIncremental | deepseek-v4-flash | 100% | 71k | 7k | 78k | 25.57 |
249266

250-
The result shows that Bayesian-Agent can work as a plug-in repair layer: it can take an existing agent below 100% accuracy and improve it with a small amount of incremental inference.
267+
The result shows that Bayesian-Agent can work as a plug-in repair layer: it can take an existing agent below 100% accuracy and improve it with a small amount of incremental inference. This is the practical advantage over one-off benchmark agents: Bayesian-Agent can sit beside a harness, learn from its failures, and improve it without replacing it.
251268

252269
Experiment artifacts are stored under [`artifacts/`](artifacts/), and the method note is in [`docs/method.md`](docs/method.md).
253270

254-
## 🔌 Relationship to GenericAgent
271+
## 🔌 GenericAgent and Cross-Harness Adaptation
255272

256-
The first prototype was validated inside GenericAgent, but Bayesian-Agent is not a GenericAgent fork.
273+
The first prototype was validated inside GenericAgent, but Bayesian-Agent is not a GenericAgent fork and not just a GenericAgent add-on.
257274

258275
The open-source structure is:
259276

@@ -263,7 +280,9 @@ The open-source structure is:
263280
- `schemas/`: portable trajectory and Skill belief schemas
264281
- `artifacts/`: reproducible benchmark result files
265282

266-
GenericAgent remains an optional backend. Users can integrate Bayesian-Agent with their own agent harness by emitting the common trajectory schema.
283+
GenericAgent remains the current experimental backend. Users can integrate Bayesian-Agent with their own agent harness by emitting the common trajectory schema and implementing the adapter boundary.
284+
285+
The long-term direction is to make Bayesian-Agent the Bayesian Skill/SOP evolution layer for many agent runtimes: GenericAgent, our own upcoming Agent harness, and other external frameworks.
267286

268287
MinimalAgent adapter support is intentionally not included in v0.4.
269288

@@ -293,6 +312,7 @@ tests/ # Standard-library unittest suite
293312
- [ ] Add executable benchmark runners for external checkouts.
294313
- [ ] Add richer rewrite policies and adapter examples.
295314
- [ ] Add adapters for more agent harnesses after the GenericAgent boundary stabilizes.
315+
- [ ] Release our own Agent harness for Bayesian-Agent; current experiments use GenericAgent as the backend harness.
296316

297317

298318
## 📈 Star History
@@ -305,7 +325,7 @@ If you use Bayesian-Agent in your research or projects, please cite it as:
305325

306326
```bibtex
307327
@software{bayesian_agent_2026,
308-
title = {Bayesian-Agent: Bayesian Self-Evolving Agent Framework},
328+
title = {Bayesian-Agent: A Bayesian Self-Evolving Agent Framework with Cross-Harness Adaptation},
309329
author = {{Xiaojun Wu}},
310330
year = {2026},
311331
url = {https://github.com/DataArcTech/Bayesian-Agent}

README_ZH.md

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Bayesian-Agent
1+
# Bayesian-Agent: A Bayesian Self-Evolving Agent Framework with Cross-Harness Adaptation
22

33
<div align="center">
44
<img src="assets/banner.png" width="920" alt="Bayesian-Agent banner"/>
@@ -10,13 +10,19 @@
1010
<a href="https://github.com/DataArcTech/Bayesian-Agent">GitHub</a>
1111
</p>
1212

13-
Bayesian-Agent 是一个独立的 Bayesian Self-Evolving Agent 框架,用于把 Agent 的失败轨迹转化为可复用、可验证、带 posterior 权重的 Skills 和 SOPs。
13+
Bayesian-Agent 是一个面向跨 Agent framework / execution harness 的 Bayesian self-evolving layer,用于把 Agent 的失败轨迹转化为可复用、可验证、带 posterior 权重的 Skills 和 SOPs。
14+
15+
它不是又一个封闭的 monolithic agent framework,而是突出三件事:
16+
17+
- **从零自进化**:没有历史 traces 也能从完整 benchmark 或生产任务中在线沉淀 Skills。
18+
- **增量修复**:接到已有 Agent 后面,读取失败轨迹,只重跑需要修复的任务。
19+
- **跨 harness 适配**:当前适配 GenericAgent,后续可通过统一 trajectory schema 和 adapter boundary 接入其他 agent frameworks。
1420

1521
> v0.4 是第一个独立开源版本。它包含 Bayesian Skill Evolution 核心包、Schema、CLI 工具、实验 artifacts,以及干净的 GenericAgent 集成边界。GenericAgent 本身不会被复制、vendoring 或 fork 到本仓库中。
1622
1723
## 📅 News
1824

19-
- **2026-05-09:** 发布 Bayesian-Agent v0.4 独立 package,包含 Bayesian Skill Evolution 核心 primitives、schemas、CLI utilities 和实验 artifacts。
25+
- **2026-05-09:** 发布 Bayesian-Agent v0.4 独立 package,包含跨 harness Bayesian Skill Evolution 核心 primitives、schemas、CLI utilities 和实验 artifacts。
2026
- **2026-05-09:** 增加可选 GenericAgent adapter boundary,不复制、不 vendoring GenericAgent。
2127
- **2026-05-09:** 发布中英文项目文档和 Bayesian-Agent 方法框架图。
2228

@@ -38,12 +44,12 @@ Prompt 可以改善单轮回答。Context 可以改善单次决策。Harness Eng
3844
- 哪些失败模式要规避
3945
- 什么时候停止、重试或重写流程
4046

41-
Bayesian-Agent 想回答的问题是:既然 Skill 本质上是“如何完成任务”的假设,为什么它的进化要靠经验堆叠,而不是靠证据更新?
47+
Bayesian-Agent 想回答的问题是:既然 Skill 本质上是“如何完成任务”的假设,为什么它的进化要靠经验堆叠,而不是靠证据更新?我们的答案是一个框架无关的进化层:既能从零 bootstrap Skills,也能增量修复已有 Agent,还能在不同 harness 之间迁移,只要它们能产出 verified trajectories。
4248

4349
<div align="center">
4450
<img src="assets/bayesian_agent_overview.png" width="900" alt="Bayesian-Agent overview"/>
4551
<br/>
46-
<em>Bayesian-Agent 将经过验证的 Agent 轨迹转化为 posterior 加权的 Skills 和 SOPs。</em>
52+
<em>Bayesian-Agent 将任意兼容 harness 的 verified trajectories 转化为 posterior 加权的 Skills 和 SOPs。</em>
4753
</div>
4854

4955
## 🧠 核心思想
@@ -83,8 +89,9 @@ P(success | theta, C, skill)
8389
- **Bayesian Skill Registry**:维护 Beta posterior、失败模式、token 成本、延迟、轮次和 context 分布。
8490
- **面向失败模式的修复**:识别反复出现的错误,生成聚焦的 repair plan。
8591
- **Token-aware context 构建**:只注入真正有 posterior 证据价值的 Skill。
86-
- **全量与增量两种模式**:既可以从零进化,也可以作为既有 Agent 的修复层。
87-
- **框架无关的边界**:通过 adapters 集成 GenericAgent 或其他 harness,而不是复制它们的代码。
92+
- **从零全量自进化**:完整运行任务,在线收集 evidence,并在无历史 traces 的情况下进化 Skills。
93+
- **已有 Agent 的增量修复层**:读取 baseline agent 的失败轨迹,只重跑失败任务。
94+
- **跨 harness 适配**:当前集成 GenericAgent,后续通过 adapters 接入其他 agent frameworks,而不是复制它们的代码。
8895
- **标准库优先**:v0.4 核心运行时不依赖 Python 标准库之外的包。
8996

9097
## 🧬 自我进化机制
@@ -197,7 +204,7 @@ skill_context = SkillContextBuilder(registry).render(task_context="sop_bench")
197204
print(skill_context)
198205
```
199206

200-
## 🔁 两种运行模式
207+
## 🔁 三种运行形态
201208

202209
### 🌱 全量 Self-Evolving Mode
203210

@@ -215,6 +222,16 @@ Base Agent -> Failure Traces -> Bayesian Skill Evolution -> Rerun Failures -> Hi
215222

216223
这是更推荐的生产路径,因为它不需要重新训练模型,也不需要替换原有 harness。
217224

225+
### 🔌 Cross-Harness Adaptation Mode
226+
227+
Bayesian-Agent 不绑定某一个 agent runtime。任何 agent framework 只要能产出统一 trajectory schema,并通过 adapter 接收 posterior 加权的 Skill context,都可以成为 Bayesian-Agent 的后端。
228+
229+
```text
230+
Any Agent Harness -> Trajectory Schema -> Bayesian Skill Registry -> Adapter -> Next Harness Run
231+
```
232+
233+
这让 Bayesian-Agent 更像一个可移植的 Skill/SOP 进化层,而不是又一个封闭 agent framework。
234+
218235
## 📊 实验结果
219236

220237
v0.4 原型基于 GenericAgent 与 `deepseek-v4-flash`,在 SOP-Bench 和 Lifelong AgentBench 上完成验证。
@@ -247,13 +264,13 @@ v0.4 原型基于 GenericAgent 与 `deepseek-v4-flash`,在 SOP-Bench 和 Lifel
247264
| SOP-Bench | GA+BayesianIncremental | deepseek-v4-flash | 100% | 216k | 10k | 226k | 17.73 |
248265
| Lifelong AgentBench | GA+BayesianIncremental | deepseek-v4-flash | 100% | 71k | 7k | 78k | 25.57 |
249266

250-
这说明 Bayesian-Agent 可以作为即插即用的 repair layer:接在一个未达到 100% 准确率的 Agent 后面,用较小的增量推理成本把失败任务补齐。
267+
这说明 Bayesian-Agent 可以作为即插即用的 repair layer:接在一个未达到 100% 准确率的 Agent 后面,用较小的增量推理成本把失败任务补齐。这也是它区别于普通 benchmark agent 的关键:它可以站在 harness 旁边,学习它的失败,并在不替换它的情况下提升它。
251268

252269
实验 artifacts 位于 [`artifacts/`](artifacts/),方法说明位于 [`docs/method.md`](docs/method.md)
253270

254-
## 🔌 GenericAgent 的关系
271+
## 🔌 GenericAgent 与跨 Harness 适配
255272

256-
第一个原型是在 GenericAgent 内部验证的,但 Bayesian-Agent 不是 GenericAgent fork。
273+
第一个原型是在 GenericAgent 内部验证的,但 Bayesian-Agent 不是 GenericAgent fork,也不只是 GenericAgent 的附属模块
257274

258275
开源结构是:
259276

@@ -263,7 +280,9 @@ v0.4 原型基于 GenericAgent 与 `deepseek-v4-flash`,在 SOP-Bench 和 Lifel
263280
- `schemas/`:可移植的 trajectory 与 Skill belief schema
264281
- `artifacts/`:可复现实验结果文件
265282

266-
GenericAgent 仍然只是可选后端。其他 Agent harness 只要能产出统一 trajectory schema,也可以接入 Bayesian-Agent。
283+
GenericAgent 是当前实验后端。其他 Agent harness 只要能产出统一 trajectory schema,并实现 adapter boundary,也可以接入 Bayesian-Agent。
284+
285+
长期方向是让 Bayesian-Agent 成为多个 agent runtime 共享的 Bayesian Skill/SOP evolution layer:包括 GenericAgent、我们后续会上传的自研 Agent harness,以及其他外部框架。
267286

268287
MinimalAgent adapter 在 v0.4 中按计划暂不提供。
269288

@@ -293,10 +312,11 @@ tests/ # Standard-library unittest suite
293312
- [ ] 增加可在外部 checkout 中执行的 benchmark runners。
294313
- [ ] 增加更丰富的 rewrite policies 和 adapter examples。
295314
- [ ] GenericAgent 边界稳定后再扩展更多 agent harness adapters。
315+
- [ ] 上传我们自己的 Agent harness;当前实验阶段使用 GenericAgent 作为 backend harness。
296316

297317
## 🚦 当前状态
298318

299-
Bayesian-Agent v0.4 是早期独立版本。当前 package 可用于 trace ingestion、Bayesian Skill belief update、context rendering、repair planning 和 result summarization。完整 benchmark execution 仍依赖 GenericAgent 等外部 Agent harness。
319+
Bayesian-Agent v0.4 是早期独立版本。当前 package 可用于 trace ingestion、Bayesian Skill belief update、context rendering、repair planning 和 result summarization,并已经验证从零全量进化、增量修复、跨 harness 适配三条路径。完整 benchmark execution 当前仍使用 GenericAgent 等外部 Agent harness;后续会上传我们自己的 Agent harness。
300320

301321
## 📈 Star History
302322

@@ -308,7 +328,7 @@ Bayesian-Agent v0.4 是早期独立版本。当前 package 可用于 trace inges
308328

309329
```bibtex
310330
@software{bayesian_agent_2026,
311-
title = {Bayesian-Agent: Bayesian Self-Evolving Agent Framework},
331+
title = {Bayesian-Agent: A Bayesian Self-Evolving Agent Framework with Cross-Harness Adaptation},
312332
author = {{Xiaojun Wu}},
313333
year = {2026},
314334
url = {https://github.com/DataArcTech/Bayesian-Agent}

docs/adapters.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
# Adapters
22

3-
Bayesian-Agent is designed to integrate with external agent harnesses without copying their code.
3+
Bayesian-Agent is designed to integrate with external agent harnesses without copying their code. This is one of the main reasons the project is not just another agent framework: the Bayesian layer can improve whichever harness emits verified trajectories.
4+
5+
## Adaptation Advantage
6+
7+
Bayesian-Agent separates Skill evolution from task execution:
8+
9+
```text
10+
Harness executes -> Bayesian-Agent learns -> Adapter injects posterior Skill context -> Harness reruns
11+
```
12+
13+
That separation enables three deployment styles:
14+
15+
- run a full benchmark from scratch with Bayesian Skill evolution enabled
16+
- repair only the failed tasks from an existing agent run
17+
- reuse the same Skill belief registry across compatible harnesses
418

519
## Adapter Contract
620

@@ -50,6 +64,10 @@ External systems should emit:
5064

5165
Bayesian-Agent can then update beliefs and render the next Skill context.
5266

67+
## Planned Bayesian-Agent Harness
68+
69+
Current experiments use GenericAgent as the backend harness. A dedicated Bayesian-Agent harness is planned so users can run the full loop without depending on GenericAgent, while still keeping GenericAgent and other frameworks as optional backends.
70+
5371
## MinimalAgent Status
5472

5573
MinimalAgent adapter support is intentionally not included in v0.4.
@@ -58,4 +76,5 @@ The recommended path is:
5876

5977
1. stabilize the GenericAgent boundary
6078
2. keep the core trace schema portable
61-
3. add more adapters only after the adapter contract has enough real usage
79+
3. upload the dedicated Bayesian-Agent harness
80+
4. add more adapters only after the adapter contract has enough real usage

0 commit comments

Comments
 (0)