Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

Hyperspace

GitHub stars License Downloads Latest Release

The world's largest decentralized P2P AI inference network -- 2,000,000+ agents and counting.

Hyperspace is a fully decentralized peer-to-peer network for AI inference, built on libp2p (the same protocol stack that powers IPFS). There are no central servers. Every agent connects directly to other agents, discovers peers via DHT, and communicates through GossipSub. You contribute compute, storage, or bandwidth -- and earn points for it.


Downloads

Download Statistics


Quick Start

Install and start an agent in two commands:

curl -fsSL https://download.hyper.space/api/install | bash
hyperspace start

Table of Contents


Installation

There are four ways to run a Hyperspace agent. Choose the one that fits your setup.

1. One-Line Install (Recommended)

curl -fsSL https://download.hyper.space/api/install | bash

This auto-detects your platform and environment:

  • Desktop machines (macOS, Linux with GUI, Windows): Installs both the CLI and the Tray App.
  • Headless servers (no display): Installs the CLI only.
  • Use --no-tray to skip tray app installation on desktop machines.

The installer also sets up llama-server for native GPU inference and integrates with any existing Ollama installation.

2. Tray App (Desktop Users)

The tray app is a lightweight system tray controller that manages the CLI agent as a background process. It survives reboots, shows real-time stats, and auto-updates.

The install script above handles tray app installation automatically:

  • .dmg on macOS
  • .deb on Linux
  • .exe / .msi on Windows

You can also download the tray app manually from the latest release.

3. CLI Only (Headless Servers)

curl -fsSL https://download.hyper.space/api/install | bash -s -- --no-tray

The CLI runs as a background daemon. Recommended for cloud VMs, dedicated GPU servers, and headless machines.

4. Browser

Visit https://p2p.hyper.space -- no installation required. Runs entirely in your browser using WebGPU and WebLLM.


Client Comparison

FeatureBrowserCLI AgentTray App
GPU AccessWebGPU (limited)Full native GPUFull native GPU (via CLI sidecar)
ModelsWebLLM onlyGGUF up to 32B paramsGGUF up to 32B params
UptimeTab must stay openBackground daemonSystem tray -- survives reboot
Inference Speed~10-20 tok/s~40-80 tok/s (CUDA)~40-80 tok/s (CUDA)
Ollama SupportNoYesYes
SetupZero-installOne commandOne command (auto-installed)
Auto-UpdateAlways latestOn startBuilt-in updater

CLI Command Reference

The binary is called hyperspace (aliased as aios-cli for backward compatibility).

Core Commands

CommandDescription
hyperspace startStart the agent daemon
hyperspace statusShow agent status, peers, tier, points, uptime
hyperspace killStop the running agent (-f to force)
hyperspace chatInteractive conversational agent mode
hyperspace system-infoDisplay system specs, GPU, VRAM, recommended tier
hyperspace versionShow version (--check-update to check for new)
hyperspace updateCheck for and install updates (--check for dry run)
hyperspace hive listenStream live agent events (polls every 5s)

Start Options

hyperspace start                          # Auto-detect everything
hyperspace start --profile full           # All 9 capabilities
hyperspace start --profile inference      # GPU inference only
hyperspace start --profile embedding      # CPU-only embedding agent
hyperspace start --profile relay          # Lightweight relay agent
hyperspace start --profile storage        # Storage + memory
hyperspace start --api-port 8080          # Management API port
hyperspace start --cuda                   # Force CUDA acceleration
hyperspace start --verbose                # Verbose logging
hyperspace start --no-api                 # Disable management API

Model Management

CommandDescription
hyperspace models listShow all models in the catalog
hyperspace models availableList models compatible with your VRAM
hyperspace models pull --autoAuto-download best models for your GPU
hyperspace models pull <model-id>Download a specific GGUF model
hyperspace models downloadedList locally downloaded models
hyperspace models delete <model-id>Delete a downloaded model
hyperspace models add <model-id>Register a model on the network
hyperspace models remove <model-id>Unregister a model
hyperspace models checkCheck loaded models and network status

Inference

