docs/Guides/Comparisons

Comparisons

How Subway compares to MCP, A2A, Hyperspace, NATS, and other agent protocols — honestly.

The agent communication space is evolving fast. New protocols appear regularly, each with different goals, architectures, and trade-offs. This page explains where Subway fits — honestly, including where alternatives are stronger.

The three layers#

Before comparing individual protocols, understand that agent infrastructure has three distinct layers:

LayerPurposeProtocols
Tool integrationConnect models to external tools and dataMCP
Task coordinationStructured collaboration between agent systemsA2A
NetworkingHow agents discover and talk to each otherSubway, NATS, Hyperspace

Most developers will use protocols from multiple layers. They are complementary, not competing. MCP connects your agent to a database. A2A manages a task between two agent systems. Subway is the network that makes agents reachable in the first place.


Quick comparison#

SubwayMCPA2AHyperspaceNATS
PurposeAgent networkingTool accessTask delegationP2P agent networkMessage bus
ArchitectureP2P with relayClient-serverClient-serverP2P with incentivesClient-server cluster
SetupOne commandConfig per toolHTTP endpointsCLI + accountDeploy cluster
Agent identity✅ Ed25519 + names✅ Agent Cards✅ Ed25519
E2E encryption✅ Noise protocol❌ (TLS only)Unspecified❌ (TLS only)
NAT traversal✅ Built-inLikely (libp2p)
Pub/sub✅ GossipSub
RPC✅ (tools)✅ (tasks)Unspecified
PersistenceN/A✅ (task history)CRDTs✅ JetStream
Tokens/crypto❌ None✅ Points + crypto
Shipped?✅ Live✅ Wide adoption✅ v1.0⚠️ Partial✅ Production

Subway vs MCP#

MCP is Anthropic's open standard for connecting AI apps to external tools and data. Think "USB-C for AI."

SubwayMCP
PurposeAgent-to-agent networkingModel-to-tool integration
Who talksAgent ↔ AgentAI app → Tool server
ArchitectureP2P overlay networkClient-server (host → server)
DiscoveryName resolution on meshLocal config or registry
TransportQUIC/WebTransport (P2P)stdio, HTTP+SSE
EncryptionEnd-to-end (Noise protocol)Depends on transport
Primitivessend, call, broadcast, subscribetools, resources, prompts
Agent identityEd25519 keypair + human nameNo concept of agent identity

These are different layers. MCP defines what tools are available. Subway defines how agents find and talk to each other.

Use together

An agent connects to local MCP servers for tools (database, search, code execution) and uses Subway to communicate with other agents on the mesh. MCP handles the tool interface; Subway handles the network.

Your AgentMCP ClientToolsDB · Search · Codeexecution · APIsSubway SDKOther AgentsP2P mesh · send · callbroadcast · subscribe

When to use what

  • MCP alone: Your AI app needs tools and data sources. No agent-to-agent communication.
  • Subway alone: Agents on different machines need to find each other and exchange messages.
  • Both: Agents that use local tools and collaborate with remote agents.

Subway vs A2A#

A2A is Google's open protocol for communication between opaque agent systems. It focuses on structured task management and cross-framework interop.

SubwayA2A
PurposeAgent networking (transport)Agent interop (task coordination)
ArchitectureP2P with relayClient-server (HTTP/JSON-RPC)
DiscoveryName resolution → PeerIdAgent Cards (capability ads)
TransportQUIC/WebTransport, Noise encryptionHTTPS, JSON-RPC 2.0, SSE
Primitivessend, call, broadcast, subscribetasks, messages, artifacts
Task modelNone (raw messaging)Rich lifecycle (submitted → working → done)
NAT traversalBuilt-inNo — agents need addressable endpoints
EncryptionEnd-to-endTLS (server can read traffic)

The key difference

A2A assumes HTTP reachability. Every agent needs an addressable endpoint — a URL that other agents can reach. That works inside a data center or on the public internet with known addresses.

Subway solves the harder problem: agents behind NATs, firewalls, laptops, mobile devices, and networks you don't control. No fixed addresses needed. Agents register a name, and the mesh handles routing.

Use together

Subway as the transport layer, with A2A-style Agent Cards for capability discovery:

Agent ARelayAgent Bresolve("analyst")PeerId foundEncrypted A2A task (via Subway P2P)task result

When to use what

  • A2A alone: Agents on addressable HTTP endpoints with structured task management across different frameworks.
  • Subway alone: Agents need to communicate across networks simply — just send, call, broadcast.
  • Both: A2A task semantics over Subway's encrypted P2P transport.

Subway vs Hyperspace#

Hyperspace describes itself as the "Gossiping Agents Protocol" — a P2P protocol for agent discovery, coordination, commerce, and collective intelligence. The parent company operates a decentralized GPU inference network with 2M+ nodes.

This comparison requires nuance because Hyperspace exists at two levels: the protocol specification (ambitious) and the shipped product (different from the spec).

SubwayHyperspace
Status✅ Live — relay, CLI, bridge API, docs, production use⚠️ Mixed — inference network is live; protocol SDK not publicly available
Installcurl -sSL subway.dev/install.sh | shcurl ... | bash (inference node)
Documentation30+ pages at subway.dev/docsProtocol landing page only (no API docs)
SDKRust crate + REST/WebSocket bridgeNot found on npm or crates.io
ArchitectureP2P with relay (libp2p-based)P2P with GossipSub (libp2p-based)
Crypto/tokensNonePoints system, EIP-712 receipts, blockchain settlement
Setup time~60 secondsRequires account creation + node setup
E2E encryption✅ Noise protocolNot publicly documented
Open sourceCore protocol openInference node partially open

What Hyperspace gets right

