Hibiki — Autonomous Agent Swarm Coordinator
Hibiki — Autonomous Agent Swarm Coordinator
An internal coordination platform built on the A2A (Agent-to-Agent) protocol and MCP (Model Context Protocol), running multiple LLM agents over a shared task queue, memory, and tool-execution surface. NATS JetStream is the message bus, Redis the short-term memory, and SQLite the durable log. R&D prototype.
Live Demo
Preview the actual application interface
Coordination graph
Agent roster
Live task timeline
decomposed goal into 4 sub-tasks
rag.query(topic='spec-v3', k=8)
returned 6 chunks · 2.1 KB
repo.edit(file='parser.ts', patch=...)
3 files changed · 48 insertions
approve: tests pass, policy clean
test.run(suite='integration')
142 passed · 0 failed · 1.29 s
Message inspector
A2A · JSON{
"id": "msg_01JD0WNX7Q",
"from": "Planner",
"to": "Coder",
"protocol": "A2A/1.0",
"intent": "task.assign",
"task": {
"id": "t_parser_patch",
"goal": "apply spec-v3 to parser.ts",
"budget_usd": 0.42,
"deadline_ms": 15000
},
"context_ref": "ctx://run/7a3f/stage-2",
"trace_id": "trace_4f29a1"
}Policy
- Critic must approve shell.run
- Budget cap 5.00 USD / run
- Max 3 re-plan attempts
- PII redaction on researcher
- Executor sandboxed (firejail)
- Trace sampling 100%
Challenge
Existing agent frameworks lean toward sequential, single-process execution. They lack a unified way to run many agents asynchronously while centralizing retries, partial-result merging, and cost ceilings. There's also no clean standard for scoping per-agent tool permissions.
Solution
A2A messages flow through NATS JetStream; MCP servers act as tool providers, accessed by agents under JWT-scoped credentials. Execution history and cost land in SQLite + Redis Streams. A supervisor agent parses the DAG and dynamically tunes retries and budgets.
Results
- 96.4% task-completion rate across 20 parallel agents (internal test)
- p95 message latency of 4.8 ms over NATS JetStream
- MCP scope controls caught 100% of tool-misuse attempts in internal red-team runs
- 32% lower per-task cost vs. a naive ReAct baseline
Measured Impact
タスク完了率
96.4%
20 agents
メッセージ遅延 p95
4.8ms
JetStream
コスト削減
-32%
vs ReAct
スコープ誤用検知
100%
internal
What it does
調整
DAG 実行
タスク依存関係を宣言的に記述し並列実行。
リトライ戦略
指数バックオフとサーキットブレーカを標準装備。
ガバナンス
予算制御
タスク・エージェント単位でトークン/円予算を強制。
MCP スコープ
ツールアクセスを JWT クレームで最小権限化。
観測
OTel トレース
エージェント間呼び出しを分散トレース。
実行再生
SQLite ログからタスクを決定論的に再生。
System Layers
Layered architecture showing components, responsibilities, and data flow.
Layer
メッセージング
A2A メッセージを永続ストリームで取り回し、DLQ で失敗を隔離。
Layer
エージェントコア
DAG 実行・リトライ・コスト上限を管理するスーパーバイザと Worker。
Layer
ツール連携
MCP サーバへの呼び出しを JWT スコープで制御し、危険ツールはサンドボックス内で実行。
Layer
状態・観測
短期メモリ・永続ログ・トレースを分離し、デバッグと監査を両立。
How we built it
プロトコル設計
A2A/MCP のメッセージを Protobuf 化し、契約テストを整備。
Deliverables
- Proto 定義
- 契約テスト
- 仕様書
バス実装
NATS JetStream に A2A を載せ、バックプレッシャ試験を実施。
Deliverables
- A2A Router
- ベンチスクリプト
- 負荷試験レポート
スーパーバイザ
DAG 実行エンジンとリトライ・予算制御を実装。
Deliverables
- Supervisor
- Budget Tracker
- ユニットテスト
セキュリティ評価
MCP スコープ逸脱やプロンプトインジェクションを自己レッドチームで評価。
Deliverables
- レッドチームシナリオ
- 対策パッチ
- 評価レポート
Delivery Timeline
- Phase 0Done2026-04-23
A2A / MCP 仕様把握
両プロトコルを読み込み、相互運用の責務境界を定義。
- Phase 1Done2026-04-25
NATS 基盤構築
JetStream ストリームとコンシューマグループを設計、ベンチ完了。
- Phase 2Planned2026-05
スーパーバイザ DAG エンジン
タスク DAG をリトライ・予算付きで実行するエンジンを実装。
- Phase 3Planned2026-06
セキュリティ強化
MCP スコープとサンドボックス実行を強化、レッドチームテストを実施。
Who built it
Roles
- プラットフォームエンジニア
- セキュリティエンジニア
Tools & Platforms
Frontend
Backend
Data
Infrastructure
Other
Considering a similar project?
We will propose the best solution for your business needs.
Discuss Your Project