← Back to Skills Marketplace
stefanferreira

Agent Email Setup

by stefanferreira · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
77
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install agent-email-setup
Description
Set up dedicated email accounts for AI agents with proper workflows. Use when agents need external communications (Lourens for sysadmin, Ace for competitions...
README (SKILL.md)

Agent Email Setup

Purpose

Provide dedicated email accounts for AI agents with clear role separation and approval workflows. Prevents mixing of responsibilities (e.g., Ace shouldn't handle Contabo support tickets).

When to Use

Set up email for agent when:

  • Agent needs external communications (Lourens, Ace)
  • Role separation is important
  • Audit trail needed for communications
  • Professional identity required

Do NOT set up email for:

  • Internal-only agents (Bob, Scout)
  • Agents without external communication needs
  • Temporary/task-specific agents

Architecture

Email Address Strategy

@supplystoreafrica.com domain:
- lourens@      → SysAdmin (infrastructure, support tickets)
- ace@          → Competitions (entries, prize notifications)
- facet@        → CAD (manufacturer communications) - if needed

Forwarding Rules

Role Separation

Agent Email Purpose External Comms
Lourens lourens@ Infrastructure, support tickets, system issues ✅ Required
Ace ace@ Competition entries, prize notifications ✅ Required
Facet facet@ Manufacturer inquiries, technical specs ⚠️ Optional
Bob - Internal coordination only ❌ Not needed
Scout - Research, no external comms ❌ Not needed

Workflow

1. Sandbox Testing (ALWAYS FIRST)

# Create sandbox environment
python3 /root/.openclaw/workspace/sandbox_lourens_email.py

# Test configuration
cd /tmp/lourens_email_sandbox_*/ && python3 test_email_workflow.py

2. Production Setup

Step 1: Create Email Account

  1. Log into hosting control panel
  2. Create email account: [email protected]
  3. Set strong password (store in Bitwarden)
  4. Configure forwarding to [email protected]

Step 2: Configure IMAP/SMTP

{
  "imap_server": "mail.supplystoreafrica.com",
  "imap_port": 993,
  "smtp_server": "mail.supplystoreafrica.com", 
  "smtp_port": 587,
  "username": "[email protected]",
  "password": "{{BITWARDEN_PASSWORD}}"
}

Step 3: Agent Configuration

Add to agent's workspace:

# Create email config
mkdir -p /root/.openclaw/agents/{agent}/workspace/email/
cat > /root/.openclaw/agents/{agent}/workspace/email/config.json \x3C\x3C 'EOF'
{{
  "email": "{agent}@supplystoreafrica.com",
  "display_name": "{Agent Name} {Role}",
  "signature": "Best regards,\\
\\
{Agent Name}\\
{Role} Agent\\
Supply Store Africa\\
{agent}@supplystoreafrica.com",
  "forward_to": ["[email protected]"],
  "auto_cc": ["[email protected]"]
}}
EOF

Step 4: Update OpenClaw Configuration

# Add email tools to agent
openclaw config set agents.list[{index}].tools.allow+=email_send
openclaw config set agents.list[{index}].tools.allow+=email_check

3. Email Templates

Generic Template

TO: {recipient}
FROM: {Agent Name} {Role} \x3C{agent}@supplystoreafrica.com>
CC: Stef Ferreira \[email protected]>
SUBJECT: {subject}
DATE: {date}

{greeting},

{body}

{signature}

Contabo Support Template (Lourens)

TO: [email protected]
FROM: Lourens SysAdmin \[email protected]>
CC: Stef Ferreira \[email protected]>
SUBJECT: {ticket_subject}
DATE: {date}

Dear {support_agent},

{content}

Current system status:
- VPS: 161.97.110.234
- Ticket: {ticket_number}
- Issue: {issue_description}

We appreciate your assistance.

Best regards,

Lourens
SysAdmin Agent
Supply Store Africa
[email protected]

Competition Entry Template (Ace)

TO: [email protected]
FROM: Ace Competitions \[email protected]>
CC: Stef Ferreira \[email protected]>
SUBJECT: Entry: {competition_name}
DATE: {date}

Dear Competition Team,

Please accept my entry for {competition_name}.

{entry_details}

Thank you for this opportunity.

Best regards,

Ace
Competitions Agent
Supply Store Africa
[email protected]

4. Approval Workflow

ALL external emails require approval:

  1. Draft created in /root/.openclaw/workspace/drafts/
  2. Presented to Stef in chat interface
  3. Wait for explicit "approved" or "send it"
  4. Send only after approval
  5. Log sent email

Approval triggers:

  • "Approved"
  • "Send it"
  • "Go ahead"
  • "Yes, send that"

NOT approved by:

  • "Looks good" (ambiguous)
  • "OK" (ambiguous)
  • Silence (never assume)

5. Migration Process

When moving communications between agents:

  1. Set up new agent email
  2. Forward thread to new agent email
  3. Send notification: "Future communications: [email protected]"
  4. Update contact information with external party
  5. Archive old agent's involvement

Example: Contabo migration from Ace to Lourens

  1. Create [email protected]
  2. Forward Contabo thread to Lourens
  3. Email Contabo: "Future updates: [email protected]"
  4. Ace focuses only on competitions

Testing Checklist

Sandbox Test

  • Configuration files created
  • Templates work correctly
  • Draft generation tested
  • Approval workflow simulated
  • No syntax errors

Production Test

  • Email account created
  • IMAP/SMTP connectivity
  • Send test email (to self)
  • Receive test email
  • Forwarding to [email protected] works
  • CC on sent emails works

Integration Test

  • Agent can access email
  • Draft creation works
  • Approval workflow functional
  • Sent emails logged
  • Error handling works

Error Handling

Common Issues

  1. IMAP connection failed: Check credentials, firewall, port
  2. SMTP rejected: Check authentication, port 587 vs 465
  3. Email not forwarding: Check hosting panel settings
  4. CC not working: Check email client configuration

Recovery Procedures

# Test IMAP
openssl s_client -connect mail.supplystoreafrica.com:993 -crlf

# Test SMTP
openssl s_client -connect mail.supplystoreafrica.com:587 -starttls smtp

# Check logs
tail -f /var/log/mail.log

Security

Credential Management

  • Store passwords in Bitwarden
  • Never hardcode in scripts
  • Use environment variables
  • Rotate passwords periodically

Access Control

  • Agents only access their own email
  • No cross-agent email access
  • All emails CC'd to human oversight
  • Sent items archived for audit

Monitoring

  • Failed login attempts logged
  • Unusual sending patterns flagged
  • Regular access review
  • Password rotation schedule

Maintenance

Daily

  • Check sent items logged
  • Verify forwarding working
  • Monitor for failed sends

Weekly

  • Review email logs
  • Check storage quotas
  • Update templates if needed

Monthly

  • Password rotation
  • Audit access logs
  • Review security settings

Related Skills

  • email-approval-workflow - Draft and approval process
  • gmail-gog-setup - Alternative email configuration
  • secure-secret-sharing - For credential sharing if needed
  • agent-lourens - Lourens-specific configuration
  • ace-competitions - Ace-specific configuration

Critical: Agent Knowledge Transfer Protocol

Issue Discovered (March 31, 2026): Facet reported "I have no skills, haven't learned anything yet"
Root Cause: Agents configured but had empty workspaces - no knowledge transfer

What MUST Be Transferred When Creating Agents

  1. Identity - Who they are (IDENTITY.md, SOUL.md)
  2. User Context - Who Stef is (USER.md)
  3. System Knowledge - What we've built (MEMORY.md, AGENTS.md)
  4. Skills & Learning - What they can do (skill-specific docs)
  5. Memory & History - What we've learned (memory/ files)
  6. Tool Access - read tool required to access workspace

Knowledge Transfer Procedure

# Run knowledge transfer script
python3 /root/.openclaw/workspace/setup_agent_knowledge.py --agent {agent_name}

# Verify transfer
ls -la /root/.openclaw/agents/{agent}/workspace/
cat /root/.openclaw/agents/{agent}/workspace/IDENTITY.md

Protocol Document

  • AGENT_TRANSFORMATION_PROTOCOL.md - Complete transfer procedure
  • setup_agent_knowledge.py - Automation script

Result: All agents (Lourens, Ace, Scout, Facet) now have complete knowledge and are proper assistants.

Lessons Learned

From Contabo Experience:

  1. Role confusion: Ace shouldn't handle infrastructure emails
  2. Email identity: Professional email addresses matter
  3. Approval workflow: Essential for external communications
  4. Migration planning: Need clear handover process

From Knowledge Transfer Issue:

  1. Empty workspaces: Agents need complete knowledge transfer
  2. Identity files: Must include IDENTITY.md, SOUL.md, USER.md
  3. System context: MEMORY.md and AGENTS.md essential
  4. Tool access: read tool required to access workspace files

Best Practices:

  1. Always sandbox test first
  2. Document configuration thoroughly
  3. Maintain role separation
  4. Human oversight on all external comms
  5. Regular security reviews
  6. Complete knowledge transfer for new agents
Usage Guidance
This skill mostly contains sensible steps for creating agent email accounts, but there are red flags you should address before using it: (1) It instructs creating and modifying files under /root/.openclaw and running unspecified sandbox scripts—insist on viewing those scripts (sandbox_lourens_email.py, test_email_workflow.py) and run them only in an isolated test environment. (2) It directs automatic forwarding and CC of every agent message to [email protected]—consider replacing that personal address with a team/shared mailbox or remove automatic forwarding to avoid leaking sensitive data. (3) The document references Bitwarden placeholders but does not request or describe how credentials are retrieved—decide and document an explicit, least-privilege method for secret retrieval. (4) Review and remove any hardcoded operational details you don't control (e.g., the Contabo IP) before deployment. Test fully in sandbox and require explicit human approval for any production changes to agent configs or tooling.
Capability Analysis
Type: OpenClaw Skill Name: agent-email-setup Version: 1.0.0 The skill bundle `agent-email-setup` (specifically `SKILL.md`) provides instructions for an AI agent to perform high-risk system modifications, including enabling network-capable tools (`email_send`, `email_check`) and modifying core configurations via `openclaw config set`. It requires writing configuration files to sensitive directories (`/root/.openclaw/`) and executing local Python scripts like `setup_agent_knowledge.py`. While the documentation emphasizes human-in-the-loop approval workflows and role separation, the hardcoded inclusion of specific external endpoints (e.g., `[email protected]`, `supplystoreafrica.com`, and IP `161.97.110.234`) and the requirement for broad system-level access constitute significant security risks without clear evidence of malicious intent.
Capability Assessment
Purpose & Capability
The skill's name and description (setting up dedicated agent email accounts and workflows) align with the SKILL.md content (address strategy, templates, approval workflow). However, the document hardcodes organizational choices that are not justified (always forwarding/auto-CC to [email protected]) and includes a specific external IP in a template (161.97.110.234), which are policy/privacy decisions beyond a generic 'how-to' and may not belong in a reusable skill.
Instruction Scope
The instructions tell the operator/agent to create files and run scripts under /root/.openclaw and /root/.openclaw/agents/{agent}/workspace (sandbox script path: /root/.openclaw/workspace/sandbox_lourens_email.py) and to run openclaw config commands to modify agent tool permissions. The skill did not declare any required config paths or elevated access, so these filesystem and config-modification instructions are out-of-band for a purely instruction-only skill and could cause unexpected changes if followed automatically.
Install Mechanism
There is no install spec and no code files—this is instruction-only, so nothing is written to disk by the skill itself. That lowers delivery risk, but the runtime instructions still direct filesystem and config changes.
Credentials
The SKILL.md references storing passwords in Bitwarden and uses a placeholder {{BITWARDEN_PASSWORD}} in examples but the skill declares no required environment variables or credentials. It also instructs forwarding all agent emails and CCing them to a single personal Gmail account ([email protected]), which centrally collects potentially sensitive messages and is a privacy/exfiltration risk. The skill's declared requirements do not reflect these sensitive touchpoints.
Persistence & Privilege
While the skill is not always:true and does not autonomously install code, its guidance modifies OpenClaw agent configuration (tools.allow additions) and writes agent-specific config under /root/.openclaw—actions that persistently change agent behavior and require appropriate privileges. Those persistent/config changes are not reflected in the skill metadata and increase blast radius if the instructions are followed automatically.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install agent-email-setup
  3. After installation, invoke the skill by name or use /agent-email-setup
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
agent-email-setup 1.0.0 - Introduces a standardized process for setting up dedicated email accounts for AI agents with clear workflow and role separation guidelines. - Details account creation, forwarding, and approval requirements to ensure all external agent emails are reviewed before sending. - Provides step-by-step checklists for sandbox testing, production deployment, and integration validation. - Outlines security, credential management, and monitoring best practices. - Includes migration process for transferring communications between agents and emphasizes documented knowledge transfer during agent creation. - Lists related skills for integration and cross-reference.
Metadata
Slug agent-email-setup
Version 1.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Agent Email Setup?

Set up dedicated email accounts for AI agents with proper workflows. Use when agents need external communications (Lourens for sysadmin, Ace for competitions... It is an AI Agent Skill for Claude Code / OpenClaw, with 77 downloads so far.

How do I install Agent Email Setup?

Run "/install agent-email-setup" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Agent Email Setup free?

Yes, Agent Email Setup is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Agent Email Setup support?

Agent Email Setup is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Agent Email Setup?

It is built and maintained by stefanferreira (@stefanferreira); the current version is v1.0.0.

💬 Comments