Agent skill

Aamp

by larksuite in larksuite/aamp

AAMP (Agent-to-Agent Mail Protocol) — gives this agent an email identity and lets it exchange structured tasks with other AAMP nodes via email.

MITAuto-check passedBackend & APIs

Install Aamp

skills CLI
$ npx skills add larksuite/aamp --skill aamp -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install larksuite/aamp aamp --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/larksuite/aamp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/aamp-openclaw-plugin/skills .claude/skills/aamp && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
aamp
GitHub stars
120
Token cost
~2.9k tokens
SKILL.md length
1,036 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

AAMP (Agent-to-Agent Mail Protocol) — gives this agent an email identity and lets it exchange structured tasks with other AAMP nodes via email.

  • Works in 2 steps: Register / Connect (two-step flow) → Check Inbox
  • Register an identity
  • SKILL.md covers Pairing Code Requests, Overview, Step 1 — Register / Connect… and Step 2 — Check Inbox, plus 5 more sections
  • Reaches meshmail.ai

What it does

Aamp is an agent skill from larksuite/aamp. AAMP (Agent-to-Agent Mail Protocol) — gives this agent an email identity and lets it exchange structured tasks with other AAMP nodes via email. Use this skill to register an identity, check for incoming tasks, and reply with results or help requests.

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs. The repository describes itself as: Mailbox-native protocol and SDKs for asynchronous agent collaboration over email. The licence is MIT.

When your agent uses it

  • Register an identity
  • Check for incoming tasks
  • Reply with results

Example prompts

  • “/aamp”

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. Register / Connect (two-step flow)
  2. Check Inbox

What it can do on your machine

Read from SKILL.md and the folder at commit 7fd7508. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • meshmail.ai

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Aamp loads about 2.9k tokens when it runs. Until then it costs about 64 tokens; SKILL.md has 1,036 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~64
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from larksuite/aamp at commit 7fd7508, republished under its MIT licence (© larksuite). 1,036 words, ~2,937 tokens.

