{
  "schemaVersion": "1.0",
  "item": {
    "slug": "agentrelay",
    "name": "Agentrelay",
    "source": "tencent",
    "type": "skill",
    "category": "通讯协作",
    "sourceUrl": "https://clawhub.ai/extraterrest/agentrelay",
    "canonicalUrl": "https://clawhub.ai/extraterrest/agentrelay",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/agentrelay",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=agentrelay",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "RELEASE_NOTES.md",
      "SKILL.md",
      "SKILL.py",
      "__init__.py",
      "clawhub.json"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/agentrelay"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/agentrelay",
    "agentPageUrl": "https://openagent3.xyz/skills/agentrelay/agent",
    "manifestUrl": "https://openagent3.xyz/skills/agentrelay/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/agentrelay/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "AgentRelay 📨",
        "body": "Reliable Agent-to-Agent Communication Protocol — Solves sessions_send timeout issues for large payloads using shared files + short message pointers."
      },
      {
        "title": "🎯 When to Use This Skill",
        "body": "When you see messages like the following, immediately use this Skill to handle:\n\nPlease use AgentRelay skill to handle this message:\nREQ,event_001,s/event_001.json,,\n\nOr\n\n📨 AgentRelay Protocol Message\n\nPlease use AgentRelay skill to handle:\n- Message Type: REQ\n- Event ID: event_001\n- File Pointer: s/event_001.json\n\nKey Trigger Phrases:\n\n\"use AgentRelay skill to handle\"\n\"AgentRelay protocol message\"\n\"Use AgentRelay\"\n\nWhen you see these keywords, immediately execute the Commands below!"
      },
      {
        "title": "Standard Flow After Receiving AgentRelay Message",
        "body": "Step 1: Parse Message\n\npython3 {baseDir}/run_relay.py receive \"REQ,event_001,s/event_001.json,,\"\n\nExample output:\n\n{\n  \"type\": \"REQ\",\n  \"event_id\": \"event_001\",\n  \"content\": {\n    \"task\": \"write_poem\",\n    \"sender_agent\": \"agent:sender:main\",\n    \"receiver_agent\": \"agent:worker:main\"\n  },\n  \"secret\": \"ABC123\"\n}\n\nStep 2: Understand Task and Execute\n\nCheck the content field to understand what needs to be done (e.g., write poem, analyze data, generate report).\n\nStep 3: Update Result\n\npython3 {baseDir}/run_relay.py complete event_001 \"Task completed\" \"agent:sender:main\"\n\nStep 4: Send CMP Confirmation\n\n# generate CMP message (done automatically by run_relay.py complete)\n# Output: CMP,event_001,,,ABC123\n# Then send via sessions_send\nsessions_send(target='agent:sender:main', message='CMP,event_001,,,ABC123')"
      },
      {
        "title": "receive <csv_message>",
        "body": "Parse AgentRelay CSV message and read shared file content.\nAccepts either bare CSV or a full message with the AgentRelay: prefix.\n\nParameters:\n\ncsv_message: CSV format message (without AgentRelay: prefix)\n\nExample:\n\npython3 {baseDir}/run_relay.py receive \"REQ,event_001,s/event_001.json,,\"\n\nOutput (JSON):\n\n{\n  \"type\": \"REQ\",\n  \"event_id\": \"event_001\",\n  \"ptr\": \"s/event_001.json\",\n  \"content\": {...},\n  \"secret\": \"ABC123\"\n}"
      },
      {
        "title": "update <event_id> <json_updates> [next_event_id]",
        "body": "Update shared file content.\n\nParameters:\n\nevent_id: Event ID\njson_updates: JSON format updates (merged into payload.content)\n\nExample:\n\npython3 {baseDir}/run_relay.py update event_001 '{\"status\":\"completed\",\"result\":\"done\"}'\n\nOutput:\n\n{\"status\":\"ok\",\"file\":\"/path/to/event_001.json\",\"ptr\":\"s/event_001.json\"}"
      },
      {
        "title": "cmp <event_id> [secret]",
        "body": "Generate CMP confirmation message.\n\nParameters:\n\nevent_id: Event ID\nsecret: Secret Code read from file\n\nExample:\n\npython3 {baseDir}/run_relay.py cmp event_001 ABC123\n\nOutput:\n\n{\n  \"status\": \"ok\",\n  \"cmp_message\": \"CMP,event_001,,,ABC123\",\n  \"instruction\": \"Call sessions_send with message='CMP,event_001,,,ABC123'\"\n}"
      },
      {
        "title": "verify <cmp_message>",
        "body": "Verify that a received CMP message matches the secret stored in the event file.\n\nExample:\n\npython3 {baseDir}/run_relay.py verify \"CMP,event_001,,,ABC123\"\n\nOutput:\n\n{\n  \"status\": \"ok\",\n  \"event_id\": \"event_001\",\n  \"verified\": true\n}"
      },
      {
        "title": "Sender Agent",
        "body": "# 1. Prepare data\ncontent = {\n    \"task\": \"write_poem\",\n    \"sender_agent\": \"agent:sender:main\",\n    \"receiver_agent\": \"agent:worker:main\"\n}\n\n# 2. Write to shared file\nfrom agentrelay import agentrelay_send\nresult = agentrelay_send(\"agent:worker:main\", \"REQ\", \"event_001\", content)\n\n# 3. Send message with prefix\nmessage = f\"AgentRelay: {result['csv_message']}\"\nsessions_send(target='agent:worker:main', message=message)"
      },
      {
        "title": "Receiver Agent",
        "body": "# 1. Receive message: AgentRelay: REQ,event_001,s/event_001.json,,\n\n# 2. Parse message\npython3 {baseDir}/run_relay.py receive \"REQ,event_001,s/event_001.json,,\"\n# → Get content and secret\n\n# 3. Understand task, call LLM to execute\n# (This is your LLM capability)\n\n# 4. Update result\npython3 {baseDir}/run_relay.py update event_001 '{\"status\":\"completed\"}'\n\n# 5. Send CMP\nCMP_OUTPUT=$(python3 {baseDir}/run_relay.py cmp event_001 SECRET)\nCMP_MSG=$(echo \"$CMP_OUTPUT\" | jq -r '.cmp_message')\nsessions_send(target='agent:sender:main', message=\"$CMP_MSG\")"
      },
      {
        "title": "CSV Format",
        "body": "TYPE,ID,PTR,,DATA\n\nField Descriptions:\n\nTYPE: Message type (REQ | CMP)\nID: Event ID (unique identifier)\nPTR: File pointer (e.g., s/event_id.json)\nRESERVED: Reserved field (leave empty)\nDATA: Additional data (Secret Code for CMP)\n\nExamples:\n\nREQ,event_001,s/event_001.json,,  # Request\nCMP,event_001,,,ABC123            # Completion confirmation"
      },
      {
        "title": "Full Message (with prefix)",
        "body": "AgentRelay: REQ,event_001,s/event_001.json,,\n\nWhy need prefix?\n\n✅ Clearly identifies this as AgentRelay protocol message\n✅ LLM immediately knows to call AgentRelay Skill when seeing it\n✅ Avoids confusion with other messages"
      },
      {
        "title": "1. Secret Code Verification",
        "body": "Sender generates 6-character random code (e.g., ABC123)\nSecret is written to file\nReceiver must return the same Secret when sending CMP\nSender verifies Secret matches, ensuring receiver actually read the file"
      },
      {
        "title": "2. Burn-on-read (Optional)",
        "body": "When burn_on_read=true is set in meta or payload.content, the file is automatically deleted after reading to protect sensitive data."
      },
      {
        "title": "📁 Data Storage",
        "body": "Shared Files: ~/.openclaw/data/agentrelay/storage/*.json\nTransaction Logs: ~/.openclaw/data/agentrelay/logs/transactions_*.jsonl\nRegistry: ~/.openclaw/data/agentrelay/registry.json"
      },
      {
        "title": "Smoke Test",
        "body": "python3 {baseDir}/smoke_test.py"
      },
      {
        "title": "Pytest Regression Suite",
        "body": "pytest {baseDir}/test_agentrelay.py"
      },
      {
        "title": "Cleanup Expired Events",
        "body": "python3 {baseDir}/cleanup_relay.py"
      },
      {
        "title": "Verify a CMP",
        "body": "python3 {baseDir}/run_relay.py verify \"CMP,r1_r,,,ABC123\""
      },
      {
        "title": "Q: Why use AgentRelay instead of direct sessions_send?",
        "body": "A: sessions_send tends to timeout when transmitting messages larger than 30 characters. AgentRelay uses shared files + short pointers (less than 30 characters) to transmit arbitrarily large data."
      },
      {
        "title": "Q: What is Secret Code for?",
        "body": "A: Secret Code is a 6-character random code used to verify the receiver actually read the file. Receiver must return the correct Secret in CMP, and sender can verify it with verify."
      },
      {
        "title": "Q: How long are files retained?",
        "body": "A: Files are retained for 24 hours by default. You can adjust this with ttl_hours, enable burn_on_read to delete immediately after reading, and run cleanup_relay.py to sweep expired files and old registry entries."
      },
      {
        "title": "📖 More Documentation",
        "body": "README.md - Project overview\nRELEASE_NOTES.md - Release notes\n\nVersion: v1.1.0\nLast Updated: 2026-02-28\nAuthor: AgentRelay Team\nMaintainer: AgentRelay Team"
      }
    ],
    "body": "AgentRelay 📨\n\nReliable Agent-to-Agent Communication Protocol — Solves sessions_send timeout issues for large payloads using shared files + short message pointers.\n\n🎯 When to Use This Skill\n\nWhen you see messages like the following, immediately use this Skill to handle:\n\nPlease use AgentRelay skill to handle this message:\nREQ,event_001,s/event_001.json,,\n\n\nOr\n\n📨 AgentRelay Protocol Message\n\nPlease use AgentRelay skill to handle:\n- Message Type: REQ\n- Event ID: event_001\n- File Pointer: s/event_001.json\n\n\nKey Trigger Phrases:\n\n\"use AgentRelay skill to handle\"\n\"AgentRelay protocol message\"\n\"Use AgentRelay\"\n\nWhen you see these keywords, immediately execute the Commands below!\n\n🚀 Quick Start\nStandard Flow After Receiving AgentRelay Message\n\nStep 1: Parse Message\n\npython3 {baseDir}/run_relay.py receive \"REQ,event_001,s/event_001.json,,\"\n\n\nExample output:\n\n{\n  \"type\": \"REQ\",\n  \"event_id\": \"event_001\",\n  \"content\": {\n    \"task\": \"write_poem\",\n    \"sender_agent\": \"agent:sender:main\",\n    \"receiver_agent\": \"agent:worker:main\"\n  },\n  \"secret\": \"ABC123\"\n}\n\n\nStep 2: Understand Task and Execute\n\nCheck the content field to understand what needs to be done (e.g., write poem, analyze data, generate report).\n\nStep 3: Update Result\n\npython3 {baseDir}/run_relay.py complete event_001 \"Task completed\" \"agent:sender:main\"\n\n\nStep 4: Send CMP Confirmation\n\n# generate CMP message (done automatically by run_relay.py complete)\n# Output: CMP,event_001,,,ABC123\n# Then send via sessions_send\nsessions_send(target='agent:sender:main', message='CMP,event_001,,,ABC123')\n\n📚 Commands\nreceive <csv_message>\n\nParse AgentRelay CSV message and read shared file content. Accepts either bare CSV or a full message with the AgentRelay: prefix.\n\nParameters:\n\ncsv_message: CSV format message (without AgentRelay: prefix)\n\nExample:\n\npython3 {baseDir}/run_relay.py receive \"REQ,event_001,s/event_001.json,,\"\n\n\nOutput (JSON):\n\n{\n  \"type\": \"REQ\",\n  \"event_id\": \"event_001\",\n  \"ptr\": \"s/event_001.json\",\n  \"content\": {...},\n  \"secret\": \"ABC123\"\n}\n\nupdate <event_id> <json_updates> [next_event_id]\n\nUpdate shared file content.\n\nParameters:\n\nevent_id: Event ID\njson_updates: JSON format updates (merged into payload.content)\n\nExample:\n\npython3 {baseDir}/run_relay.py update event_001 '{\"status\":\"completed\",\"result\":\"done\"}'\n\n\nOutput:\n\n{\"status\":\"ok\",\"file\":\"/path/to/event_001.json\",\"ptr\":\"s/event_001.json\"}\n\ncmp <event_id> [secret]\n\nGenerate CMP confirmation message.\n\nParameters:\n\nevent_id: Event ID\nsecret: Secret Code read from file\n\nExample:\n\npython3 {baseDir}/run_relay.py cmp event_001 ABC123\n\n\nOutput:\n\n{\n  \"status\": \"ok\",\n  \"cmp_message\": \"CMP,event_001,,,ABC123\",\n  \"instruction\": \"Call sessions_send with message='CMP,event_001,,,ABC123'\"\n}\n\nverify <cmp_message>\n\nVerify that a received CMP message matches the secret stored in the event file.\n\nExample:\n\npython3 {baseDir}/run_relay.py verify \"CMP,event_001,,,ABC123\"\n\n\nOutput:\n\n{\n  \"status\": \"ok\",\n  \"event_id\": \"event_001\",\n  \"verified\": true\n}\n\n🔄 Complete Communication Flow\nSender Agent\n# 1. Prepare data\ncontent = {\n    \"task\": \"write_poem\",\n    \"sender_agent\": \"agent:sender:main\",\n    \"receiver_agent\": \"agent:worker:main\"\n}\n\n# 2. Write to shared file\nfrom agentrelay import agentrelay_send\nresult = agentrelay_send(\"agent:worker:main\", \"REQ\", \"event_001\", content)\n\n# 3. Send message with prefix\nmessage = f\"AgentRelay: {result['csv_message']}\"\nsessions_send(target='agent:worker:main', message=message)\n\nReceiver Agent\n# 1. Receive message: AgentRelay: REQ,event_001,s/event_001.json,,\n\n# 2. Parse message\npython3 {baseDir}/run_relay.py receive \"REQ,event_001,s/event_001.json,,\"\n# → Get content and secret\n\n# 3. Understand task, call LLM to execute\n# (This is your LLM capability)\n\n# 4. Update result\npython3 {baseDir}/run_relay.py update event_001 '{\"status\":\"completed\"}'\n\n# 5. Send CMP\nCMP_OUTPUT=$(python3 {baseDir}/run_relay.py cmp event_001 SECRET)\nCMP_MSG=$(echo \"$CMP_OUTPUT\" | jq -r '.cmp_message')\nsessions_send(target='agent:sender:main', message=\"$CMP_MSG\")\n\n📊 Message Format Details\nCSV Format\nTYPE,ID,PTR,,DATA\n\n\nField Descriptions:\n\nTYPE: Message type (REQ | CMP)\nID: Event ID (unique identifier)\nPTR: File pointer (e.g., s/event_id.json)\nRESERVED: Reserved field (leave empty)\nDATA: Additional data (Secret Code for CMP)\n\nExamples:\n\nREQ,event_001,s/event_001.json,,  # Request\nCMP,event_001,,,ABC123            # Completion confirmation\n\nFull Message (with prefix)\nAgentRelay: REQ,event_001,s/event_001.json,,\n\n\nWhy need prefix?\n\n✅ Clearly identifies this as AgentRelay protocol message\n✅ LLM immediately knows to call AgentRelay Skill when seeing it\n✅ Avoids confusion with other messages\n🛡️ Security Mechanisms\n1. Secret Code Verification\nSender generates 6-character random code (e.g., ABC123)\nSecret is written to file\nReceiver must return the same Secret when sending CMP\nSender verifies Secret matches, ensuring receiver actually read the file\n2. Burn-on-read (Optional)\n\nWhen burn_on_read=true is set in meta or payload.content, the file is automatically deleted after reading to protect sensitive data.\n\n📁 Data Storage\nShared Files: ~/.openclaw/data/agentrelay/storage/*.json\nTransaction Logs: ~/.openclaw/data/agentrelay/logs/transactions_*.jsonl\nRegistry: ~/.openclaw/data/agentrelay/registry.json\n🧪 Testing and Examples\nSmoke Test\npython3 {baseDir}/smoke_test.py\n\nPytest Regression Suite\npytest {baseDir}/test_agentrelay.py\n\nCleanup Expired Events\npython3 {baseDir}/cleanup_relay.py\n\nVerify a CMP\npython3 {baseDir}/run_relay.py verify \"CMP,r1_r,,,ABC123\"\n\n❓ FAQ\nQ: Why use AgentRelay instead of direct sessions_send?\n\nA: sessions_send tends to timeout when transmitting messages larger than 30 characters. AgentRelay uses shared files + short pointers (less than 30 characters) to transmit arbitrarily large data.\n\nQ: What is Secret Code for?\n\nA: Secret Code is a 6-character random code used to verify the receiver actually read the file. Receiver must return the correct Secret in CMP, and sender can verify it with verify.\n\nQ: How long are files retained?\n\nA: Files are retained for 24 hours by default. You can adjust this with ttl_hours, enable burn_on_read to delete immediately after reading, and run cleanup_relay.py to sweep expired files and old registry entries.\n\n📖 More Documentation\nREADME.md - Project overview\nRELEASE_NOTES.md - Release notes\n\nVersion: v1.1.0 Last Updated: 2026-02-28\nAuthor: AgentRelay Team\nMaintainer: AgentRelay Team"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/extraterrest/agentrelay",
    "publisherUrl": "https://clawhub.ai/extraterrest/agentrelay",
    "owner": "extraterrest",
    "version": "1.1.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/agentrelay",
    "downloadUrl": "https://openagent3.xyz/downloads/agentrelay",
    "agentUrl": "https://openagent3.xyz/skills/agentrelay/agent",
    "manifestUrl": "https://openagent3.xyz/skills/agentrelay/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/agentrelay/agent.md"
  }
}