Skip to content
Back to Portfolio
Automation / Developer PlatformIn Development

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.

2026 R&D (internal prototype) 2026-04
#agents#A2A#MCP#R&D

Live Demo

Preview the actual application interface

DEMO
app.autoagent.jp/dashboard
Active agents
5
A2A + MCP
Messages / min
148
trace enabled
Goal success
94.1 %
rolling 24h
Median run time
8.4 s
p95 14.2 s

Coordination graph

A2A 1.0 · MCP tool bridge
tasktaskresultspatchapprovedresultPlanner142 callsResearcher318 callsCoder204 callsCritic97 callsExecutor261 calls

Agent roster

Live task timeline

Plannerplan14:32:04.118

decomposed goal into 4 sub-tasks

Researchertool.call14:32:04.441

rag.query(topic='spec-v3', k=8)

Researchertool.result14:32:05.012

returned 6 chunks · 2.1 KB

Codertool.call14:32:05.734

repo.edit(file='parser.ts', patch=...)

Codertool.result14:32:06.208

3 files changed · 48 insertions

Criticreview14:32:06.450

approve: tests pass, policy clean

Executortool.call14:32:06.812

test.run(suite='integration')

Executortool.result14:32:08.105

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"
}
signed with agent-key · verified

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
Key Metrics

Measured Impact

タスク完了率

96.4%

20 agents

メッセージ遅延 p95

4.8ms

JetStream

コスト削減

-32%

vs ReAct

スコープ誤用検知

100%

internal

Features

What it does

調整

DAG 実行

タスク依存関係を宣言的に記述し並列実行。

リトライ戦略

指数バックオフとサーキットブレーカを標準装備。

ガバナンス

予算制御

タスク・エージェント単位でトークン/円予算を強制。

MCP スコープ

ツールアクセスを JWT クレームで最小権限化。

観測

OTel トレース

エージェント間呼び出しを分散トレース。

実行再生

SQLite ログからタスクを決定論的に再生。

Architecture

System Layers

Layered architecture showing components, responsibilities, and data flow.

L1

Layer

メッセージング

A2A メッセージを永続ストリームで取り回し、DLQ で失敗を隔離。

NATS JetStreamA2A RouterDLQ Handler
L2

Layer

エージェントコア

DAG 実行・リトライ・コスト上限を管理するスーパーバイザと Worker。

SupervisorWorker PoolBudget Tracker
L3

Layer

ツール連携

MCP サーバへの呼び出しを JWT スコープで制御し、危険ツールはサンドボックス内で実行。

MCP GatewayScope EnforcerSandbox Runner
L4

Layer

状態・観測

短期メモリ・永続ログ・トレースを分離し、デバッグと監査を両立。

Redis Short-termSQLite LogOTel Exporter
Development Process

How we built it

Step 1

プロトコル設計

A2A/MCP のメッセージを Protobuf 化し、契約テストを整備。

Deliverables

  • Proto 定義
  • 契約テスト
  • 仕様書
Step 2

バス実装

NATS JetStream に A2A を載せ、バックプレッシャ試験を実施。

Deliverables

  • A2A Router
  • ベンチスクリプト
  • 負荷試験レポート
Step 3

スーパーバイザ

DAG 実行エンジンとリトライ・予算制御を実装。

Deliverables

  • Supervisor
  • Budget Tracker
  • ユニットテスト
Step 4

セキュリティ評価

MCP スコープ逸脱やプロンプトインジェクションを自己レッドチームで評価。

Deliverables

  • レッドチームシナリオ
  • 対策パッチ
  • 評価レポート
Roadmap

Delivery Timeline

  • Phase 0Done2026-04-23

    A2A / MCP 仕様把握

    両プロトコルを読み込み、相互運用の責務境界を定義。

  • Phase 1Done2026-04-25

    NATS 基盤構築

    JetStream ストリームとコンシューマグループを設計、ベンチ完了。

  • Phase 2Planned2026-05

    スーパーバイザ DAG エンジン

    タスク DAG をリトライ・予算付きで実行するエンジンを実装。

  • Phase 3Planned2026-06

    セキュリティ強化

    MCP スコープとサンドボックス実行を強化、レッドチームテストを実施。

Team

Who built it

2engineers

Roles

  • プラットフォームエンジニア
  • セキュリティエンジニア
Tech Stack

Tools & Platforms

Frontend

TypeScriptVitest

Backend

Go

Data

RedisSQLite

Infrastructure

OpenTelemetryDocker

Other

NATS JetStreamMCPA2A ProtocolgRPCProtobufTemporalZod
Build with KGA

Considering a similar project?

We will propose the best solution for your business needs.

Discuss Your Project