Skip to main content

Protocol for Recursive Scientific Modeling - A P2P infrastructure protocol for open-source collaboration

Project description

PRSM: P2P Infrastructure Protocol for Open-Source Collaboration

The code goes to the data. Not the other way around.

PRSM is a P2P infrastructure protocol that aggregates latent storage, compute, and data from consumer nodes — gaming PCs, consoles, laptops, phones — into a mesh network accessible to third-party LLMs via MCP tools. Contributors earn FTNS tokens for sharing their latent resources; users leverage PRSM infrastructure through their preferred LLMs (local or via OAuth/API). PRSM is not an AGI framework. Reasoning happens in third-party LLMs; PRSM provides the infrastructure those LLMs use to access distributed resources and data.

Version 1.7.0 | PyPI | Getting Started | Architecture Spec

PyPI version License: MIT MCP Tools


Why PRSM Exists

The problem: Frontier AI labs hoard data, compute, and models behind API walls. Every query you send to a centralized API is logged, stored, and potentially trained on. Meanwhile, billions of consumer devices sit idle — gaming PCs, laptops, phones, tablets — each with storage, compute, and sometimes proprietary data that never leave the device.

The PRSM thesis: Build an open-source commons for AI infrastructure. Aggregate the latent resources of consumer electronics into a P2P mesh. Let any LLM — local, OAuth, or API — use that mesh via MCP tools. Pay contributors in FTNS tokens so sharing beats hoarding.

Centralized AI (today) PRSM
You upload data to their cloud WASM agents travel to the data
They see your query Zero-persistence sandbox — nothing logged
One datacenter processes everything Thousands of edge nodes work in parallel
You pay per token Hybrid pricing — commodity compute + market-rate data
Vendor lock-in Works with any LLM via MCP

The result: A network where the model is open but the computation is private, and where contributing your idle storage/compute/data earns you a share of every query it serves.


Quick Start

# Install
pip install prsm-network

# Check your hardware
prsm node benchmark

# Start your node
prsm node start

# Expose PRSM tools to any MCP-compatible LLM
prsm mcp-server

FTNS tokens: Providers earn FTNS for sharing storage, compute, and data through their node. New nodes receive a 100 FTNS welcome grant. Third-party LLMs invoke PRSM tools via MCP; reasoning happens in the LLM, execution happens on PRSM nodes.

See the full Getting Started Guide for detailed setup.


How It Works

The 10-Ring Architecture

PRSM is built as concentric capability rings. Each ring wraps and enriches the ones inside it.

Ring Name What It Does
1 The Sandbox WASM runtime with Wasmtime — sandboxed execution with memory/time limits
2 The Courier Mobile agent dispatch — agents travel to data via P2P gossip + bidding
3 The Swarm Semantic sharding — data split by meaning, parallel map-reduce across nodes
4 The Economy Hybrid pricing — deterministic compute rates + market-rate data + 80/15/5 revenue splits
5 Agent Forge WASM mobile agent runtime — query decomposition is performed by the caller's third-party LLM; PRSM dispatches the resulting WASM agents
6 The Polish Production hardening — dynamic gas, RPC failover, CLI commands
7 The Vault Confidential compute — TEE abstraction + differential privacy noise
8 The Shield Model sharding — tensor parallelism + randomized pipelines + collision detection
9 The Mind NWTN training pipeline — collect traces, evaluate quality, deploy fine-tuned models (reserved for future work)
10 The Fortress Security — integrity verification, privacy budgets, hash-chained audit logs

End-to-End Flow

Third-party LLM (Claude/GPT/local): calls prsm_analyze via MCP

  → LLM:     Decomposes the query into WASM agent instructions
  → Ring 3:  Finds relevant semantic shards by embedding similarity
  → Ring 4:  Quotes cost: compute + data + network fee
  → Ring 3:  Fans out parallel agents to shard-holding nodes
  → Ring 2:  Each agent dispatched via gossip bidding
  → Ring 1:  Executed in WASM sandbox on provider hardware
  → Ring 7:  Differential privacy noise applied
  → Ring 3:  Results aggregated when quorum met
  → Ring 4:  FTNS settled: 80% data owner / 15% compute / 5% treasury

  ← Result returned to the LLM for final synthesis

MCP Integration

Any LLM can use PRSM as a compute backend via the Model Context Protocol. 16 tools are exposed:

prsm mcp-server    # Start the MCP server

Configure in Claude Desktop (~/.claude/claude_desktop_config.json):

{"mcpServers": {"prsm": {"command": "python", "args": ["scripts/prsm_mcp_server.py"]}}}

Then Claude (or any MCP-compatible LLM) can:

