一键导入
agent-relay
Agent-to-Agent communication via GitHub relay — using a shared repo as message queue between autonomous AI agents.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Agent-to-Agent communication via GitHub relay — using a shared repo as message queue between autonomous AI agents.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Migrate Hermes Agent to a new server while keeping both instances running in parallel. Covers backup, SSH troubleshooting, skill/memory sync, and GitHub remote setup.
Backup, restore, and migrate Hermes Agent data across machines. Covers the local backup scripts, cron scheduling, retention policies, git remote management, shallow-clone migration, and cross-machine parallel deployment.
Modify PDF appearance without changing content/structure: change font colors, remove highlights, adjust styling. Preserves all text, layout, fonts, and embedded resources.
Cloudflare Workers + D1 e-commerce site for Shengtuo Tractor. Deploy, DB ops, SEO, product sync.
Deploy and manage Cloudflare Workers with D1, R2, KV, and Workers KV store
Install and select animated petdex mascots for Hermes.
| name | agent-relay |
| description | Agent-to-Agent communication via GitHub relay — using a shared repo as message queue between autonomous AI agents. |
| version | 1.0.0 |
| author | Hermes Agent |
| license | MIT |
| metadata | {"hermes":{"tags":["multi-agent","github","relay","autonomous","pr-communication"],"related_skills":["github-pr-workflow"]}} |
Two or more AI agents (running on different machines) communicate by exchanging message files through a shared GitHub repository. Each agent:
inbox/outbox/inbox/[Agent-A] ←→ GitHub Repo (clowlove/hermes-house) ←→ [Agent-B]
↓ ↓ ↓
outbox/ ← inbox/ → outbox/
agent-comm/
├── README.md # Protocol documentation
├── config.json # Agent registry (names, capabilities, status)
└── messages/
├── README.md # Message format spec
├── inbox/ # Messages received from other agents
└── outbox/ # Messages ready to send
{
"version": "1.0",
"protocol": "agent-comm-v1",
"agents": {
"hermes-a": {
"id": "hermes-a",
"name": "Hermes-A (NousResearch Server)",
"platform": "hermes-agent",
"owner": "clowlove",
"capabilities": ["github-api", "cron-jobs", "browser", "web-search"],
"status": "active"
},
"hermes-b": {
"id": "hermes-b",
"name": "Hermes-B (hermes-house Server)",
"platform": "hermes-agent",
"owner": "clowlove",
"capabilities": ["github-api", "cron-jobs", "browser", "web-search"],
"status": "active"
}
},
"communication": {
"hub_repo": "clowlove/hermes-house",
"messages_dir": "agent-comm/messages",
"issue_label": "agent-comm",
"check_interval": "5m"
}
}
Filename convention:
{action}-{from}-{to}-{YYYYMMDD-HHMMSS}.md
Example: ping-hermes-a-hermes-b-20260525-131000.md
Message body format:
# [From: Hermes-A] → [To: Hermes-B]
## 时间: 2026-05-25 13:10 UTC
## 类型: ping | pong | task | reply | info
---
### 内容
消息正文...
---
### 签名
Hermes-A hermes-agent v1.0
| Type | Purpose | Reply Expected |
|---|---|---|
ping | Connection test, no response needed | No (or pong) |
pong | Response to ping | No |
task | Request agent to perform an action | Yes (reply) |
reply | Response to a task | No |
info | Status update or notification | Optional |
agent-comm/messages/outbox/{filename}.mdagent-comm/{agent}-{timestamp}git push -u origin HEADagent-comm labelmainagent-comm/messages/inbox/type fieldoutbox/ and follow send workflow# Check for mergeable PRs from the other agent
gh pr list --author @me --state open --json number,title,mergeable --jq '.[] | select(.mergeable == "MERGEABLE")'
# Squash merge
gh pr merge {PR号} --squash --delete-branch
Set up a recurring job (default: 15 minutes). The cron job performs these steps in order:
git fetch origin && git checkout main && git pull origin maingh pr list --author @me --state open --json number,title,state,mergeable --jq '.[] | select(.mergeable == true)'gh pr merge {PR号} --squash --delete-branch for each mergeable PRagent-comm/messages/inbox/ from other agentsoutbox/ if neededgit checkout -b feat/hermes-b-status-{timestamp}git add agent-comm/messages/outbox/ && git commit -m "feat: hermes-b status report"git push -u origin HEAD--label agent-comm if label doesn't exist yet)*/15 * * * * cd /tmp/hermes-house && python3 scripts/agent_collab.py --task cycle
The unified script runs:
Beyond simple messaging, the relay supports three collaboration layers:
.agent/ # Root for all agent collaboration
├── tasks/ # Shared task pool
│ ├── pool/ # Open tasks (anyone can claim)
│ ├── claimed/ # Tasks in progress
│ └── done/ # Completed tasks
├── knowledge/ # Shared knowledge base
│ └── resources/ # tools, articles, datasets, models
├── pipeline/ # Automation pipelines (A→B→User)
│ ├── trend/ # Trend report pipeline
│ ├── code/ # Code scan pipeline
│ └── learn/ # Learning report pipeline
└── config.yaml # Pipeline configuration
pool/ (open) → claimed/ (in progress) → done/
| File prefix | Meaning |
|---|---|
YYYY-MM-DD_task_*.md | Open task |
Status claimed + claimed_by | In progress |
Status done | Completed |
tools/, articles/, datasets/, models/| Pipeline | Flow | Output |
|---|---|---|
trend-report | A采集 → B分析 | Telegram |
code-scan | A扫描 → B审查 | PR comment |
daily-learn | A记录 → B整理 | Telegram |
| File | Purpose |
|---|---|
scripts/agent_communicate.py | Autonomous communication engine |
scripts/agent_collab.py | Unified manager: tasks + knowledge + pipelines |
scripts/pipeline_runner.py | Pipeline stage executor |
references/message-examples.md | Message templates |
# 1. Clone the shared repo
git clone https://github.com/clowlove/hermes-house.git
cd hermes-house
# 2. Ensure agent-comm/ directory exists
mkdir -p agent-comm/messages/{inbox,outbox}
# 3. Update config.json with agent info
# (see Config File section above)
# 4. Create first ping
echo '# [From: Hermes-B] → [To: Hermes-A]
## 类型: ping
你好!' > agent-comm/messages/outbox/ping-hermes-b-hermes-a-$(date +%Y%m%d-%H%M%S).md
# 5. Push and create PR
git checkout -b agent-comm/init
git add agent-comm/ && git commit -m "feat(agent): initial comm setup"
git push -u origin HEAD
gh pr create --title "feat(agent): init Hermes-B" --body "Initial setup"
Even with admin privileges, protected branches reject git push. Always go through PR.
mergeable Not Just stateA PR with state: open may not yet be mergeable (mergeable: false or UNKNOWN). Query with --jq '.[] | select(.mergeable == true)' to filter. Note: mergeable is a boolean true/false in current gh CLI, not the string "MERGEABLE" mentioned in older docs.
Use unique branch names per push (e.g., agent-comm/hermes-b-20260525-175000) to avoid conflicts when both agents push frequently.
If cron jobs push frequently, outbox files can pile up. Process messages and move them to inbox/ after merge, or clean outbox after successful PR creation.
agent-comm Label May Not ExistWhen creating PRs with --label agent-comm, the label must already exist in the repo. If gh pr create --label agent-comm fails with "label not found", either:
gh label create agent-comm --description "Agent communication PRs"agent-comm/messages/inbox/ — the relay inbox for agent-to-agent messages (what this skill uses).agent/inbox/ — a separate inbox directory (may be empty or for different purposes)Always check agent-comm/messages/inbox/ for relay messages; .agent/inbox/ is not the relay inbox.