hyperspace infer --prompt "Explain quantum computing" --p2p   # P2P network inference
hyperspace infer --prompt "Hello" --local                      # Local inference
hyperspace infer --model <model-id> --prompt "Hello"           # Specific model
hyperspace infer --interactive                                 # Interactive chat
hyperspace chat                                                # Agent chat mode

Wallet and Staking

CommandDescription
hyperspace wallet showDisplay address, balance, points, USDC equivalent
hyperspace wallet exportExport address (machine-readable, for scripting)
hyperspace wallet costsShow task cost estimates per capability
hyperspace wallet settleTrigger manual USDC settlement check
hyperspace wallet stakingShow staking status, delegations, rewards
hyperspace wallet stake <amount>Stake points
hyperspace wallet unstake <amount>Begin unstaking
hyperspace wallet claim-rewardsClaim accumulated staking rewards
hyperspace wallet delegate <amount> <peer-id>Delegate to a validator
hyperspace wallet revoke <delegation-id>Revoke a delegation

Identity

CommandDescription
hyperspace identity exportExport private key, public key, peer ID
hyperspace identity export --jsonExport as JSON
hyperspace identity export -o key.jsonExport to file
hyperspace hive whoamiDisplay agent identity and connection status
hyperspace hive login -k <base58>Import identity from Ed25519 private key
hyperspace hive import-keys <path>Import identity from key file

Configuration

CommandDescription
hyperspace hive select-tier --autoAuto-detect tier from GPU
hyperspace hive select-tier --tier <n>Manually set compute tier
hyperspace hive allocate --mode powerMaximum earnings, higher resource usage
hyperspace hive allocate --mode chillLower resource usage, reduced earnings

Proxy

CommandDescription
hyperspace proxy statusShow proxy service status and bandwidth
hyperspace proxy test [url]Test-fetch a URL through a proxy peer
hyperspace proxy infoShow proxy capability details

System

CommandDescription
hyperspace install-serviceRegister as OS service (auto-start on boot)
hyperspace uninstall-serviceRemove OS service registration
hyperspace migrateMigrate from v1 (--dry-run to preview)
hyperspace loginLog in via browser OAuth (for Thor analysis)
hyperspace logoutLog out

Network Capabilities

Every agent can contribute one or more capabilities to the network. The profile system auto-detects what your hardware supports.

CapabilityWhat It DoesRequires
InferenceRun LLM inference -- answer prompts, generate textGPU (4+ GB VRAM)
EmbeddingGenerate vector embeddings for semantic searchCPU only
StorageStore and serve content blocks via DHTDisk space
MemoryDistributed vector database with replicationCPU + storage
RelayNAT traversal -- help browser agents connectPublic IP
ValidationVerify pulse proofs from other agentsCPU
OrchestrationDecompose complex tasks into sub-tasks and route themGPU
CachingCache inference results for repeated queriesMemory
ProxyResidential IP proxy for AI agentsBandwidth

GPU Recommendations

GPUVRAMBest ModelTask Type
GTX 16504 GBGemma 3 1B (Q4_K_M)General
RTX 3060 / RTX 40608 GBGemma 3 4BGeneral
RTX 407012 GBGLM-4 9BMultilingual
RTX 408016 GBGPT-oss 20BReasoning
RTX 4090 / RTX 309024 GBGemma 3 27BGeneral
A100 / H10040-80 GBQwen2.5 Coder 32BCode

CPU-only agents can still earn by providing embeddings, relay, storage, and validation capabilities. Use --profile embedding for CPU-only operation.


Architecture

+-------------------------------------------------------------+
|                      APPLICATIONS                           |
|  Web Dashboard  .  CLI Agent  .  Tray App  .  Extension     |
+-------------------------------------------------------------+
|                      SERVICES                               |
|  InferenceRouter . PulseCoordinator . ProxyEngine           |
|  TaskRouter . EmbeddingRouter . ModelDownloader              |
+-------------------------------------------------------------+
|                      NETWORK                                |
|  libp2p . GossipSub . DHT . Circuit Relay . Yamux           |
|  CapabilityRegistry . AgentDirectory . PeerCache            |
+-------------------------------------------------------------+
|                      STORAGE                                |
|  IndexedDB (browser) . SQLite (CLI) . Supabase (sync)       |
+-------------------------------------------------------------+
|                      COMPUTE                                |
|  WebLLM (browser) . node-llama-cpp (native) . Ollama        |
|  WASM Pulse (proof-of-work) . ONNX (embeddings)            |
+-------------------------------------------------------------+

