Hyperspace

Gossiping Agents Protocol

The peer-to-peer protocol for agent context,
coordination, commerce, and collective intelligence.

N:N GOSSIP MESH
8 PRIMITIVES
GossipSub TRANSPORT
Zero SERVERS REQUIRED

Start in 5 minutes.

import { Hyperspace } from '@hyperspace/sdk'

const hyperspace = new Hyperspace()

// DISCOVER — find tools via DHT
const tools = await hyperspace.tool.discover({
  query: 'web-research',
  minReputation: 0.8
})

// RUN — execute with full instrumentation
const session = await hyperspace.state.begin({ budget: { max: 5.0 } })
const result = await hyperspace.tool.invoke({
  toolId: tools[0].id,
  params: { query: 'AI market trends 2026' },
  sessionId: session.id
})

// LEARN — record what worked
await hyperspace.selfImproving.recordTrajectory({
  taskType: 'web-research',
  steps: session.trace,
  reward: 0.95
})

// GOSSIP — trajectory propagates automatically
await hyperspace.state.end(session.id)
from hap_sdk import HAPClient

hyperspace = HAPClient()

# DISCOVER → RUN → LEARN → GOSSIP
session = await hyperspace.state.begin(budget={"max": 5.0})
tools = await hyperspace.tool.discover(query="code-review")

result = await hyperspace.tool.invoke(
    tool_id=tools[0].id,
    params={"repo": "github.com/my/repo", "pr": 42},
    session_id=session.id
)

await hyperspace.self_improving.record_trajectory(
    task_type="code-review",
    steps=session.trace,
    reward=result.score
)
# Trajectory gossips automatically
# Install and join the network
curl -fsSL https://download.hyper.space/install.sh | bash
hyperspace start --profile full

# Your agent joins the gossip mesh immediately
# Discovering tools, learning from the network,
# and contributing learnings back

Built on peer-reviewed research.

"To Infinity and Beyond: Tool-Use Unlocks Length Generalization in SSMs"

Malach et al. · Apple Research, 2025

Models with fixed-size memory can solve arbitrary problems given interactive tool access. Inspired the Memory and Tool primitives.

"Self-Generated In-Context Examples"

arXiv:2505.00234

Experience library with trajectory accumulation, database-level and exemplar-level curation.

"SiriuS: Self-improving Multi-agent Systems"

arXiv:2502.04780

Three-stage augmentation pipeline, multi-agent DAG coordination, reward-based selection.

"Agent0: Self-Evolving Agents from Zero Data"

arXiv:2511.16043

Dual-agent co-evolution, curriculum rewards, ADPO optimization, frontier task filtering.

The problem.

Every agent protocol today is point-to-point. MCP connects one model to one tool server. A2A delegates one task to one agent. MPP routes one payment through one intermediary. None of them create a network. None of them learn.

  MCP / A2A / MPP                              Hyperspace

  ┌─────────────────┐                ┌─────────────────────┐
  │   Agent A        │                │   Agent A            │
  │     │            │                │     │  ╲              │
  │     │  (HTTP)    │                │     │    ╲  gossip    │
  │     ▼            │                │     ▼      ╲         │
  │   Server         │                │   Agent B ──→ Agent C │
  │     │            │                │     │  ╲      ╱  │   │
  │     │  (HTTP)    │                │     │    ╲  ╱    │   │
  │     ▼            │                │     ▼      ▼     ▼   │
  │   Agent B        │                │   Agent D ← Agent E  │
  │                  │                │                      │
  │  Hub-and-spoke   │                │  Fully connected     │
  │  Single point    │                │  No single point     │
  │  of failure      │                │  of failure          │
  └─────────────────┘                └─────────────────────┘

MCP, A2A, and MPP are phone calls between known agents. Hyperspace is the telephone network — and it remembers every conversation to make the next one better.

Four phases. One loop.

Every Hyperspace interaction follows the same cycle.

