Skip to main content

Get started

1

Install the CLI

2

Run setup

Signs you in, asks for a mailbox name, and lets you pick a usage mode (see below). Pass --api-key om_... to skip the browser.
3

Verify

Your agent can now send and receive email.

Usage modes

During setup you choose how the agent handles inbound email. Pass --mode to skip the prompt. notify and channel install a WebSocket bridge that pushes new email to the agent in real time. tool skips the bridge entirely.

Installed files

openmail setup writes three files into ~/.openclaw (override with OPENCLAW_HOME). Together they give the agent credentials, instructions, and config.

1. skills/openmail/SKILL.md

The skill file is the main instruction set the agent reads. Full contents:

2. openmail.env

Credentials and inbox metadata, loaded by the OpenClaw runtime automatically.

3. openclaw.json (merged)

Setup merges OpenMail into the existing openclaw.json. The relevant sections:
The skills.entries.openmail block registers the skill and injects env vars. The hooks.mappings entry routes inbound email notifications from the WebSocket bridge to the agent.

WebSocket bridge

When usage mode is notify or channel, setup also starts a WebSocket bridge that delivers inbound email to the OpenClaw hook endpoint — no public URL needed. If no service manager is available, setup runs the bridge as a background process or prints a manual command. For protocol details, see WebSockets and the WebSocket quickstart.