HERA Mail System
Internal email system for agent-to-agent communication within the HERA research assistant framework.
Quick Start
Check Inbox
CODEBLOCK0
Read a Message
CODEBLOCK1
Send a Message
CODEBLOCK2
Agent Names
| Agent | Name for Scripts |
|---|
| Group Leader | INLINECODE0 |
| Rough Reader |
rough-reader |
| Intensive Reader |
intensive-reader |
| Code Guider |
code-guider |
| Coordinator 1 |
coordinator-1 |
| Coordinator 2 |
coordinator-2 |
| Rough Checker 1 |
rough-checker-1 |
| Rough Checker 2 |
rough-checker-2 |
| Report Writer |
report-writer |
Email Format
CODEBLOCK3
Attachments
Attachments are stored in:
CODEBLOCK4
Supported: PDFs, images, data files, code, any file type.
Workflows
Workflow 1: Check and Read Messages
- 1. List inbox: INLINECODE9
- Identify unread messages (marked with
[○]) - Read specific message: INLINECODE11
- Message automatically marked as read
Workflow 2: Send Message with Attachment
CODEBLOCK5
Workflow 3: Interactive Send (with body from stdin)
CODEBLOCK6
Message Types
| Type | Sender | Recipient | Purpose |
|---|
| Task Assignment | Group Leader | Any agent | Assign new work |
| Work Submission |
Any agent | Coordinator/Leader | Submit completed work |
| Review Request | Any agent | Rough Checker | Request quality check |
| Information Request | Any agent | Reader agents | Request analysis |
| Data Transfer | Any agent | Any agent | Share files/data |
Best Practices
- 1. Be direct - No formal greetings, get straight to the point
- Clear subjects - Subject line should summarize the task/request
- Attach relevant files - Include papers, data, code as needed
- Check inbox regularly - Agents should monitor their inbox
- Mark important messages - Use mail ID for reference in future comms
Directory Structure
CODEBLOCK7
Examples
Example 1: Group Leader assigns task to Rough Reader
CODEBLOCK8
Example 2: Intensive Reader sends analysis to Report Writer
CODEBLOCK9
Example 3: Coordinator requests quality check
CODEBLOCK10
Troubleshooting
Inbox not found: Ensure agent directory exists under INLINECODE12
Mail not delivered: Check recipient agent name is correct
Attachment missing: Verify file path is absolute and file exists
Permission denied: Ensure scripts are executable:
CODEBLOCK11
HERA 邮件系统
HERA 研究助手框架内智能体间通信的内部邮件系统。
快速开始
查看收件箱
bash
python3 {baseDir}/scripts/list_inbox.py <智能体名称>
阅读邮件
bash
python3 {baseDir}/scripts/read_mail.py <智能体名称> <邮件文件.md>
发送邮件
bash
python3 {baseDir}/scripts/send_mail.py <发件智能体> <收件智能体> <主题> <附件路径...>
智能体名称
| 智能体 | 脚本中使用的名称 |
|---|
| 组长 | group-leader |
| 粗读员 |
rough-reader |
| 精读员 | intensive-reader |
| 代码指导 | code-guider |
| 协调员1 | coordinator-1 |
| 协调员2 | coordinator-2 |
| 粗检员1 | rough-checker-1 |
| 粗检员2 | rough-checker-2 |
| 报告撰写员 | report-writer |
邮件格式
markdown
[发件人: 智能体名称]
[收件人: 智能体名称]
[时间戳: YYYY-MM-DD HH:MM:SS]
[邮件ID: 唯一标识]
[主题: 主题文本]
[状态: 未读]
此处为邮件正文内容。
无需正式问候语——直接简洁即可。
[结束]
附件
附件存储于:
hera-agents/<收件人>/inbox/attachments/<邮件ID>/<文件>
支持:PDF、图片、数据文件、代码及任意文件类型。
工作流程
流程1:查看并阅读邮件
- 1. 列出收件箱:listinbox.py <智能体名称>
- 识别未读邮件(标记为 [○])
- 阅读指定邮件:readmail.py <智能体名称> <文件.md>
- 邮件自动标记为已读
流程2:发送带附件的邮件
bash
向粗读员发送论文
python3 send_mail.py group-leader rough-reader 请审阅此论文 /path/to/paper.pdf
向报告撰写员发送数据可视化结果
python3 send_mail.py intensive-reader report-writer 分析结果 /path/to/figure.png /path/to/data.csv
流程3:交互式发送(从标准输入读取正文)
bash
cat <
请审查附件中的代码,关注:
- 1. 性能问题
- 内存泄漏
- 最佳实践
截止时间:今日下班前
EOF
消息类型
| 类型 | 发件人 | 收件人 | 用途 |
|---|
| 任务分配 | 组长 | 任意智能体 | 分配新工作 |
| 工作提交 |
任意智能体 | 协调员/组长 | 提交已完成工作 |
| 审阅请求 | 任意智能体 | 粗检员 | 请求质量检查 |
| 信息请求 | 任意智能体 | 阅读类智能体 | 请求分析 |
| 数据传输 | 任意智能体 | 任意智能体 | 共享文件/数据 |
最佳实践
- 1. 直接明了 - 无需正式问候,直入主题
- 主题清晰 - 主题行应概括任务/请求
- 附上相关文件 - 根据需要附上论文、数据、代码
- 定期检查收件箱 - 智能体应监控其收件箱
- 标记重要邮件 - 在后续通信中使用邮件ID作为参考
目录结构
hera-agents/
├── <智能体名称>/
│ ├── inbox/ # 收到的消息
│ │ ├── *.md # 邮件文件
│ │ ├── *.read # 已读标记
│ │ └── attachments/ # 每封邮件的附件
│ └── outbox/ # 已发送邮件的副本
│ └── *.md
└── skills/hera-mail/
├── scripts/
│ ├── list_inbox.py
│ ├── read_mail.py
│ └── send_mail.py
└── references/
示例
示例1:组长向粗读员分配任务
bash
cat <
优先级:高
范围:最近6个月
重点:表面码、LDPC码
交付物:列出10篇最相关论文及其摘要
截止时间:2小时
EOF
示例2:精读员向报告撰写员发送分析结果
bash
python3 send_mail.py intensive-reader report-writer 分析完成:量子纠错 \
/workspace/analysis/summary.md \
/workspace/analysis/key_findings.csv \
/workspace/figures/error_rates.png
示例3:协调员请求质量检查
bash
python3 send_mail.py coordinator-1 rough-checker-1 需要质量检查:文献综述草稿 \
/workspace/drafts/litreviewv1.md
故障排除
收件箱未找到:确保智能体目录存在于 hera-agents/ 下
邮件未送达:检查收件智能体名称是否正确
附件缺失:确认文件路径为绝对路径且文件存在
权限被拒绝:确保脚本可执行:
bash
chmod +x /Users/zhaoruiwu/.openclaw/workspace/hera-agents/skills/hera-mail/scripts/*.py