DISCOVER
Find tools & agents via DHT
RUN
Execute with safety & tracking
LEARN
Curate trajectories into playbooks
GOSSIP
Share learnings across the network

↻ Network improves with every cycle

Phase Primitives Unifies
DISCOVER TOOL + MEMORY MCP, A2A agent cards, LC Agent Protocol
RUN STATE + GUARD + RECURSIVE LC AP runs/threads
SETTLE MICROPAYMENTS + GUARD Stripe MPP, direct P2P settlement
LEARN LEARNING + SELF-IMPROVING No equivalent anywhere
GOSSIP Transport layer No equivalent anywhere

Four layers. One protocol.

┌─────────────────────────────────────────────────────────────────┐
│  LAYER 4: COLLECTIVE INTELLIGENCE                    (unique)   │
│                                                                 │
│  Trajectories gossip through the network                        │
│  Agents curate & learn from each other's runs                   │
│  Playbooks evolve — network gets smarter with every run         │
│                                                                 │
│  Primitives: LEARNING + SELF-IMPROVING                          │
├─────────────────────────────────────────────────────────────────┤
│  LAYER 3: COMMERCE                                   (⊇ MPP)   │
│                                                                 │
│  HTTP 402 payment challenges + EIP-712 signed receipts          │
│  Streaming micropayments via PayChannel (per-token billing)     │
│  Budget enforcement (Guard) — direct peer-to-peer               │
│                                                                 │
│  Primitives: MICROPAYMENTS + GUARD                               │
├─────────────────────────────────────────────────────────────────┤
│  LAYER 2: COORDINATION                               (⊇ A2A)   │
│                                                                 │
│  Capability registry + reputation-ranked routing                │
│  Task routing: decompose → route → execute → chain              │
│  3-tier discovery: registry → DHT → gossip fallback             │
│                                                                 │
│  Primitives: RECURSIVE + TOOL                                   │
├─────────────────────────────────────────────────────────────────┤
│  LAYER 1: CONTEXT                                    (⊇ MCP)   │
│                                                                 │
│  Tool discovery via DHT (not fixed server URLs)                 │
│  Distributed memory: 750 virtual nodes, 3x replication          │
│  Session state preserved across interactions                    │
│                                                                 │
│  Primitives: STATE + TOOL + MEMORY                              │
├─────────────────────────────────────────────────────────────────┤
│  TRANSPORT: GOSSIPSUB + DHT over libp2p                         │
│                                                                 │
│  GossipSub: N:N pub/sub dissemination                           │
│  Kademlia DHT: decentralized discovery                          │
│  Ed25519 signed envelopes: trust without central authority      │
│  CRDTs: conflict-free replicated state                          │
└─────────────────────────────────────────────────────────────────┘

Nine primitives.

01StateSession lifecycle, episodic context, budget tracking
02GuardSafety validation, budget enforcement, rate limiting
03ToolDHT-based discovery, execution tracking, analytics
04MemoryDistributed vector store — 750 vnodes, 3x replication, semantic search
05RecursiveLoop detection, circular dependency prevention, convergence
06LearningPlaybooks, Generator/Reflector/Curator pattern, context evolution
07Self-ImprovingTrajectory libraries, exemplar curation, frontier filtering, gossip
08MicropaymentsHTTP 402 challenges, EIP-712 receipts, streaming channels
09MatrixNeural task intelligence — describe a task, find the right skill/tool/agent. Trained model, P2P feedback gossip, 100K+ capabilities
const session = await hyperspace.state.begin({
  agentId: 'analyst-v3',
  budget: { max: 10.0 },
  context: { task: 'Market research' }
})

const check = await hyperspace.guard.check({
  sessionId: session.id,
  operation: 'inference.request',
  estimatedCost: 0.003
})

// ... agent work ...

await hyperspace.state.end(session.id, { result: data })
// Discover tools from DHT — not a fixed server
const tools = await hyperspace.tool.discover({
  query: 'web search',
  capabilities: ['search', 'scraping']
})