Tool What It Does
prsm_analyze Full Ring 1-10 pipeline — query in, answer out
prsm_quote Cost estimate before committing (free)
prsm_create_agent Build custom agent with 11 data operations
prsm_dispatch_agent Execute agent on the network
prsm_upload_dataset Publish data with pricing
prsm_list_datasets Browse available datasets
prsm_search_shards Find relevant data shards
prsm_yield_estimate "What would I earn?"
prsm_stake Staking tier info
prsm_revenue_split Calculate 80/15/5 distribution
prsm_hardware_benchmark GPU, TFLOPS, tier, TEE detection
prsm_node_status Ring 1-10 health check
prsm_agent_status Check running agent
prsm_settlement_stats FTNS settlement queue
prsm_privacy_status Differential privacy budget
prsm_training_status NWTN training corpus quality

For Data Providers

Publish data through your node's ContentStore and earn 80% of every query against it:

prsm storage upload ./my_dataset.parquet \
  --description "NADA NC Vehicle Registrations 2025" \
  --royalty-rate 0.05 \
  --replicas 5

Revenue split: 80% to you, 15% to compute providers, 5% to PRSM treasury.


For Compute Providers

Check what you'd earn and start providing:

prsm node benchmark                           # See your hardware tier
prsm ftns yield-estimate --hours 8 --stake 1000   # Monthly earnings estimate
prsm node start                                # Start earning

Staking tiers:

Tier Stake Yield Boost
Casual 0 FTNS 1.0x
Pledged 100 FTNS 1.25x
Dedicated 1,000 FTNS 1.5x
Sentinel 10,000 FTNS 2.0x + aggregator fees

Privacy Architecture

PRSM provides three layers of privacy by construction — not by policy:

  1. WASM Zero-Persistence — The sandbox has no filesystem, no network, no state after execution. The agent literally cannot persist data.
  2. Semantic Data Sharding — No single node holds the full dataset. Each node sees only its assigned shard.
  3. Differential Privacy — Calibrated Gaussian noise on all intermediate activations (configurable ε: 8.0 standard, 4.0 high, 1.0 maximum).

For proprietary models, tensor-parallel model sharding distributes weights across nodes so no single operator can reconstruct the model. Randomized pipeline assignment changes the topology per inference. Collision detection catches tampering.

See Confidential Compute Spec for details.


SDKs

Language Install Docs
Python pip install prsm-network SDK Guide
JavaScript npm install prsm-sdk sdks/javascript/
Go go get github.com/Ryno2390/PRSM/sdks/go@v0.37.0 sdks/go/
from prsm.sdk import PRSMClient

client = PRSMClient("http://localhost:8000")
result = await client.query("EV trends in NC", budget=10.0, privacy="standard")
quote = await client.quote("EV trends", shards=5, tier="t2")

Production Deployment

# Systemd service
sudo cp deploy/production/prsm-node.service /etc/systemd/system/
sudo cp deploy/production/prsm.env.template /opt/prsm/.env
sudo systemctl enable prsm-node && sudo systemctl start prsm-node

# Docker (2-node demo)
docker-compose -f docker/docker-compose.demo.yml up

See Deployment Guide for full instructions.


Project Stats

Metric Value
Version 1.7.0
MCP Tools 16
SDKs Python, JavaScript, Go
FTNS Token Base mainnet
Bootstrap wss://bootstrap1.prsm-network.com:8765
License MIT

Documentation

Document Description
Getting Started Install → configure → first query in 5 minutes
Sovereign-Edge AI Spec Phase 1 architecture (Rings 1-6)
Confidential Compute Spec Phase 2 architecture (Rings 7-10)
Implementation Status Subsystem status and test coverage
Deployment Guide Production deployment walkthrough
SDK Developer Guide Building on PRSM

Contributing

git clone https://github.com/Ryno2390/PRSM.git
cd PRSM && pip install -e ".[dev]"
pytest --timeout=120    # Run test suite

See CONTRIBUTING.md for guidelines.


License: MIT | Website: prsm-network.com | PyPI: prsm-network

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prsm_network-1.7.0.tar.gz (4.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prsm_network-1.7.0-py3-none-any.whl (3.0 MB view details)

Uploaded Python 3

File details

Details for the file prsm_network-1.7.0.tar.gz.

File metadata

  • Download URL: prsm_network-1.7.0.tar.gz
  • Upload date:
  • Size: 4.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for prsm_network-1.7.0.tar.gz
Algorithm Hash digest
SHA256 0ac0161d4de43233a25bba828045087084128e7dc1b1b2ad53c32ead9826391a
MD5 fa6874173946ce8f1183209171257683
BLAKE2b-256 15b62d66b10396f38793b00f6aac30d2448b949a31aea7573780ef09d807b06c

See more details on using hashes here.

File details

Details for the file prsm_network-1.7.0-py3-none-any.whl.

File metadata

  • Download URL: prsm_network-1.7.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for prsm_network-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2ac71b7f0790ba2d36ebfe534a02f09950a00a7324cac16f49e66c02772de7ea
MD5 36e45f6281aae088178331d97d103122
BLAKE2b-256 a4aae0a0ae3a359128c2d981c9724b5c2cb7a4756b275a363b8767483967f875

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page