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.6.0 | PyPI | Getting Started | Architecture Spec
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
# See it work (no config needed)
prsm demo
# 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 | The Router | Query decomposition performed by the caller's LLM (removed in v1.6.0 — replaced by third-party LLM integration via MCP) |
| 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:
- WASM Zero-Persistence — The sandbox has no filesystem, no network, no state after execution. The agent literally cannot persist data.
- Semantic Data Sharding — No single node holds the full dataset. Each node sees only its assigned shard.
- 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.6.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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file prsm_network-1.6.0.tar.gz.
File metadata
- Download URL: prsm_network-1.6.0.tar.gz
- Upload date:
- Size: 4.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24fb4314f9410c163329a43d112ad4c41c562c1bb52c830419a4313a3e0dad9b
|
|
| MD5 |
ce81af042001c684191c7166979f1581
|
|
| BLAKE2b-256 |
66a3b261864ecd5090e6f174750dc116bd6a7d89afbba5267ea053a9ebbe87c4
|
File details
Details for the file prsm_network-1.6.0-py3-none-any.whl.
File metadata
- Download URL: prsm_network-1.6.0-py3-none-any.whl
- Upload date:
- Size: 3.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06be59713d211b898865568006b4b767f62704856433adbacab619f28016fe2f
|
|
| MD5 |
69fe0866c8122c35aa1e9e63a475d61e
|
|
| BLAKE2b-256 |
562092b7294a1967c2492aa737c72b3d8ce656d9b313e62a569cdc992080a4a0
|