Files
Clawd BotandClaude Opus 4.6 ca9b510922 chore: align with upstream openclaw/openclaw and overlay local additions
- Reset master to upstream/main (16,697 commits)
- Overlay 2,271 local-only files (skills, tools, workspace, configs, apps)
- Restore IDENTITY.md and USER.md templates
- Build verified, gateway running, Discord working

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-03 07:40:46 +01:00

1.3 KiB

MAIL_AGENT.md — Implementation Notes

The Mail Agent scans messages and emits mail.* events. It does not send mail; it only drafts and classifies.


Implementation

  • Code: workspace/james/agents/mail/mail_agent.py
  • Channel: james.events.mail
  • Dry-run only (fixtures or local parsing)

Dry-Run

PYTHONPATH=<repo-root>/workspace JAMES_MAIL_DRY_RUN=1 JAMES_MAIL_STDOUT=1 \
python3 workspace/james/agents/mail/mail_agent.py --dry-run

Optional fixture:

PYTHONPATH=<repo-root>/workspace JAMES_MAIL_DRY_RUN=1 JAMES_MAIL_STDOUT=1 \
python3 workspace/james/agents/mail/mail_agent.py --dry-run --fixture workspace/james/fixtures/mail.json

Classification Rules

  • mail.security_alert — login alerts, password resets, verification codes
  • mail.invoice — billing, receipts, subscriptions
  • mail.action_required — requests, approvals, tasks
  • mail.newsletter — marketing or digest mail
  • mail.fyi — everything else

Severity mapping:

  • security: high
  • action_required: medium
  • invoice: medium
  • newsletter/fyi: low

Payload Fields

  • email_id
  • from
  • subject
  • snippet
  • received_at
  • labels
  • classification
  • summary
  • draft_reply
  • dry_run

Systemd (optional)

  • workspace/james/agents/mail/systemd/james-mail.service