Ambitious vision. Their protocol spec describes 9 primitives covering context, coordination, commerce, and collective intelligence — a superset of MCP, A2A, and Stripe MPP. The "Discover → Run → Learn → Gossip" mental model is elegant and easy to understand.

Strong narrative. Their positioning against existing protocols is clear and compelling. The comparison tables on their landing page are well-crafted.

Network scale. Their inference network claims 2M+ nodes and 3.6M downloads — significant numbers regardless of active usage.

Where they differ

Two different products. Hyperspace's shipped product is a decentralized GPU inference network where users earn points for contributing compute. The protocol specification — with its 9 primitives, collective learning, and micropayments — is largely unreleased. The @hyperspace/sdk referenced in code examples is not publicly available.

Token economics. Hyperspace is fundamentally a crypto project with points, validators, staking, and blockchain settlement. This is a design choice with real trade-offs:

  • ✅ Creates economic incentives for network participation
  • ❌ Adds complexity for developers who just want agents to communicate
  • ❌ Points-based systems attract resource farmers, not necessarily builders
  • ❌ Many enterprise environments prohibit crypto-adjacent dependencies

Collective intelligence. Their unique differentiator — agents learning from each other via trajectory gossip — is demonstrated through a research experiment (agents training GPT-2 models and sharing results). It's an interesting concept but not yet a general-purpose capability for arbitrary agent workloads.

Different philosophies

Hyperspace is building a token-incentivized ecosystem where agents contribute compute and knowledge to a shared network. The protocol is designed to be everything: context, coordination, commerce, and intelligence.

Subway is building simple, reliable agent networking — and nothing else. No tokens, no collective learning, no payment channels. Just: agents find each other, exchange encrypted messages, and get work done.

# Subway: working in 60 seconds
curl -sSL https://subway.dev/install.sh | sh  # install
subway agent --name a.relay                     # connect agent A
subway agent --name b.relay                     # connect agent B
subway send a.relay "hello"                     # B receives "hello"

When to use what

  • Hyperspace when: you want to participate in a token-incentivized P2P compute network with collective learning — once the protocol SDK ships publicly.
  • Subway when: you want agents talking reliably in 5 minutes. No tokens, no account, no waiting. Works today.

Subway vs NATS#

NATS is a mature, high-performance message bus with pub/sub, request-reply, and streaming (JetStream). It's battle-tested infrastructure used by companies like Synadia, Mastercard, and Tesla.

SubwayNATS
ArchitectureP2P with relayClient-server cluster
SetupOne binary, zero configDeploy and manage NATS cluster
EncryptionEnd-to-end (relay can't read)TLS (server can read messages)
NAT traversalBuilt-in (QUIC + relay)Requires network configuration
ThroughputOptimized for agent messagingMillions of msgs/sec
PersistenceNo (real-time only)JetStream (at-least-once, exactly-once)
Agent identityBuilt-in (Ed25519 + names)No native concept
Ops burdenNear zeroModerate (cluster management)

NATS is objectively stronger at

  • Raw throughput — millions of messages per second vs Subway's agent-optimized path
  • Message persistence — JetStream provides durable, replayable streams
  • Maturity — battle-tested in production at massive scale
  • Ecosystem — clients in 40+ languages, extensive tooling

Subway is stronger at

  • Zero infrastructure — no cluster to deploy or manage
  • End-to-end encryption — the relay genuinely cannot read your messages
  • NAT traversal — agents behind firewalls, laptops, and mobile networks connect automatically
  • Agent-native identity — built-in Ed25519 keypairs and human-readable names

When to use what

  • NATS when: you're in a controlled environment (data center, cloud), need very high throughput, message persistence, or mature ops tooling.
  • Subway when: agents need to communicate across uncontrolled networks — different machines, different NATs, different clouds — with end-to-end encryption and zero infrastructure.

Subway vs Kafka / gRPC#

Apache Kafka

Kafka is a distributed event streaming platform. It's not really an agent communication tool — it's a durable event log.

SubwayKafka
PurposeReal-time agent messagingDurable event streaming
LatencyLow (direct P2P)Higher (disk-backed, batched)
PersistenceNoYes — replayable logs
Ops burdenNear zeroSignificant
Use caseAgents talkingData pipelines, ETL, event sourcing

Use Kafka when: you need durable event streams, exactly-once processing, or data pipelines. Use Subway when: agents need real-time communication.

gRPC

gRPC is a high-performance RPC framework. It's great for service-to-service calls between known endpoints.

SubwaygRPC
DiscoveryBuilt-in name resolutionRequires service discovery
NAT traversalAutomaticNot supported
SchemaSchema-free (JSON)Protocol Buffers (code-gen)
Use caseDynamic agent networksKnown service topologies

Use gRPC when: you have known services with strict API contracts. Use Subway when: agents discover each other dynamically across networks.


Subway vs Agent Frameworks#

LangGraph, CrewAI, AutoGen, Swarm — these are agent orchestration frameworks that define how agents think, plan, and execute.

SubwayOrchestration frameworks
LayerNetworkingOrchestration
ScopeHow agents communicateHow agents think and decide
DistributionAgents on different machinesTypically single-process
LanguageAny (Rust, TS, Python via bridge)Usually Python

These are complementary. The framework runs inside each agent. Subway connects agents to each other across machines. You can use CrewAI for local agent logic and Subway for inter-agent messaging over the network.


The bottom line#

Agent ACrewAI / AutoGenMCP: toolsAgent BLangGraph / CustomMCP: toolsSubwayP2P encrypted msgs · Name resolutionNAT traversal · Zero infrastructure

Subway is the networking layer. The part that makes agents reachable, messages encrypted, and infrastructure unnecessary.

If you're building systems where agents need to discover and communicate with each other across networks — that's what Subway was built for.

curl -sSL https://subway.dev/install.sh | sh