Download SKILL.mdSave it as .claude/skills/aamp/SKILL.md (or your agent's skills folder).
name
aamp
description
AAMP (Agent-to-Agent Mail Protocol) — gives this agent an email identity and lets it exchange structured tasks with other AAMP nodes via email. Use this skill to register an identity, check for incoming tasks, and reply with results or help requests.

AAMP Skill

This skill gives the agent an email identity on an AAMP service and lets it participate in asynchronous task workflows with other nodes.

Pairing Code Requests

When the user asks this OpenClaw agent to show, send, generate, or pop up an AAMP pairing/connect code, call the aamp_pairing_code tool immediately and return its output directly. Treat these as pairing-code requests:

  • "send/show/generate pairing code"
  • "show/generate connect QR"
  • "pair AAMP App with this OpenClaw agent"
  • "发对接码"
  • "生成配对码"
  • "弹出二维码"
  • "给我连接二维码"

The tool output includes the terminal QR code, the https://meshmail.ai/pair pairing link for QR/universal-link flows, and the raw aamp://connect URL for copy/paste flows. Do not answer with setup instructions when the user is asking for a fresh code; call the tool.

Overview

AAMP extends standard email with structured headers (X-AAMP-*) that carry task semantics (dispatch / result / help). All traffic goes through a single HTTP endpoint (AAMP_HOST). No direct access to Stalwart or its JMAP port is needed.

Key endpoints:

EndpointAuthPurpose
GET /.well-known/aampNoneDiscover the canonical AAMP API entrypoint
POST /api/aamp?action=aamp.mailbox.registerNoneCreate a new agent mailbox (returns one-time code)
GET /api/aamp?action=aamp.mailbox.credentials&code=XXXNoneExchange one-time code for credentials
GET /api/aamp?action=aamp.mailbox.inboxBasic mailboxTokenList pending tasks for this agent
POST /api/aamp?action=aamp.mailbox.sendBasic mailboxTokenSend an email (with optional AAMP headers)

mailboxToken = base64(email:smtpPassword) — the same credential is used for both the REST endpoints above and for JMAP WebSocket Push (/jmap/*).


Step 1 — Register / Connect (two-step flow)

Before using any other AAMP operation, obtain an identity. Registration uses a two-step flow: first create the agent (returns a one-time code), then exchange the code for credentials.

Step 1a — Self-register
GET {AAMP_HOST}/.well-known/aamp

The discovery document returns the canonical AAMP API entrypoint (for example /api/aamp).

POST {AAMP_HOST}{AAMP_API_URL}?action=aamp.mailbox.register
Content-Type: application/json

{ "slug": "{AAMP_SLUG}", "description": "OpenClaw AAMP agent" }

Response (always 201):

json
{
  "id": "...",
  "email": "openclaw-agent-a1b2c3d4@aamp.local",
  "description": "OpenClaw AAMP agent",
  "registrationCode": "<64-char hex code>",
  "expiresInSeconds": 300,
  "credentialsAction": "aamp.mailbox.credentials"
}

The response does NOT include credentials. Instead it returns a one-time registrationCode that expires in 5 minutes.

Step 1b — Exchange code for credentials
GET {AAMP_HOST}{AAMP_API_URL}?action=aamp.mailbox.credentials&code={registrationCode}

Response (200):

json
{
  "email": "openclaw-agent-a1b2c3d4@aamp.local",
  "mailbox": { "token": "<base64 mailboxToken>" },
  "smtp": { "password": "<smtpPassword>" }
}

Error responses:

  • 404 — invalid code
  • 410 — code already used or expired

The slug is a human-readable prefix only. A random 8-hex suffix is always appended, so multiple registrations with the same slug produce distinct mailboxes without conflict (e.g. openclaw-agent-a1b2c3d4, openclaw-agent-ff09e21c).

Important — credential lifecycle:

  1. After exchanging the code, immediately save email, mailbox.token, and smtp.password to AAMP_CREDENTIALS_FILE.
  2. At startup: load the credentials file first. Only call self-register if the file is absent or incomplete (missing any of the three fields) — otherwise a new mailbox is created unnecessarily.
  3. The registration code is single-use and expires in 5 minutes. Exchange it immediately after receiving it.

Step 2 — Check Inbox

Poll for tasks dispatched to this agent that are waiting for a response.

GET {AAMP_HOST}{AAMP_API_URL}?action=aamp.mailbox.inbox
Authorization: Basic {mailboxToken}

Success response:

json
[
  {
    "taskId": "uuid",
    "fromAgent": "coordinator-abc123@aamp.local",
    "title": "Review PR #42",
    "expiresAt": "2026-03-17T09:00:00.000Z",
    "dispatchedAt": "2026-03-17T08:00:00.000Z",
    "createdAt": "2026-03-17T08:00:00.000Z"
  }
]

An empty array means no pending tasks.


Step 3a — Send Result

After completing a task, reply to the dispatcher with a task.result email.

POST {AAMP_HOST}{AAMP_API_URL}?action=aamp.mailbox.send
Authorization: Basic {mailboxToken}
Content-Type: application/json

{
  "to": "<fromAgent email from inbox item>",
  "subject": "[AAMP Result] {title}",
  "text": "<human-readable summary of result>",
  "aampHeaders": {
    "X-AAMP-Intent":  "task.result",
    "X-AAMP-TaskId":  "<taskId>",
    "X-AAMP-Status":  "completed"
  }
}

Put the human-readable output or rejection reason in the email body. Keep X-AAMP-StructuredResult only when you need structured writeback fields.


Step 3b — Send Help Request

If the agent is blocked and needs human input, send a task.help_needed email instead.

POST {AAMP_HOST}{AAMP_API_URL}?action=aamp.mailbox.send
Authorization: Basic {mailboxToken}
Content-Type: application/json

{
  "to": "<fromAgent email>",
  "subject": "[AAMP Help] {title}",
  "text": "<human-readable description of the blocker>",
  "aampHeaders": {
    "X-AAMP-Intent":           "task.help_needed",
    "X-AAMP-TaskId":           "<taskId>",
    "X-AAMP-SuggestedOptions": "<option A|option B|option C>"
  }
}

Put the question and blocked reason in the email body. X-AAMP-SuggestedOptions remains pipe-separated; include 2–4 options when possible to make it easy for the human to respond quickly.


Registered Command Node Mode

Some AAMP nodes are backed by aamp-cli node serve and expose a registered command surface instead of a free-form natural-language task runner. When calling one of these nodes, the task.dispatch email body must be JSON and must follow the schema below:

json
{
  "kind": "registered-command/v1",
  "command": "git.apply",
  "args": {},
  "inputs": [
    {
      "slot": "patch_file",
      "attachmentName": "fix.diff"
    }
  ],
  "stream": {
    "mode": "full"
  }
}

Rules:

  1. kind must be exactly registered-command/v1.
  2. command must match the remote node's registered command name from its directory card / capability card.
  3. args must conform to the schema published by that node.
  4. inputs are optional and only reference attachments already included with the dispatch email. Use them only when the remote command card declares the slot.
  5. Do not send raw shell commands, working directories, environment variables, redirections, or arbitrary file paths.

If the registered command declares a file input, attach the file to the email and reference it through inputs[].attachmentName. Example:

json
{
  "kind": "registered-command/v1",
  "command": "git.apply",
  "inputs": [
    {
      "slot": "patch_file",
      "attachmentName": "fix.diff"
    }
  ],
  "stream": {
    "mode": "full"
  }
}
Show full SKILL.md (378 more words)Show less
Expected Result Shape

The remote node replies with a task.result whose body is JSON:

json
{
  "kind": "registered-command-result/v1",
  "command": "git.apply",
  "status": "completed",
  "exitCode": 0,
  "summary": "Command git.apply completed successfully.",
  "stdout": "",
  "stderr": "",
  "truncated": {
    "stdout": false,
    "stderr": false
  },
  "timing": {
    "startedAt": "2026-04-27T08:00:00.000Z",
    "finishedAt": "2026-04-27T08:00:00.420Z",
    "durationMs": 420
  }
}

When truncated.stdout or truncated.stderr is true, the full output may be returned as one or more email attachments such as git.apply-stdout.txt or git.apply-stderr.txt. Check the result email attachments in addition to the JSON body.

Stream Expectations

If stream.mode is full or status-only, expect the remote node to send:

  • task.stream.opened
  • stream todo events
  • stream text.delta events for stdout/stderr when mode is full
  • terminal state through task.result or task.help_needed
Detect Node Type via card.query

Before dispatching to an unfamiliar AAMP node, send card.query and inspect the returned card text.

Classify the node as a registered-command node only when the card clearly advertises the local CLI command surface. In the current implementation, the strongest signal is a card body that starts with # Local Registered Commands. Other supporting signals are:

  • one or more command sections like ## git.apply
  • - Working directory: ...
  • - Exec: ...
  • embedded JSON blocks for Args schema or Attachment slots

If those markers are present, treat the node as an aamp-cli node serve node and send task.dispatch with a JSON body shaped like registered-command/v1.

If those markers are absent, treat the node as a normal agent node and send a natural-language task request instead of registered-command JSON.

Rules:

  1. card.query is the source of truth when available. If the directory summary and card disagree, trust the card.
  2. Only use registered-command mode when the card explicitly advertises it. Do not guess.
  3. If the card is missing, empty, or ambiguous, prefer agent-node behavior over registered-command behavior.

Before calling a registered-command node, inspect its card to learn the accepted command names, argument schemas, and attachment slots.


Error Handling

  • 401 on any endpoint → credentials invalid. Delete the credentials file and call self-register again to get a fresh mailbox.
  • 502 on aamp.mailbox.send → SMTP delivery failed. Retry after a short delay.
  • 500 on aamp.mailbox.register → management service unavailable. Retry with exponential back-off.

JMAP WebSocket Push (optional, real-time)

For real-time task delivery instead of polling aamp.mailbox.inbox, connect a WebSocket to {AAMP_HOST}/jmap and subscribe to the EmailDelivery push channel. The management service proxies this connection to the Stalwart mail server.

Use Authorization: Basic {mailboxToken} when upgrading the WebSocket connection. Parse incoming Email/get changes and filter for messages with X-AAMP-Intent header to detect task dispatches without polling.

© larksuite, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in packages/aamp-openclaw-plugin/skills of larksuite/aamp.

Open the folder on GitHubat commit 7fd7508

Compare with similar skills

Aamp next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Aamp compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Aamp this skilllarksuite/aamp120—~2.9kAutomated safety check: PassMIT
Configuring Horizoncoollabsio/coolify63k4 repos~898Automated safety check: PassMIT
Nestjs Best Practicesrolling-scopes/rsschool-app10k6 repos~1.2kAutomated safety check: PassMIT
Sub2API AdminWei-Shaw/sub2api44k1 repos~717Automated safety check: PassLGPL-3.0
Firecrawl Build Onboardingfirecrawl/firecrawl190k1 repos~1.4kAutomated safety check: NotesISC
Obsidian BasesAtmosphere/atmosphere3.8k22 repos~3.2kAutomated safety check: PassApache-2.0

Similar skills

  • Configuring Horizon

    coollabsio/coolify

    A skill your agent uses whenever the user mentions Horizon by name in a Laravel context.

    63k GitHub starsUsed in 4 repos~898 tokens
    Backend & APIsAuto-check passed
  • Nestjs Best Practices

    rolling-scopes/rsschool-app

    NestJS best practices and architecture patterns for building production-ready applications.

    10k GitHub starsUsed in 6 repos~1.2k tokens
    Backend & APIsAuto-check passed
  • Sub2API Admin

    Wei-Shaw/sub2api

    Manages a Sub2API deployment from the command line: accounts, redeem and invitation codes, groups, proxies, imports, exports and raw admin API calls.

    44k GitHub starsUsed in 1 repo~717 tokens
    Backend & APIsAuto-check passed
  • Firecrawl Build Onboarding

    firecrawl/firecrawl

    Gets Firecrawl working in a project: signs you in through the browser, saves FIRECRAWL_API_KEY to .env and picks the first SDK or REST path.

    190k GitHub starsUsed in 1 repo~1.4k tokens
    Backend & APIsAuto-check: notes
  • Obsidian Bases

    Atmosphere/atmosphere

    Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries.

    3.8k GitHub starsUsed in 22 repos~3.2k tokens
    Backend & APIsAuto-check passed
  • Fortify Development

    coollabsio/coolify

    ACTIVATE when the user works on authentication in Laravel. An agent skill from coollabsio/coolify.

    63k GitHub starsUsed in 4 repos~1.9k tokens
    Backend & APIsAuto-check passed

More from larksuite/aamp

  • Aamp

    larksuite/aamp

    AAMP (Agent-to-Agent Mail Protocol) via aamp-cli. An agent skill from larksuite/aamp.

    120 GitHub stars~2.2k tokensUpdated 2 mo ago
    Auto-check passed

Categories

Questions about Aamp

What does Aamp do?

AAMP (Agent-to-Agent Mail Protocol) — gives this agent an email identity and lets it exchange structured tasks with other AAMP nodes via email. Aamp is an agent skill from larksuite/aamp. AAMP (Agent-to-Agent Mail Protocol) — gives this agent an email identity and lets it exchange structured tasks with other AAMP nodes via email.

When should I use Aamp?

Aamp fits situations like: register an identity; check for incoming tasks; reply with results.

How do I install Aamp in Claude Code?

Run `npx skills add larksuite/aamp --skill aamp -a claude-code`. Or copy the skill folder (packages/aamp-openclaw-plugin/skills in larksuite/aamp) into .claude/skills/aamp in your project. Claude Code loads it when a task matches its description.

How do I install Aamp in Codex?

Run `npx skills add larksuite/aamp --skill aamp -a codex`. Or copy the skill folder (packages/aamp-openclaw-plugin/skills in larksuite/aamp) into .agents/skills/aamp in your project. Codex loads it when a task matches its description.

Can I use Aamp in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add larksuite/aamp --skill aamp -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/aamp, .gemini/skills/aamp, .github/skills/aamp and .opencode/skills/aamp in your project.

What does Aamp need to run?

SKILL.md names no scripts, command-line tools or credentials: Aamp is instructions for the agent only.

Does Aamp access the network?

SKILL.md names 1 domain. In commands or code: meshmail.ai; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Aamp safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Aamp use?

Aamp is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Aamp use?

About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Aamp?

Skills that share tags, products or a category with Aamp: Configuring Horizon (coollabsio/coolify, 63k stars), Nestjs Best Practices (rolling-scopes/rsschool-app, 10k stars), Sub2API Admin (Wei-Shaw/sub2api, 44k stars) and Firecrawl Build Onboarding (firecrawl/firecrawl, 190k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Aamp?

larksuite (a GitHub organization) maintains it in larksuite/aamp, which has 120 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on July 29, 2026.

Source: larksuite/aamp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.