Embed identity + messaging
Use Peer inside a Node.js or TypeScript application.
npm install @decentnetwork/peerDo not install a virtual network just to send a message. Do not rebuild application protocols when an existing service only needs a private address.
Use Peer inside a Node.js or TypeScript application.
npm install @decentnetwork/peerInstall agent-mesh so Claude Code, Codex, or another file-capable agent can receive and send work.
mesh status
mesh inboxInstall AgentNet/DecentLAN on both machines, friend them, then use private IPs.
npm install -g @decentnetwork/lan
agentnet initInstall the Beagle channel and local sidecar.
git clone https://github.com/decentnetworks/openclaw-beagle-channelIdentity 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());