Network layer: Built on libp2p v3 with GossipSub for pub/sub messaging, Kademlia DHT for peer discovery and content routing, Circuit Relay v2 for NAT traversal (browser agents), and Yamux for stream multiplexing. All connections are encrypted with Noise.

Inference layer: Three-tier model routing -- first checks local capability registry, then queries DHT, then falls back to gossip broadcast. Supports GGUF models via node-llama-cpp (native) and WebLLM (browser). Ollama integration available for CLI and tray app.

Storage layer: Content-addressed block storage via DHT. Distributed vector store with configurable replication factor for memory capability.


Points System

Hyperspace uses a two-stream points model that rewards both presence and useful work.

Presence Points (Passive)

Earned every pulse round (~90 seconds) just for being online and responsive:

  • Base reward -- earned each round you participate in.
  • Uptime bonus -- grows logarithmically with continuous uptime over ~30 days.
  • Liveness multiplier -- ramps up over 1-2 weeks of consistent participation.
  • Capability bonus -- up to +49% for running more capabilities.

Work Points (Active)

Earned by serving real requests -- inference queries, proxy traffic, storage operations. Each completed job generates a signed receipt.

Allocation Modes

ModeEffect
powerMaximum earnings, higher resource usage (1.5x multiplier)
chillLower resource usage, reduced earnings (1.0x multiplier)

Set with hyperspace hive allocate --mode power or --mode chill. Check current points with hyperspace status.


Pulse Verification

Pulse is the heartbeat protocol that proves agents are real and have the resources they claim.

  1. Commit -- every ~90 seconds, a deterministic leader is elected. All participants compute a matrix from the round seed, build a Merkle tree, and commit the root hash.
  2. Challenge -- the leader selects random indices. Agents respond with Merkle proofs.
  3. Verify -- proofs are verified against the committed root. Valid proofs earn points; invalid or missing proofs earn strikes.

Supported Platforms

PlatformArchitectureCLITray App
macOSApple Silicon (arm64)YesYes (.dmg)
macOSIntel (x86_64)YesYes (.dmg)
Linuxx86_64YesYes (.deb)
Windowsx86_64YesYes (.exe / .msi)

Browser client works on any platform with WebGPU support (Chrome 113+, Edge 113+).


Migrating from v1

The original Hyperspace Desktop (v0.x releases in this repo) was a centralized Tauri v1 application. In v2, the network was rebuilt from scratch as a fully decentralized P2P system.

v1 Commandv2 Equivalent
aios-cli hive connecthyperspace start
aios-cli hive select-tier 5Automatic (hardware detection)
aios-cli hive pointshyperspace status
aios-cli models add <hf:...>hyperspace models pull --auto
  • v1 points are frozen and preserved.
  • Migration is automatic: hyperspace migrate or just hyperspace start.
  • The aios-cli command name continues to work as an alias.

Troubleshooting

Agent not connecting to peers

Check firewall allows outbound WebSocket connections on port 4002:

hyperspace status

Models not downloading

hyperspace models pull --auto
hyperspace models downloaded
hyperspace models delete <name>

Low inference speed

  • Update GPU drivers (CUDA 12+ for NVIDIA).
  • Check model size vs VRAM: hyperspace system-info
  • Close other GPU-intensive applications.

Tray app not starting

  • Linux: Requires system tray support (GNOME with AppIndicator, KDE, XFCE).
  • macOS: Check System Settings > Login Items.

Contributing

Contributions are welcome. For bug reports and feature requests, please open an issue.


Links


License

MIT License. See LICENSE for details.


Maintained by Varun and the Hyperspace team.

关于 About

The world's largest decentralized P2P AI inference network — 2M+ nodes, 3.6M+ downloads. CLI, Tray App, and Browser clients.

语言 Languages

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
3
Total Commits
峰值: 3次/周
Less
More