Bazaar Compute Node
Bazaar Compute Node(bcn)是一个可组合的 Agent 计算节点。用户通过 Channel 与
Agent Runtime 沟通:Channel 提供输入任务和接收结果的界面,Runtime 是用户选择的 Agent
Harness 工具。
不同的 Channel 与 Runtime 可以自由组合和扩展,不绑定具体供应商或交互形态。
核心能力
- 自由组合:根据使用场景分别选择 Channel 与 Runtime,并可独立替换和扩展。
- 持续会话:每个用户和对话拥有独立上下文,节点重启后仍可继续之前的任务。
- 真实工作区:Runtime 可以在独立工作区中分析、创建和修改文件,而不局限于文本回答。
- 可靠交付:自动处理长结果的分批发送并记录交付状态,避免任务结果静默丢失。
- 安全边界:复用所选 Harness 的权限机制,按任务需要控制文件与网络访问。
- 跨平台运行:支持 Linux、macOS 和 Windows,并以后台进程长期运行。
当前支持
当前版本提供首组可用组合:
- WeCom Channel:通过企业微信与 Agent Runtime 持续沟通;
- Codex Runtime:使用 Codex 作为 Agent Harness 工具完成任务。
Roadmap
bcn 将沿着可组合的 Channel、Runtime 与节点通用能力继续扩展。
更多 Harness
- 一个节点允许添加多个 Agents
- Agent Teams 合作
更多 Channel
- Telegram:通过 Telegram 与 Agent 交互。
- GitHub: 通过 GitHub Issue 与 Agent Harness 进行开发。
- GitLab: 将 Agent Harness 引入企业私有仓库与团队进行开发。
更多 Runtime
- Claude Code:支持选择 Claude Code 作为 Agent Harness;
- pi:支持选择 pi 作为 Agent Harness。
节点能力
- 附件发送:让 Agent 可以通过当前 Channel 交付生成的文件;
- 定时任务:创建一次性或周期性任务,由节点按计划自动执行并返回结果。
安装
项目通过 PyPI 分发,要求 Python 3.14 或更高版本:
uv tool install bazaar-compute-node
bcn --version
升级到 PyPI 上的最新正式版本:
uv tool upgrade bazaar-compute-node
也可以直接从 GitHub 运行尚未发布的源码:
uvx --from 'git+https://github.com/yuchanns/bazaar-compute-node@main' bcn --version
生产环境建议将 @main 替换为固定 tag 或 commit,避免运行版本随分支更新。
Channel
Channel 是用户输入任务、接收结果,并与 Agent Runtime 持续沟通的界面。启动节点时选择一种 Channel 即可。
WeCom
WeCom Channel 对接企业微信智能机器人,支持单聊、群聊、文本与媒体输入,以及 Markdown 长消息分批返回。群聊中需要 @机器人,确保消息能够进入节点。
在 ~/.bcn/config.toml 中配置 Bot ID:
[channel.wecom]
bot_id = "your-bot-id"
Bot Secret 不写入配置文件,只通过环境变量提供:
export BCN_WECOM_BOT_SECRET='your-bot-secret'
PowerShell:
$env:BCN_WECOM_BOT_SECRET = 'your-bot-secret'
Runtime
Runtime 是用户选择的 Agent Harness 工具,用来运行 Agent 并完成任务。启动节点时选择一种 Runtime 即可。
Codex
使用 Codex Runtime 前,需要先安装并登录 Codex CLI。
默认配置只允许 Codex 写入当前会话的工作区,并允许其命令访问网络:
[runtime]
sandbox_mode = "workspace-write"
network_access = true
如需覆盖 Codex 的默认模型或推理强度,可以在 [runtime] 中增加 model 和 effort。
除非你明确需要使用运行用户已有的主机权限,否则不要将 sandbox_mode 改为
danger-full-access。
启动节点
在 ~/.bcn/config.toml 中选择要组合的 Channel 与 Runtime。以下配置使用当前已经落地的
WeCom + Codex 组合:
[node]
channel = "wecom"
runtime = "codex"
启动后台节点:
uvx --from 'git+https://github.com/yuchanns/bazaar-compute-node@main' bcn start
也可以不创建配置文件,直接通过 --channel、--runtime、--model、--effort、
--sandbox-mode 和 --network-access 等参数启动;命令行参数会覆盖配置文件中的对应值。
常用操作
# Stop the background node gracefully.
uvx --from 'git+https://github.com/yuchanns/bazaar-compute-node@main' bcn stop
# Restart the node after changing configuration.
uvx --from 'git+https://github.com/yuchanns/bazaar-compute-node@main' bcn restart
# Inspect available options.
uvx --from 'git+https://github.com/yuchanns/bazaar-compute-node@main' bcn --help
节点数据默认保存在 ~/.bcn。停止节点会优雅关闭后台进程,不会删除既有会话、工作区或消息记录。
许可证
本项目使用 GNU Affero General Public License v3.0。
Credits
本项目的协作模型与 Agent Runtime 设计受到 Raft.build 的启发,谨此致谢。
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bazaar_compute_node-0.1.4.tar.gz.
File metadata
- Download URL: bazaar_compute_node-0.1.4.tar.gz
- Upload date:
- Size: 108.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7729f8e48e6591f5d3fb0ae7caf80ec2277e0e68284d5490917fbb02afe1640
|
|
| MD5 |
9dbb1385d88b5b00defd3fcfd3c85fe3
|
|
| BLAKE2b-256 |
20385c2428fb6f9bd5f1c49411fa0c83dc55f99ed6227f1e84beaf55b56f60e1
|
Provenance
The following attestation bundles were made for bazaar_compute_node-0.1.4.tar.gz:
Publisher:
release.yml on yuchanns/bazaar-compute-node
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bazaar_compute_node-0.1.4.tar.gz -
Subject digest:
e7729f8e48e6591f5d3fb0ae7caf80ec2277e0e68284d5490917fbb02afe1640 - Sigstore transparency entry: 2430698542
- Sigstore integration time:
-
Permalink:
yuchanns/bazaar-compute-node@40f16cd249d154e74a95bb9ae2f7dd43c9a8466b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/yuchanns
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@40f16cd249d154e74a95bb9ae2f7dd43c9a8466b -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file bazaar_compute_node-0.1.4-py3-none-any.whl.
File metadata
- Download URL: bazaar_compute_node-0.1.4-py3-none-any.whl
- Upload date:
- Size: 133.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ad1989aa28777e7314e1d9b234577e6897ae6b381e987cc9a38173bc1ec3793
|
|
| MD5 |
2054d96be2215d8bed5cd79e80e4ebf0
|
|
| BLAKE2b-256 |
bf1be0fe4c89b95c53b086f8f12fccaadfceef2a8fbb9f3b300000d78fec0784
|
Provenance
The following attestation bundles were made for bazaar_compute_node-0.1.4-py3-none-any.whl:
Publisher:
release.yml on yuchanns/bazaar-compute-node
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bazaar_compute_node-0.1.4-py3-none-any.whl -
Subject digest:
0ad1989aa28777e7314e1d9b234577e6897ae6b381e987cc9a38173bc1ec3793 - Sigstore transparency entry: 2430698765
- Sigstore integration time:
-
Permalink:
yuchanns/bazaar-compute-node@40f16cd249d154e74a95bb9ae2f7dd43c9a8466b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/yuchanns
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@40f16cd249d154e74a95bb9ae2f7dd43c9a8466b -
Trigger Event:
workflow_dispatch
-
Statement type: