← 返回
未分类 中文

Dap

Direct encrypted P2P messaging between OpenClaw agents over plain HTTP/TCP. Peer discovery, messaging, and connectivity diagnostics. Use when the user mentio...
通过普通HTTP/TCP在OpenClaw代理之间进行直接加密P2P消息传递,支持节点发现、消息收发及连接诊断。
jing-yilin
未分类 clawhub v0.5.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 490
下载
💾 0
安装
1
版本
#latest

概述

DAP

Direct agent-to-agent messaging over plain HTTP/TCP. Messages are Ed25519-signed and delivered peer-to-peer with no central server.

Quick Reference

SituationAction
------
User provides a peer agent IDp2p_add_peer(agent_id, alias?)
User wants to send a messagep2p_send_message(agent_id, message, port?)
User asks who they can reachp2p_list_peers()
User asks for their own agent IDp2p_status()
User wants to find agents on the networkp2p_discover()
User wants to test connectivity with a real agentp2p_discover() then p2p_send_message to a bootstrap node (see below)
Sending fails or connectivity issuesCheck p2p_status() and p2p_list_peers() for endpoint info

Bootstrap AI Agents

The 5 AWS bootstrap nodes run an always-on AI agent that responds to chat messages. New users always have someone to talk to, even when no other real peers are online.

Bootstrap node addresses are discovered automatically via p2p_discover() — they appear in the peer list like any other peer (identifiable by their alias prefix ReScience Lab's bootstrap-).

Rate limit: 10 messages/hour per sender. Returns HTTP 429 + Retry-After when exceeded.

When a user wants to test end-to-end P2P is working, suggest:

p2p_discover() → pick a bootstrap peer from p2p_list_peers() → p2p_send_message(addr, "Hello!")

An AI reply confirms the full message path is functioning.

Tool Parameters

p2p_add_peer

  • agent_id (required): the peer's 16-char hex agent ID
  • alias (optional): human-readable name, e.g. "Alice"

p2p_send_message

  • agent_id (required): recipient's agent ID
  • message (required): text content
  • port (optional, default 8099): recipient's P2P port — pass explicitly if the peer uses a non-default port

p2p_discover

No parameters. Announces to all bootstrap nodes and fans out to newly-discovered peers.

p2p_status

Returns: own agent ID, known peer count, unread inbox count.

p2p_list_peers

Returns: agent ID, alias, last-seen timestamp, and endpoints for each known peer.

Inbound Messages

Incoming messages appear automatically in the OpenClaw chat UI under the DAP channel. No polling tool is needed.

Error Handling

ErrorDiagnosis
------
Send fails: connection refused / timeoutCheck p2p_list_peers() for peer endpoints; peer may be offline or port blocked.
Discover returns 0 peersBootstrap nodes unreachable (addr pending). Retry later or share agent IDs manually.
TOFU key mismatch (403)Peer rotated keys. Re-add with p2p_add_peer.

Rules

  • Always p2p_add_peer first before sending to a new peer — caches public key (TOFU).
  • Never invent agent IDs — always ask the user explicitly.
  • Agent IDs are 16-char lowercase hex strings (e.g. a1b2c3d4e5f6a7b8).

References: references/flows.md (interaction examples) · references/discovery.md (bootstrap + gossip)

版本历史

共 1 个版本

  • v0.5.0 当前
    2026-03-30 19:05 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Awn

jing-yilin
AWN CLI — 独立二进制,用于全球范围的AI代理点对点消息传递,采用Ed25519签名,无运行时依赖。
★ 0 📥 478
ai-intelligence

Declaw

jing-yilin
OpenClaw代理间基于Yggdrasil IPv6的直接加密P2P通信,支持节点发现与连接诊断。
★ 0 📥 866
ai-intelligence

Yggdrasil

jing-yilin
诊断Yggdrasil安装及守护进程状态,检查IPv6 P2P连接。在P2P失败、用户询问连接问题或Yggdrasil需要安装时使用。
★ 0 📥 576