Proposal: official Swift SDK — survey of existing implementations and a path to one #1931
Replies: 3 comments
|
Human reviewed and approved. |
|
Follow-up with data: I spent today running a cross-SDK interop matrix rather than arguing features, since proven conformance seems like the axis that matters for an official SDK. Everything below ran against live servers over real HTTP/SSE today (2026-06-10), exercising agent-card resolution,
The divergence, offered in the spirit of "this is exactly what consolidation fixes," not as a knock — @tolgaki, please correct me if I've misread something: the server's JSON-RPC Two updates on my own position after this exercise:
The donation offer from the original post stands regardless of which codebase becomes the base. The matrix above is the case for converging: every divergence between Swift implementations is currently invisible until someone wires two of them together. |
|
Promised follow-up: the interop testing from my earlier comment is now a standing, vendor-neutral tool — arkavo-ai/a2a-conformance (Apache 2.0, donation offer applies to it as much as to the SDK). It's a pairwise matrix: N client harnesses × M server harnesses, 29 declarative scenarios (every §5.4 error code, streaming, discovery, proto3-canonical edge cases), scripted servers for determinism, and a wire capture attached to every failure so disagreements are arguable from bytes, not vibes. It complements First full run: 3×3 (a2a-rs × arkavo-swift × tolgaki-swift)261 results: 196 pass / 41 fail / 24 honest skips / 0 harness errors — deterministic across reruns. The failures reduce to nine root causes, spread across all three SDKs including mine (FINDINGS.md has evidence and exact code locations; results.ndjson is the machine-readable record):
(Build-level, from CI rather than the matrix: the server stack doesn't compile on Linux — its
One genuine spec gapFindings 3 and 9 share a root cause that isn't any SDK's fault: §9.4.2 doesn't specify how a pre-stream protocol error is delivered to a streaming request. a2a-rs answers with a plain Standing offers
|
Uh oh!
There was an error while loading. Please reload this page.
A2A has official SDKs for Python, Go, JS, Java, .NET, and Rust — but no Swift SDK, despite Swift being the path to every iOS/macOS/visionOS client and a growing server-side presence. Meanwhile the community has produced at least four independent Swift implementations. This is a proposal to consolidate that energy into one official SDK before fragmentation sets in, rather than a pitch for any one repo.
Survey of existing implementations
I went through the public Swift A2A codebases this week. Facts below are from reading the sources; corrections welcome — especially from the maintainers, whom I'd love to have in this thread: @tolgaki, @BBC6BAE9, @JamieScanlon.
a2a-client-swiftmessage/sendmethods)specification/a2a.protoJSONValue(noAny); CI on macOS + Linux (swift:6.3); golden vectors from the spec; cross-SDK interop verified against the Pythona2a-sdk1.1.0 sample server (SendMessage, GetTask, SSE streaming, error-code mapping)There are also several smaller client experiments (
no-problem-dev/swift-a2a,spprichard/swift-a2a-sdk,Victory-Apps/a2a-swift,tolgaki/a2a-swift-client), which mostly underlines the point: the demand is real and the effort is scattering.The cost of fragmentation is concrete, not aesthetic
Two of these packages — tolgaki's and mine — are both named
a2a-swift. SwiftPM resolves package identity from the name, so any dependency graph that transitively pulls both fails to resolve. Today that's unlikely; the moment two mid-size agent frameworks pick different Swift A2A SDKs, it's guaranteed. A small ecosystem can't afford N incompatible wire-type packages, and every month of parallel development makes converging harder.What I think an official SDK needs (and where each effort helps)
Datain →Dataout / SSE-framed stream out) with Vapor/Hummingbird adapters as examples or thin satellite packages, rather than a runtime bound to one framework.URLSession.bytesis unreliable there; delegate-based streaming works on both).AgentInterface.protocolVersion, which a strict decoder rejects).Proposal
a2aprojectSwift SDK, merging the best pieces of the others (and crediting all contributors).arkavo-ai/a2a-swiftto the a2aproject org outright if it's chosen as the base — same arrangement as the other official SDKs. No strings; I'd stay on as a maintainer. If the community converges on a different base, I'll contribute and help maintain there instead and retire my package name to end the SPM collision.For the maintainers tagged above: would you be open to converging? And for the a2aproject steering folks: is there an established process for community SDKs entering the org (the Go and Rust SDKs presumably went through this), and what would you need to see?
All reactions