add Originality Commitment
AgentStateBus 是一个面向“多智能体协作低开销通信、状态传递与共享记忆机制”赛题的可运行原型系统。项目重点不是简单工作流编排,而是验证多 Agent 协作中的系统层基础设施:
state_id
项目只依赖 Python 标准库,便于在 openEuler 24.03-LTS-SP3 上离线运行、测试和复现。
python3 -m agentstatebus demo --out runs/demo
该命令会对同一组 10 个连续任务运行两遍:
text
structured
memory_id
主要产物:
runs/demo/text/summary.json
runs/demo/structured/summary.json
runs/demo/structured/protocol_map.json
runs/demo/structured/states/*.bin
runs/demo/structured/memory.sqlite3
runs/demo/report/comparison.json
runs/demo/report/report.md
runs/demo/report/report.html
python3 -m agentstatebus run --mode text --tasks bench/tasks.json --out runs/text python3 -m agentstatebus run --mode structured --tasks bench/tasks.json --out runs/structured python3 -m agentstatebus compare --text-run runs/text --structured-run runs/structured --out runs/report python3 -m agentstatebus memory-search --db runs/structured/memory.sqlite3 --query "systemd 部署" --tags openeuler --strategy hybrid python3 -m agentstatebus repeat --runs 3 --out runs/repeat python3 -m agentstatebus codeact-demo python3 -m agentstatebus ipc-state-demo --out runs/ipc-state-demo.json
python3 -m unittest discover -s tests
planner
retriever
executor
summarizer
agentstatebus/agents.py
agentstatebus/protocol.py
python3 -m agentstatebus run --mode text/structured
agentstatebus/state.py
states/*.bin
agentstatebus/memory.py
bench/tasks.json
agentstatebus/metrics.py
summary.json
comparison.json
python3 -m agentstatebus repeat --runs 3 --out runs/repeat
agentstatebus/codeact.py
codeact-demo
agentstatebus/ipc_state.py
ipc-state-demo
flowchart LR Runtime["多 Agent 运行时"] --> Protocol["协议解析与调度"] Protocol --> Planner["PlannerAgent"] Protocol --> Retriever["RetrieverAgent"] Protocol --> Executor["ExecutorAgent"] Protocol --> Summarizer["SummarizerAgent"] Retriever --> StateStore["二进制状态存储"] Executor --> StateStore Summarizer --> MemoryStore["SQLite 共享记忆"] Runtime --> Metrics["指标统计与报告"] MemoryStore --> Planner MemoryStore --> Retriever
完整文件结构与模块映射见 docs/structure.md;设计方案见 docs/design.md;部署说明见 docs/deploy.md;实验方案见 docs/experiment.md;完整技术报告见 docs/technical_report.md。
docs/structure.md
docs/design.md
docs/deploy.md
docs/experiment.md
docs/technical_report.md
当前 embedding 实现采用确定性的 signed-hash 向量。它并不追求超过神经向量模型,而是保证原型可以离线复现,用最小依赖验证结构化通信、非文本状态交换和共享记忆复用机制。
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802047560号
AgentStateBus
AgentStateBus 是一个面向“多智能体协作低开销通信、状态传递与共享记忆机制”赛题的可运行原型系统。项目重点不是简单工作流编排,而是验证多 Agent 协作中的系统层基础设施:
state_id引用传递二进制语义向量,减少“内部状态-文本-内部状态”的反复编解码;项目只依赖 Python 标准库,便于在 openEuler 24.03-LTS-SP3 上离线运行、测试和复现。
快速运行
该命令会对同一组 10 个连续任务运行两遍:
text模式:Agent 之间传递完整自然语言/JSON 上下文,作为传统纯文本协作基线。structured模式:Agent 之间传递紧凑动作载荷,并用state_id、memory_id引用非文本状态和共享记忆。主要产物:
runs/demo/text/summary.jsonruns/demo/structured/summary.jsonruns/demo/structured/protocol_map.jsonruns/demo/structured/states/*.binruns/demo/structured/memory.sqlite3runs/demo/report/comparison.jsonruns/demo/report/report.mdruns/demo/report/report.html常用命令
测试
赛题要求映射
planner、retriever、executor、summarizer共 4 个 Agentagentstatebus/agents.py中实现agentstatebus/protocol.py定义动作、载荷、结果、wire parser、能力握手和协议映射python3 -m agentstatebus run --mode text/structuredagentstatebus/state.py保存二进制states/*.bin,Agent 之间传递state_idagentstatebus/memory.py使用 SQLite 保存记忆单元,并支持关键词/标签/语义/混合检索bench/tasks.json中包含 openEuler 部署组和代码协作分析组,各 5 个任务agentstatebus/metrics.py、summary.json、comparison.json、Markdown/HTML 报告python3 -m agentstatebus demo --out runs/demopython3 -m agentstatebus repeat --runs 3 --out runs/repeatagentstatebus/codeact.py与codeact-demoagentstatebus/ipc_state.py与ipc-state-demo架构概览
完整文件结构与模块映射见
docs/structure.md;设计方案见docs/design.md;部署说明见docs/deploy.md;实验方案见docs/experiment.md;完整技术报告见docs/technical_report.md。说明
当前 embedding 实现采用确定性的 signed-hash 向量。它并不追求超过神经向量模型,而是保证原型可以离线复现,用最小依赖验证结构化通信、非文本状态交换和共享记忆复用机制。