-
Notifications
You must be signed in to change notification settings - Fork 7
Getting Started
Audience: node operators, developers who want to try KwaaiNet locally
This guide walks you through installing the kwaainet CLI, starting a node, and making a test chat-completion request against its OpenAI-compatible API.
This is an early guide. Exact commands and flags may change; always check
kwaainet --helpand the latest release notes.
You'll need:
- A Linux, macOS, or Windows machine — x86_64 or ARM64 (including Raspberry Pi 4/5 and Apple Silicon).
- An Internet connection (for DHT bootstrap and optional model downloads).
- Basic terminal access and permissions to install binaries.
GPU is not required for a basic test, but some models will run much faster with GPU acceleration.
KwaaiNet ships as a single native binary (kwaainet) that manages identity, the node daemon, and the OpenAI-compatible API.
curl --proto '=https' --tlsv1.2 -LsSf \
https://github.com/Kwaai-AI-Lab/KwaaiNet/releases/latest/download/kwaainet-installer.sh | shpowershell -ExecutionPolicy Bypass -c "irm https://github.com/Kwaai-AI-Lab/KwaaiNet/releases/latest/download/kwaainet-installer.ps1 | iex"brew install kwaai-ai-lab/tap/kwaainetcargo binstall kwaainetcargo install --git https://github.com/Kwaai-AI-Lab/KwaaiNet kwaainetConfirm the install:
kwaainet --helpYou should see usage information for commands such as setup, start, stop, status, logs, and serve.
Before running as a daemon, initialize identity, configuration, and dependencies.
kwaainet setupThis will:
- Generate an Ed25519 keypair at
~/.kwaainet/identity.key. - Derive your
PeerIdanddid:peer:DID from that keypair. - Create default config files and select a smart default node name (e.g.
alice-linux-aarch64). - Download and configure required dependencies (e.g.
p2pd) if missing.
If
p2pdis not found after setup, runkwaainet setup --get-depsto download it automatically.
You can inspect your identity:
kwaainet identity showThis prints your node's PeerId, did:peer: DID, and other identity details anchored in the trust core.
Start the node and join the network:
# Foreground
kwaainet start
# Or run as a background daemon
kwaainet start --daemonOn startup, the node will:
- Connect to bootstrap peers and stabilize DHT connections.
- Measure local compute and network bandwidth.
- Discover available models (local or network) and pick a suitable default.
- Register blocks, model info, and trust attestations with bootstrap peers.
- Expose an OpenAI-compatible HTTP API (default port
11435— checkkwaainet --helpfor the current default).
Check status and follow logs:
kwaainet status
kwaainet logs --followIf everything is working, you should see logs about DHT bootstrap, model discovery, and API readiness.
KwaaiNet provides an OpenAI-compatible API for models it serves, so most OpenAI clients work by just changing the base URL.
curl http://localhost:11435/v1/modelsYou should see a JSON list of available models, including any local model (e.g. llama3.1:8b) or network-shared models.
MODEL_ID="llama3.1:8b" # replace with a model from /v1/models
curl http://localhost:11435/v1/chat/completions \
-H "Content-Type: application/json" \
-d "{
\"model\": \"${MODEL_ID}\",
\"messages\": [
{\"role\": \"user\", \"content\": \"Hello, KwaaiNet!\"}
]
}"The node will:
- Interpret this as an intent ("run MODEL_ID with default trust and latency constraints").
- Resolve a shard chain of nodes that satisfy trust and capability requirements.
- Run CandelEngine's block-sharded inference and stream back a completion.
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:11435/v1",
api_key="sk-local" # placeholder, not checked
)
resp = client.chat.completions.create(
model="llama3.1:8b", # replace with your model
messages=[{"role": "user", "content": "Hello, KwaaiNet from Python!"}],
)
print(resp.choices[0].message.content)If your configuration allows public discovery, your node can appear on the KwaaiNet map as a visible participant in the Layer 8 fabric.
Once the node is stable:
- Visit map.kwaai.ai and look for your node name.
- Over time, trust attestations (VCs, uptime, throughput) may show up as badges next to your node.
- Architecture — See how trust, compute, storage, and network fit together inside the node.
- Roadmap — Understand which parts of the Layer 8 design are implemented vs in progress vs research.
- Contributing — Help advance the trust graph, VPK, intent-casting, or other roadmap items.
Part of the KwaaiNet project · View source docs