DEVELOPERS

Start at the smallest useful layer.

Do not install a virtual network just to send a message. Do not rebuild application protocols when an existing service only needs a private address.

01

Embed identity + messaging

Use Peer inside a Node.js or TypeScript application.

npm install @decentnetwork/peer
Peer quickstart →
02

Connect local coding agents

Install agent-mesh so Claude Code, Codex, or another file-capable agent can receive and send work.

mesh status
mesh inbox
Agent mesh guide →
03

Connect existing services

Install AgentNet/DecentLAN on both machines, friend them, then use private IPs.

npm install -g @decentnetwork/lan
agentnet init
AgentNet install →
04

Give OpenClaw a channel

Install the Beagle channel and local sidecar.

git clone https://github.com/decentnetworks/openclaw-beagle-channel
OpenClaw guide →
PEER API

A peer in a few lines

Identity is created locally and persists in the key file. Bootstrap nodes introduce the peer to the network; a relationship must be accepted before messaging.

import { Peer } from "@decentnetwork/peer";

const peer = await Peer.create({
  keyFile: "./alice/peer.save",
  bootstrapNodes: [{ host: "13.58.208.50", port: 33445, pk: "89vny8MrKdDKs7Uta9RdVmspPjnRMdwMmaiEW27pZ7gh" }],
});
await peer.start();
await peer.joinNetwork();
console.log(peer.address());