Bun 队列 是 AI Skill Hub 本期精选Agent工作流之一。综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
高性能作业队列,支持 SQLite 持久化、DLQ、定时任务和 S3 备份
Bun 队列 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
高性能作业队列,支持 SQLite 持久化、DLQ、定时任务和 S3 备份
Bun 队列 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:npm 全局安装 npm install -g bunqueue # 方式二:npx 直接运行(无需安装) npx bunqueue --help # 方式三:项目依赖安装 npm install bunqueue # 方式四:从源码运行 git clone https://github.com/egeominotti/bunqueue cd bunqueue npm install npm start
# 命令行使用
bunqueue --help
# 基本用法
bunqueue [options] <input>
# Node.js 代码中使用
const bunqueue = require('bunqueue');
const result = await bunqueue.run(options);
console.log(result);
# bunqueue 配置说明 # 查看配置选项 bunqueue --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export BUNQUEUE_CONFIG="/path/to/config.yml"
<p align="center"> <a href="https://bunqueue.dev/"> <img src=".github/banner.svg" alt="bunqueue" width="400" /> </a> </p>
<p align="center"> <a href="https://www.npmjs.com/package/bunqueue"><img src="https://img.shields.io/npm/v/bunqueue?style=flat-square" alt="npm version"></a> <a href="https://www.npmjs.com/package/bunqueue"><img src="https://img.shields.io/npm/dm/bunqueue?style=flat-square" alt="npm downloads"></a> <a href="https://github.com/egeominotti/bunqueue/actions"><img src="https://img.shields.io/github/actions/workflow/status/egeominotti/bunqueue/ci.yml?style=flat-square&label=CI" alt="CI"></a> <a href="https://github.com/egeominotti/bunqueue/stargazers"><img src="https://img.shields.io/github/stars/egeominotti/bunqueue?style=flat-square" alt="GitHub Stars"></a> <a href="https://github.com/egeominotti/bunqueue/blob/main/LICENSE"><img src="https://img.shields.io/github/license/egeominotti/bunqueue?style=flat-square" alt="License"></a> </p>
<p align="center"> High-performance job queue for Bun. Memory or one-file SQLite; PostgreSQL 15–18 multi-broker when you scale.<br/> DLQ, cron, SQLite S3 backups, and native MCP. Built for AI agents and automation. No Redis. </p>
<p align="center"> <a href="https://bunqueue.dev/">Documentation</a> · <a href="https://bunqueue.dev/guide/quickstart/">Quick Start</a> · <a href="https://bunqueue.dev/guide/benchmarks/">Benchmarks</a> · <a href="https://www.npmjs.com/package/bunqueue">npm</a> </p>
---
bun add bunqueue
import { Bunqueue } from 'bunqueue/client';
const app = new Bunqueue('emails', {
embedded: true,
dataPath: './data/emails.db', // omit to run in-memory (lost on restart)
processor: async (job) => {
console.log(`Sending to ${job.data.to}`);
return { sent: true };
},
});
await app.add('send', { to: 'alice@example.com' });
That's it. Queue + Worker in one object, persisted to a single SQLite file. No Redis, no config, no setup. msgpackr is the only runtime dependency; cron, SQLite, S3, HTTP and WebSocket use Bun's built-ins.
The server does all the heavy lifting. Official client SDKs share the protocol-conformant core Queue, Worker, and Flow surface, so producers and workers can live anywhere in your stack — add a job from TypeScript, process it from Python. Language-specific capabilities are tracked in the SDK guide.
| Where your code runs | Install |
|---|---|
| **Node.js ≥ 20, Deno ≥ 2, Bun, Cloudflare Workers** | [npm install bunqueue-client](https://www.npmjs.com/package/bunqueue-client) |
| **Python ≥ 3.9** | [pip install bunqueue-client](https://pypi.org/project/bunqueue-client/) |
| **PHP ≥ 8.1** | [composer require bunqueue/client](https://packagist.org/packages/bunqueue/client) |
| **Go ≥ 1.26.5** | go get github.com/egeominotti/bunqueue/sdk/go |
| **Rust ≥ 1.85** | [cargo add bunqueue-client](https://crates.io/crates/bunqueue-client) |
| **Elixir ≥ 1.15** | Hex coming soon — today: use [sdk/elixir](./sdk/elixir) as a path dependency |
// Node.js / Deno / Cloudflare Workers
import { Queue, Worker } from 'bunqueue-client';
const queue = new Queue('emails', { host: 'localhost', port: 6789 });
await queue.add('welcome', { to: 'user@example.com' });
new Worker('emails', async (job) => ({ sent: true }), { concurrency: 10 });
```python
Every official FlowProducer resolves all job IDs and reciprocal dependency edges locally, then sends one PUSHF command. The broker validates the complete graph and commits it atomically, so a worker cannot observe a leaf from a partially-created flow.
import { FlowProducer } from 'bunqueue-client';
const flows = new FlowProducer({ host: 'localhost', port: 6789 });
const root = await flows.add({
name: 'publish-release',
queueName: 'release',
data: { version: 'candidate-42' },
children: [
{ name: 'unit-tests', queueName: 'checks', data: { suite: 'unit' } },
{ name: 'sdk-tests', queueName: 'checks', data: { suite: 'sdk' } },
],
});
console.log(
root.job.id,
root.children?.map(({ job }) => job.id)
);
await flows.close();
The repository records the contracts and the test strategy beside each implementation:
| SDK | Runtime invariants | Generated tests | Mutation engine |
|---|---|---|---|
| [TypeScript](./sdk/typescript/README.md) | [contract](./sdk/typescript/INVARIANTS.md) | fast-check | none¹ |
| [Python](./sdk/python/README.md) | [contract](./sdk/python/INVARIANTS.md) | Hypothesis | mutmut |
| [PHP](./sdk/php/README.md) | [contract](./sdk/php/INVARIANTS.md) | Eris | Infection |
| [Go](./sdk/go/README.md) | [contract](./sdk/go/INVARIANTS.md) | Rapid | Gremlins |
| [Rust](./sdk/rust/README.md) | [contract](./sdk/rust/INVARIANTS.md) | proptest | cargo-mutants |
| [Elixir](./sdk/elixir/README.md) | [contract](./sdk/elixir/INVARIANTS.md) | StreamData | Muex |
¹ The TypeScript SDK has no mutation engine. StrykerJS was removed because its dependency graph produced every advisory the weekly audit had to answer for, none of it reachable from the published client; the planners keep their fast-check coverage.
Property campaigns run in the ordinary SDK gate with deterministic replay seeds. Mutation campaigns run separately against the pure planners and snapshot validators. Contributors can reproduce the complete isolated SDK gate with bun run test:sandbox:sdk; language-specific commands live in each SDK README and AGENTS.md.
Multi-step orchestration with saga compensation, branching, parallel steps and human-in-the-loop signals — built on bunqueue, no new infrastructure:
import { Workflow, Engine } from 'bunqueue/workflow';
const orderFlow = new Workflow('order-pipeline')
.step(
'reserve-stock',
async () => {
await inventory.reserve();
return { reserved: true };
},
{
compensate: async () => await inventory.release(), // auto-rollback on failure
}
)
.step(
'charge',
async () => {
return { txId: await payments.charge() };
},
{
compensate: async () => await payments.refund(),
}
)
.waitFor('manager-approval', { timeout: 86_400_000 }) // human-in-the-loop
.step('confirm', async (ctx) => {
return { txId: (ctx.steps['charge'] as { txId: string }).txId };
});
const engine = new Engine({ embedded: true });
engine.register(orderFlow);
const run = await engine.start('order-pipeline', { orderId: 'ORD-1' });
await engine.signal(run.id, 'manager-approval', { approved: true });
| **bunqueue** | **Temporal** | **Inngest** | **Trigger.dev** | |
|---|---|---|---|---|
| **Infrastructure** | None (embedded) | PostgreSQL + 7 services | Cloud-only | Redis + PostgreSQL |
| **Saga compensation** | Built-in | Manual | Manual | Manual |
| **Human-in-the-loop** | .waitFor() | Signals API | step.waitForEvent() | Waitpoint tokens |
| **Self-hosted** | Zero-config | Complex | No | Complex |
| **Pricing** | Free (MIT) | Free / Cloud $$ | Per-execution | Free tier, then $50/mo+ |
Also included: nested workflows, doUntil/doWhile loops, forEach over dynamic lists, schema validation (Zod, ArkType, Valibot or any .parse()), step timeouts, typed events, SQLite-persisted execution state.
高性能作业队列,支持多种持久化和备份方式
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,Bun 队列 在Agent工作流赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | bunqueue |
| 原始描述 | 开源AI工作流:⚡ High-performance job queue for Bun. SQLite persistence, DLQ, cron jobs, S3 bac。⭐473 · TypeScript |
| Topics | aiai-agentsai-schedulerbackground-jobstypescript |
| GitHub | https://github.com/egeominotti/bunqueue |
| License | MIT |
| 语言 | TypeScript |
收录时间:2026-05-30 · 更新时间:2026-05-30 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端