Skip to main content

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 的启发,谨此致谢。

Release files for bazaar-compute-node 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bazaar-compute-node 0.1.5
File Size Uploaded
bazaar_compute_node-0.1.5.tar.gz 109.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bazaar-compute-node 0.1.5
File Interpreter ABI Platform
bazaar_compute_node-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 245.0 kB

Release files / bazaar_compute_node-0.1.5.tar.gz

Download URL bazaar_compute_node-0.1.5.tar.gz
Size 109.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2e70714726e3a92e3c7fe2103622f9a855c9ac1d1328dc431dbfd807869a41b5
BLAKE2b-256 checksum
How to use checksums
e7011aac84170d0a138fdfd586bb37f8479fff55cd26a5f121e0da274b98aba6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.

Transparency log

Release files / bazaar_compute_node-0.1.5-py3-none-any.whl

Download URL bazaar_compute_node-0.1.5-py3-none-any.whl
Size 135.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7947cd482f6cf9067aad84c899b41db4589dee99562702364d8dc0d86bd662ce
BLAKE2b-256 checksum
How to use checksums
fca7b022d9665de5aa763a46396cab8cefab2317e9bf201c3d269cf6cea49388
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.0

2 release files

0.1.38

2 release files

0.1.37

2 release files

0.1.33

2 release files

0.1.32

2 release files

0.1.31

2 release files

0.1.30

2 release files

0.1.29

2 release files

0.1.28

2 release files

0.1.27

2 release files

0.1.26

2 release files

0.1.25

2 release files

0.1.24

2 release files

0.1.23

2 release files

0.1.22

2 release files

0.1.21

2 release files

0.1.20

2 release files

0.1.19

2 release files

0.1.18

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page