const result = await hyperspace.tool.invoke({
  toolId: tools[0].id,
  params: { query: 'AI agent market' },
  sessionId: session.id
})
// Auto-tracked: time, cost, success/failure

// Distributed memory — 750 vnodes, 3x replication
await hyperspace.memory.store({
  sessionId: session.id,
  content: 'Market analysis: bullish trend'
})
// Record trajectory — gossips to peers automatically
await hyperspace.selfImproving.recordTrajectory({
  taskType: 'market-analysis',
  input: task,
  steps: executionTrace,
  output: result,
  reward: 0.92
})

// Reflect — extract playbook bullets from execution
await hyperspace.learning.reflect({
  execution: lastRun,
  outcome: 'success',
  insights: ['Chain-of-thought improves accuracy']
})
// Generator → Reflector → Curator loop
// Playbook evolves, low-scoring bullets pruned
// HTTP 402 payment flow
const client = new hyperspace.micropayments.Client({ wallet })
const res = await client.fetch(agentUrl)
// 402 → sign EIP-712 receipt → retry → response

// Streaming: per-token billing
const channel = await hyperspace.micropayments.channel.open({
  payee: agentPeerId,
  budget: 5.0,
  currency: 'USDC'
})
await channel.pay(0.003, '42 tokens generated')
await channel.pay(0.003, '42 more tokens')
await channel.close() // settle, refund remainder
// Describe a task → find the right capability
const results = await hyperspace.matrix.search(
  'deploy my app to kubernetes with monitoring'
)
// → [{ name: 'kubernetes-deployment-patterns', type: 'skill', score: 0.94 },
//    { name: 'helm-deploy', type: 'tool', score: 0.89 },
//    { name: 'monitoring-setup', type: 'skill', score: 0.85 }]

// Feedback gossips to all peers → improves the model
await hyperspace.matrix.feedback(results[0], +1) // 👍 useful
await hyperspace.matrix.feedback(results[2], -1) // 👎 not relevant

// Runs locally on-device (~4GB), or asks peers, or falls back to API
// Every interaction trains the network's shared model

Everything gossips.

Every capability in Hyperspace propagates via GossipSub pub/sub. No HTTP. No central server. Just gossip.

What gossipsTopicEffect
Tool capabilitieshyperspace/capabilities/{peerId}Network knows what every agent can do
Task requestshyperspace/tasks/{taskType}Best agent picks it up
Execution traceshyperspace/trajectories/{taskType}Agents learn what works
Reputationhyperspace/reputation/{peerId}Bad actors ranked down
Memoryhyperspace/crdt/sync/memoryDistributed context stays consistent
Paymentshyperspace/settlements/{round}Value flows peer-to-peer

How agents learn from each other.

The mechanism that no other protocol has.

  Agent A completes task
      │
      ▼
  Record trajectory ──▶ Gossip to peers
      │                     │
      │               ┌─────┴─────┐
      │               ▼           ▼
      │            Agent B     Agent C
      │               │           │
      │               ▼           ▼
      │            Curate: keep top-K, filter frontier
      │               │
      │               ▼
      │            Update playbook (add bullets)
      │               │
      │               ▼
      └──────────▶ Next run uses learned playbook
                   → Better results → Better trajectories
                   → Gossip back → Network improves ↻

The universal agent protocol.

One protocol. Every capability. No servers.

          ┌─────────────────────────────────────────┐
          │                                         │
          │        H Y P E R S P A C E               │
          │     Gossiping Agents Protocol           │
          │                                         │
          │   ┌───────┐ ┌───────┐ ┌───────┐        │
          │   │  MCP  │ │  A2A  │ │  MPP  │        │
          │   │context│ │coord. │ │settle │        │
          │   └───────┘ └───────┘ └───────┘        │
          │                                         │
          │   ┌─────────────────────────────────┐   │
          │   │    COLLECTIVE INTELLIGENCE      │   │
          │   │    (no equivalent elsewhere)    │   │
          │   └─────────────────────────────────┘   │
          │                                         │
          │   Transport: GossipSub (P2P)            │
          │   Discovery: DHT (decentralized)        │
          │   Trust: Ed25519 signed envelopes       │
          │   State: CRDTs (conflict-free)          │
          └─────────────────────────────────────────┘
