swift-acp-a2a-bridge
swift-a2a エージェントを ACP エージェントとして公開するブリッジ。ACP 契約と A2A メッセージ交換を相互変換する
English | 日本語
swift-acp-a2a-bridge
Exposes a swift-a2a agent as an ACP agent — the connection layer that lets an ACP host drive a multi-agent A2A graph behind a single vertical boundary.
This is the control/progress plane of the three orthogonal planes:
| Plane | Protocol | Role |
|---|---|---|
| Control / progress | ACP | host observes & steers one agent (this bridge) |
| Delegation | A2A | the agent fans out to sub-agents |
| Display | A2UI | rendering the result |
How it works
A2AAgentBridge conforms to ACPAgent. On prompt:
- The ACP prompt's
ContentBlocks become an A2AMessage(Parts). - It drives a swift-a2a
RequestHandlervia streaming send. - Each
StreamResponse(artifact / message / status) maps back onto an ACPsession/updatereported through the client — the host's progress channel. - The A2A task's terminal
TaskStatebecomes the prompt'sStopReason.
Quick Start
let connection = InProcessConnection { client in
A2AAgentBridge(client: client, handler: myA2ARequestHandler)
}
Task { for await update in connection.updates { render(update) } }
_ = try await connection.agent.prompt(promptRequest)
The ACPA2ABridgeTests suite proves the full three-layer flow end-to-end
(ACP host → bridge → A2A agent → streamed artifact → ACP session update),
in-process with no serialization.
Installation
Add the package to your Package.swift:
.package(url: "https://github.com/no-problem-dev/swift-acp-a2a-bridge.git", from: "0.1.0"),
Then add ACPA2ABridge to your target's dependencies:
.target(
name: "YourTarget",
dependencies: [
.product(name: "ACPA2ABridge", package: "swift-acp-a2a-bridge"),
]
)
Dependencies
Neither foundation depends on this bridge.
License
MIT
同じカテゴリの OSS — エージェント / プロトコル
swift-a2a
Swift PackageGoogle A2A(Agent-to-Agent)プロトコルの Swift クライアント実装。エージェント同士を相互運用させる
swift-a2ui
Swift PackageGoogle A2UI プロトコルの Swift 実装。LLM エージェントがクライアントに型安全なリッチ UI を描画する
swift-acp
Swift PackageAgent Client Protocol(ACP)の Swift 実装。ホスト↔エージェント間の JSON-RPC 契約を 135 の $defs として厳密に型付け
swift-acp-presentation
Swift PackageACP のホスト側プレゼンテーション層。session/update を UI 非依存の状態に畳み込み、文言を String Catalog に集約する
swift-agent-skills
Swift PackageSKILL.md オープン標準(Apache-2.0)の Swift 実装。スキルの読み込み・探索・実行・ツール統合を担う
swift-agent-runtime
Swift PackageA2A 前提のオーケストレータ+ワーカー実行環境。専門ワーカーへの委譲・並列実行・ACP ゲートウェイをパッケージルートとして提供する Swift ランタイム