explaingit

martin123132/chatp2p

0PythonAudience · developerComplexity · 4/5ActiveSetup · hard

TLDR

Early prototype of a peer-to-peer compute mesh where workers run signed jobs (arithmetic, text, or local Ollama inference) for a coordinator that tracks credits in SQLite.

Mindmap

mindmap
  root((ChatP2P))
    Inputs
      Signed jobs
      Ollama prompts
      Admission token
    Outputs
      Verified results
      Credit ledger
      Dashboard JSON
    Use Cases
      Run local AI mesh
      Benchmark workers
      Public alpha invite
    Tech Stack
      Python
      SQLite
      Ollama
      Tailscale

Things people build with this

USE CASE 1

Run a local peer-to-peer mesh that offloads Ollama inference jobs to other machines.

USE CASE 2

Benchmark a worker node and advertise its GPU and model capabilities to a coordinator.

USE CASE 3

Stand up a private alpha coordinator with admission tokens and Tailscale invites.

USE CASE 4

Stress-test the lease and verification flow with a one-machine swarm proof.

Tech stack

PythonSQLiteOllamaTailscale

Getting it running

Difficulty · hard Time to first run · 1h+

Inference jobs require a local Ollama install with the matching model pulled, and remote workers need Tailscale or a reachable host.

In plain English

ChatP2P is an early prototype of a peer-to-peer network where regular computers contribute AI compute power to each other. The project focuses on the unglamorous plumbing that has to work before any larger vision is possible: signed nodes proving who they are, signed jobs proving what work was asked for, verified results, a credit system, and a central coordinator that may later give way to a wider mesh of peers. In its current form, a coordinator process creates signed job packets and a worker node signs its registration. The worker verifies any job it is leased before running it, then signs the completed result. The coordinator then verifies that result and awards credits. Network liveness and job leasing also use signed packets, so every step has a cryptographic trail. Users install the package with pip and run a command line tool called chatp2p. There are commands to benchmark a machine before it joins, including hardware checks, GPU detection, and a list of locally installed Ollama models. A doctor command prints JSON checks for identity, the local benchmark, Ollama reachability, and coordinator reachability. The coordinator keeps state in a small SQLite file, so registered nodes, jobs, leases, results, and credits survive restarts. A local web dashboard at port 8765 and a handful of JSON endpoints expose the current state. The project ships several built-in job types: simple arithmetic, number theory, text tasks, plain echo prompts, and inference jobs that call a local Ollama model such as llama3.2:3b. Inference jobs are only leased to workers that have advertised the matching model, so the network does not send work to machines that cannot run it. A reliability proof tool can spin up many workers on one machine and run hundreds of jobs to test that the lease and verification flow holds up, including faulty workers that vanish mid-job. A separate public alpha mode adds an admission token, a private operator config, and an invite file so a coordinator can be exposed beyond one machine without becoming open to the internet. The README also covers how to use Tailscale for the first remote partner test.

Copy-paste prompts

Prompt 1
Walk me through running chatp2p coordinator serve and chatp2p worker run-once on the same machine to drain the seeded job queue.
Prompt 2
Show me how to create an inference.ollama.v1 job with chatp2p job create-ollama and llama3.2:3b and trace how the coordinator verifies the signed result.
Prompt 3
Explain how chatp2p operator bootstrap-alpha generates the admission token and invite file, and what a contributor runs with chatp2p node join.
Prompt 4
Help me debug why chatp2p node doctor reports my worker as not advertising llama3.2:3b after I pulled the model from Ollama.
Prompt 5
Run the reliability proof with chatp2p proof swarm and 25 workers and 100 jobs, then summarize the JSON report.
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.