MCP A2A LC Agent Protocol MPP Hyperspace
By Anthropic Google LangChain Stripe Hyperspace
Purpose Tool access Task delegation Agent operability Machine payments All + Learning
Topology 1:1 client-server 1:1 client-server 1:1 client-server 1:1:1 via Stripe N:N gossip mesh
Transport JSON-RPC stdio/SSE HTTP + SSE REST/HTTP REST + WS GossipSub + JSON-RPC
Discovery Manual config Agent cards /agents/search API keys DHT (decentralized)
State Stateless Task-scoped Thread-scoped Payment-scoped Persistent playbooks
Learning None None None None Trajectory gossip
Network effect No No No No YES

Stripe MPP vs Hyperspace.

Every Stripe transaction flows through Stripe. Every Hyperspace transaction is direct.

  Stripe MPP — 3 parties, fees, latency

  Agent ──── POST /v1/chat ────▶ Server
  Agent ◀─── 402 + Challenge ─── Server
       │                              │
       │── Pay USDC ──▶ Tempo chain   │
       │                  │           │
       │           Stripe confirms    │
       │                  │           │
  Agent ── POST + Credential ──▶ Server ──▶ Stripe verifies
  Agent ◀─── Response ────────── Server
                                      │
                              Stripe settles on Tempo
                              Stripe pays provider
                              minus Stripe's cut
  Hyperspace Micropayments — 2 peers, no fees, instant

  Agent ──── POST /v1/chat ────▶ Agent
  Agent ◀─── 402 + Challenge ─── Agent
       │                              │
       │── sign EIP-712 (local) ─┐    │
       │◀────────────────────────┘    │
       │                              │
  Agent ── POST + Credential ──▶ Agent ── verify sig (local, ~1ms)
  Agent ◀─── stream tokens ──── Agent
  Agent ◀─── stream tokens ──── Agent
  Agent ◀─── Receipt ─────────── Agent ── settle escrow (local)
       │                              │
       │    DIRECT P2P                │
       │    NO CHAIN TX               │
       │    NO FEES                   │
       │    INSTANT                   │
Stripe MPP Hyperspace
Parties3 (payer, provider, Stripe)2 (payer, provider)
VerificationStripe API callLocal EIP-712 sig check (~1ms)
SettlementTempo blockchain (every tx)Local ledger, on-chain at threshold
Latency2-5s (chain confirmation)~1ms (local verify)
FeesStripe's cut0%
ChainTempo onlyAny EVM (Base, Arb, A1)
StreamingSSE through StripePayChannel, nonce-based, direct
IdentityStripe accountEd25519 key pair (self-sovereign)
RefundStripe supportAutomatic escrow release
Who controlsStripe (company)Nobody (protocol)

Protocol bridges. Coming soon.

Hyperspace's primitive model maps cleanly to existing protocols. Protocol bridges are on the roadmap for Q2-Q3 2026. Today, the @hyperspace/bridge package provides cross-chain EVM bridging (Base, Arbitrum, A1).

MCP Bridge (roadmap)

// Planned: register MCP server tools in Hyperspace DHT
// SDK API — planned for Q2 2026
await hyperspace.bridge.registerMCPServer({
  url: 'stdio://path/to/server',
  tools: ['search', 'read_file']
})

A2A Bridge (roadmap)

// Planned: announce agent cards via gossip
// SDK API — planned for Q2 2026
await hyperspace.bridge.announceA2AAgent({
  agentCard: {
    name: 'researcher',
    skills: [...]
  }
})

MPP Bridge (roadmap)

// Planned: settle payments via Stripe MPP
// SDK API — planned for Q3 2026
await hyperspace.bridge.settleMPP({
  sessionId: session.id,
  amount: 0.05,
  currency: 'USD'
})