{"id":"c19dfaaa-48ea-4ef2-80af-8d8cb4e9d7d8","shortId":"tZmDBN","kind":"skill","title":"agentmail","tagline":"Email infrastructure for AI agents. Create accounts, send/receive emails, manage webhooks, and check karma balance via the AgentMail API.","description":"# AgentMail — Email for AI Agents\n\nAgentMail gives AI agents real email addresses (`@theagentmail.net`) with a REST API. Agents can send and receive email, sign up for services (GitHub, AWS, Slack, etc.), and get verification codes. A karma system prevents spam and keeps the shared domain's reputation high.\n\nBase URL: `https://api.theagentmail.net`\n\n## When to Use\n- An AI agent needs a real inbox/outbox for signups, verification flows, or transactional communication.\n- You need to provision AgentMail accounts, send messages, read inbox contents, or register inbound webhooks.\n- You need to monitor karma usage or wire email events into agent automation.\n\n## Quick start\n\nAll requests require `Authorization: Bearer am_...` header (API key from dashboard).\n\n### Create an email account (-10 karma)\n\n```bash\ncurl -X POST https://api.theagentmail.net/v1/accounts \\\n  -H \"Authorization: Bearer am_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"address\": \"my-agent@theagentmail.net\"}'\n```\n\nResponse: `{\"data\": {\"id\": \"...\", \"address\": \"my-agent@theagentmail.net\", \"displayName\": null, \"createdAt\": 123}}`\n\n### Send email (-1 karma)\n\n```bash\ncurl -X POST https://api.theagentmail.net/v1/accounts/{accountId}/messages \\\n  -H \"Authorization: Bearer am_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"to\": [\"recipient@example.com\"],\n    \"subject\": \"Hello from my agent\",\n    \"text\": \"Plain text body\",\n    \"html\": \"<p>Optional HTML body</p>\"\n  }'\n```\n\nOptional fields: `cc`, `bcc` (string arrays), `inReplyTo`, `references` (strings for threading), `attachments` (array of `{filename, contentType, content}` where content is base64).\n\n### Read inbox\n\n```bash\n# List messages\ncurl https://api.theagentmail.net/v1/accounts/{accountId}/messages \\\n  -H \"Authorization: Bearer am_...\"\n\n# Get full message (with body and attachments)\ncurl https://api.theagentmail.net/v1/accounts/{accountId}/messages/{messageId} \\\n  -H \"Authorization: Bearer am_...\"\n```\n\n### Check karma\n\n```bash\ncurl https://api.theagentmail.net/v1/karma \\\n  -H \"Authorization: Bearer am_...\"\n```\n\nResponse: `{\"data\": {\"balance\": 90, \"events\": [...]}}`\n\n### Register webhook (real-time inbound)\n\n```bash\ncurl -X POST https://api.theagentmail.net/v1/accounts/{accountId}/webhooks \\\n  -H \"Authorization: Bearer am_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"url\": \"https://my-agent.example.com/inbox\"}'\n```\n\nWebhook deliveries include two security headers:\n- `X-AgentMail-Signature` -- HMAC-SHA256 hex digest of the request body, signed with the webhook secret\n- `X-AgentMail-Timestamp` -- millisecond timestamp of when the delivery was sent\n\nVerify the signature and reject requests with timestamps older than 5 minutes to prevent replay attacks:\n\n```typescript\nimport { createHmac } from \"crypto\";\n\nconst verifyWebhook = (body: string, signature: string, timestamp: string, secret: string) => {\n  if (Date.now() - Number(timestamp) > 5 * 60 * 1000) return false;\n  return createHmac(\"sha256\", secret).update(body).digest(\"hex\") === signature;\n};\n```\n\n### Download attachment\n\n```bash\ncurl https://api.theagentmail.net/v1/accounts/{accountId}/messages/{messageId}/attachments/{attachmentId} \\\n  -H \"Authorization: Bearer am_...\"\n```\n\nReturns `{\"data\": {\"url\": \"https://signed-download-url...\"}}`.\n\n## Full API reference\n\n| Method | Path | Description | Karma |\n|--------|------|-------------|-------|\n| POST | `/v1/accounts` | Create email account | -10 |\n| GET | `/v1/accounts` | List all accounts | |\n| GET | `/v1/accounts/:id` | Get account details | |\n| DELETE | `/v1/accounts/:id` | Delete account | +10 |\n| POST | `/v1/accounts/:id/messages` | Send email | -1 |\n| GET | `/v1/accounts/:id/messages` | List messages | |\n| GET | `/v1/accounts/:id/messages/:msgId` | Get full message | |\n| GET | `/v1/accounts/:id/messages/:msgId/attachments/:attId` | Get attachment URL | |\n| POST | `/v1/accounts/:id/webhooks` | Register webhook | |\n| GET | `/v1/accounts/:id/webhooks` | List webhooks | |\n| DELETE | `/v1/accounts/:id/webhooks/:whId` | Delete webhook | |\n| GET | `/v1/karma` | Get balance + events | |\n\n## Karma system\n\nEvery action has a karma cost or reward:\n\n| Event | Karma | Why |\n|---|---|---|\n| `money_paid` | +100 | Purchase credits |\n| `email_received` | +2 | Someone replied from a trusted domain |\n| `account_deleted` | +10 | Karma refunded when you delete an address |\n| `email_sent` | -1 | Sending costs karma |\n| `account_created` | -10 | Creating addresses costs karma |\n\n**Important rules:**\n- Karma is only awarded for inbound emails from trusted providers (Gmail, Outlook, Yahoo, iCloud, ProtonMail, Fastmail, Hey, etc.). Emails from unknown/throwaway domains don't earn karma.\n- You only earn karma once per sender until the agent replies. If sender X emails you 5 times without a reply, only the first earns karma. Reply to X, and the next email from X earns karma again.\n- Deleting an account refunds the 10 karma it cost to create.\n\nWhen karma reaches 0, sends and account creation return HTTP 402. Always check balance before operations that cost karma.\n\n## TypeScript SDK\n\n```typescript\nimport { createClient } from \"@agentmail/sdk\";\n\nconst mail = createClient({ apiKey: \"am_...\" });\n\n// Create account\nconst account = await mail.accounts.create({\n  address: \"my-agent@theagentmail.net\",\n});\n\n// Send email\nawait mail.messages.send(account.id, {\n  to: [\"human@example.com\"],\n  subject: \"Hello\",\n  text: \"Sent by an AI agent.\",\n});\n\n// Read inbox\nconst messages = await mail.messages.list(account.id);\nconst detail = await mail.messages.get(account.id, messages[0].id);\n\n// Attachments\nconst att = await mail.attachments.getUrl(accountId, messageId, attachmentId);\n// att.url is a signed download URL\n\n// Webhooks\nawait mail.webhooks.create(account.id, {\n  url: \"https://my-agent.example.com/inbox\",\n});\n\n// Karma\nconst karma = await mail.karma.getBalance();\nconsole.log(karma.balance);\n```\n\n## Error handling\n\n```typescript\nimport { AgentMailError } from \"@agentmail/sdk\";\n\ntry {\n  await mail.messages.send(accountId, { to: [\"a@b.com\"], subject: \"Hi\", text: \"Hey\" });\n} catch (e) {\n  if (e instanceof AgentMailError) {\n    console.log(e.status);   // 402, 404, 401, etc.\n    console.log(e.code);     // \"INSUFFICIENT_KARMA\", \"NOT_FOUND\", etc.\n    console.log(e.message);\n  }\n}\n```\n\n## Common patterns\n\n### Sign up for a service and read verification email\n\n```typescript\nconst account = await mail.accounts.create({\n  address: \"signup-bot@theagentmail.net\",\n});\n\n// Use the address to sign up (browser automation, API, etc.)\n\n// Poll for verification email\nfor (let i = 0; i < 30; i++) {\n  const messages = await mail.messages.list(account.id);\n  const verification = messages.find(m =>\n    m.subject.toLowerCase().includes(\"verify\") ||\n    m.subject.toLowerCase().includes(\"confirm\")\n  );\n  if (verification) {\n    const detail = await mail.messages.get(account.id, verification.id);\n    // Parse verification link/code from detail.bodyText or detail.bodyHtml\n    break;\n  }\n  await new Promise(r => setTimeout(r, 2000));\n}\n```\n\n### Send email and wait for reply\n\n```typescript\nconst sent = await mail.messages.send(account.id, {\n  to: [\"human@company.com\"],\n  subject: \"Question about order #12345\",\n  text: \"Can you check the status?\",\n});\n\nfor (let i = 0; i < 60; i++) {\n  const messages = await mail.messages.list(account.id);\n  const reply = messages.find(m =>\n    m.direction === \"inbound\" && m.timestamp > sent.timestamp\n  );\n  if (reply) {\n    const detail = await mail.messages.get(account.id, reply.id);\n    // Process reply\n    break;\n  }\n  await new Promise(r => setTimeout(r, 5000));\n}\n```\n\n## Types\n\n```typescript\ntype Account = { id: string; address: string; displayName: string | null; createdAt: number };\ntype Message = { id: string; from: string; to: string[]; subject: string; direction: \"inbound\" | \"outbound\"; status: string; timestamp: number };\ntype MessageDetail = Message & { cc: string[] | null; bcc: string[] | null; bodyText: string | null; bodyHtml: string | null; inReplyTo: string | null; references: string | null; attachments: AttachmentMeta[] };\ntype AttachmentMeta = { id: string; filename: string; contentType: string; size: number };\ntype KarmaBalance = { balance: number; events: KarmaEvent[] };\ntype KarmaEvent = { id: string; type: string; amount: number; timestamp: number; metadata?: Record<string, unknown> };\n```\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.","tags":["agentmail","antigravity","awesome","skills","sickn33","agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity-skills"],"capabilities":["skill","source-sickn33","skill-agentmail","topic-agent-skills","topic-agentic-skills","topic-ai-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workflows","topic-antigravity","topic-antigravity-skills","topic-claude-code","topic-claude-code-skills","topic-codex-cli","topic-codex-skills"],"categories":["antigravity-awesome-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/agentmail","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sickn33/antigravity-awesome-skills","source_repo":"https://github.com/sickn33/antigravity-awesome-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 34997 github stars · SKILL.md body (8,695 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-25T06:50:23.563Z","embedding":null,"createdAt":"2026-04-18T21:30:34.575Z","updatedAt":"2026-04-25T06:50:23.563Z","lastSeenAt":"2026-04-25T06:50:23.563Z","tsv":"'+10':438,515 '+100':501 '+2':506 '-1':166,444,525 '-10':134,421,531 '/attachments':396 '/inbox':300,703 '/messages':176,233,250,394 '/v1/accounts':142,417,423,428,434,440,446,451,458,466,471,476 '/v1/accounts/':174,231,248,284,392 '/v1/karma':262,482 '/webhooks':286 '0':616,680,784,854 '10':607 '1000':374 '123':163 '12345':844 '2000':825 '30':786 '401':738 '402':623,736 '404':737 '5':347,372,580 '5000':888 '60':373,856 '90':270 'a@b.com':723 'account':8,94,133,420,426,431,437,513,529,604,619,645,647,762,892 'account.id':656,673,678,699,792,809,837,862,877 'accountid':175,232,249,285,393,687,721 'action':489 'address':32,153,158,522,533,650,765,769,895 'agent':6,25,29,38,77,115,193,573,666 'agentmail':1,19,21,26,93,309,327 'agentmail/sdk':638,717 'agentmailerror':715,733 'ai':5,24,28,76,665 'alway':624 'amount':964 'api':20,37,126,410,775 'api.theagentmail.net':71,141,173,230,247,261,283,391 'api.theagentmail.net/v1/accounts':140 'api.theagentmail.net/v1/accounts/':172,229,246,282,390 'api.theagentmail.net/v1/karma':260 'apikey':642 'application/json':151,185,295 'array':207,214 'ask':1005 'att':684 'att.url':690 'attach':213,244,387,463,682,940 'attachmentid':397,689 'attachmentmeta':941,943 'attack':352 'attid':461 'author':122,144,178,235,253,264,288,399 'autom':116,774 'aw':49 'await':648,654,671,676,685,697,707,719,763,790,807,819,835,860,875,882 'award':541 'balanc':16,269,484,626,954 'base':69 'base64':222 'bash':136,168,225,258,278,388 'bcc':205,925 'bearer':123,145,179,236,254,265,289,400 'bodi':197,201,242,319,360,382 'bodyhtml':931 'bodytext':928 'boundari':1013 'break':818,881 'browser':773 'catch':728 'cc':204,922 'check':14,256,625,848 'clarif':1007 'clear':980 'code':55 'common':749 'communic':88 'confirm':802 'console.log':709,734,740,747 'const':358,639,646,669,674,683,705,761,788,793,805,833,858,863,873 'content':99,149,183,218,220,293 'content-typ':148,182,292 'contenttyp':217,948 'cost':493,527,534,610,630 'creat':7,130,418,530,532,612,644 'createcli':636,641 'createdat':162,900 'createhmac':355,378 'creation':620 'credit':503 'criteria':1016 'crypto':357 'curl':137,169,228,245,259,279,389 'd':152,186,296 'dashboard':129 'data':156,268,403 'date.now':369 'delet':433,436,475,479,514,520,602 'deliveri':302,334 'describ':984 'descript':414 'detail':432,675,806,874 'detail.bodyhtml':817 'detail.bodytext':815 'digest':315,383 'direct':912 'displaynam':160,897 'domain':65,512,559 'download':386,407,694 'e':729,731 'e.code':741 'e.message':748 'e.status':735 'earn':562,566,588,599 'email':2,10,22,31,43,112,132,165,419,443,504,523,544,556,578,596,653,759,780,827 'environ':996 'environment-specif':995 'error':711 'etc':51,555,739,746,776 'event':113,271,485,496,956 'everi':488 'expert':1001 'fals':376 'fastmail':553 'field':203 'filenam':216,946 'first':587 'flow':85 'found':745 'full':239,409,455 'get':53,238,422,427,430,445,450,454,457,462,470,481,483 'github':48 'give':27 'gmail':548 'h':143,147,177,181,234,252,263,287,291,398 'handl':712 'header':125,306 'hello':190,660 'hex':314,384 'hey':554,727 'hi':725 'high':68 'hmac':312 'hmac-sha256':311 'html':198,200 'http':622 'human@company.com':839 'human@example.com':658 'icloud':551 'id':157,429,435,681,893,904,944,960 'id/messages':441,447,452,459 'id/webhooks':467,472,477 'import':354,536,635,714 'inbound':102,277,543,868,913 'inbox':98,224,668 'inbox/outbox':81 'includ':303,798,801 'infrastructur':3 'input':1010 'inreplyto':208,934 'instanceof':732 'insuffici':742 'karma':15,57,108,135,167,257,415,486,492,497,516,528,535,538,563,567,589,600,608,614,631,704,706,743 'karma.balance':710 'karmabal':953 'karmaev':957,959 'keep':62 'key':127 'let':782,852 'limit':972 'link/code':813 'list':226,424,448,473 'm':796,866 'm.direction':867 'm.subject.tolowercase':797,800 'm.timestamp':869 'mail':640 'mail.accounts.create':649,764 'mail.attachments.geturl':686 'mail.karma.getbalance':708 'mail.messages.get':677,808,876 'mail.messages.list':672,791,861 'mail.messages.send':655,720,836 'mail.webhooks.create':698 'manag':11 'match':981 'messag':96,227,240,449,456,670,679,789,859,903,921 'messagedetail':920 'messageid':251,395,688 'messages.find':795,865 'metadata':968 'method':412 'millisecond':329 'minut':348 'miss':1018 'money':499 'monitor':107 'msgid':453 'msgid/attachments':460 'my-agent.example.com':299,702 'my-agent.example.com/inbox':298,701 'my-agent@theagentmail.net':154,159,651 'need':78,90,105 'new':820,883 'next':595 'null':161,899,924,927,930,933,936,939 'number':370,901,918,951,955,965,967 'older':345 'oper':628 'option':199,202 'order':843 'outbound':914 'outlook':549 'output':990 'paid':500 'pars':811 'path':413 'pattern':750 'per':569 'permiss':1011 'plain':195 'poll':777 'post':139,171,281,416,439,465 'prevent':59,350 'process':879 'promis':821,884 'protonmail':552 'provid':547 'provis':92 'purchas':502 'question':841 'quick':117 'r':822,824,885,887 'reach':615 'read':97,223,667,757 'real':30,80,275 'real-tim':274 'receiv':42,505 'recipient@example.com':188 'record':969 'refer':209,411,937 'refund':517,605 'regist':101,272,468 'reject':341 'replay':351 'repli':508,574,584,590,831,864,872,880 'reply.id':878 'reput':67 'request':120,318,342 'requir':121,1009 'respons':155,267 'rest':36 'return':375,377,402,621 'review':1002 'reward':495 'rule':537 'safeti':1012 'scope':983 'sdk':633 'secret':324,366,380 'secur':305 'send':40,95,164,442,526,617,652,826 'send/receive':9 'sender':570,576 'sent':336,524,662,834 'sent.timestamp':870 'servic':47,755 'settimeout':823,886 'sha256':313,379 'share':64 'sign':44,320,406,693,751,771 'signatur':310,339,362,385 'signed-download-url':405 'signup':83 'signup-bot@theagentmail.net':766 'size':950 'skill':975 'skill-agentmail' 'slack':50 'someon':507 'source-sickn33' 'spam':60 'specif':997 'start':118 'status':850,915 'stop':1003 'string':206,210,361,363,365,367,894,896,898,905,907,909,911,916,923,926,929,932,935,938,945,947,949,961,963,970 'subject':189,659,724,840,910 'substitut':993 'success':1015 'system':58,487 'task':979 'test':999 'text':194,196,661,726,845 'theagentmail.net':33 'thread':212 'time':276,581 'timestamp':328,330,344,364,371,917,966 'topic-agent-skills' 'topic-agentic-skills' 'topic-ai-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workflows' 'topic-antigravity' 'topic-antigravity-skills' 'topic-claude-code' 'topic-claude-code-skills' 'topic-codex-cli' 'topic-codex-skills' 'transact':87 'treat':988 'tri':718 'trust':511,546 'two':304 'type':150,184,294,889,891,902,919,942,952,958,962 'typescript':353,632,634,713,760,832,890 'unknown':971 'unknown/throwaway':558 'updat':381 'url':70,297,404,408,464,695,700 'usag':109 'use':74,767,973 'valid':998 'verif':54,84,758,779,794,804,812 'verifi':337,799 'verification.id':810 'verifywebhook':359 'via':17 'wait':829 'webhook':12,103,273,301,323,469,474,480,696 'whid':478 'wire':111 'without':582 'x':138,170,280,308,326,577,592,598 'x-agentmail-signatur':307 'x-agentmail-timestamp':325 'yahoo':550","prices":[{"id":"6daba914-2d8a-4747-a273-92bf822a8e74","listingId":"c19dfaaa-48ea-4ef2-80af-8d8cb4e9d7d8","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sickn33","category":"antigravity-awesome-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T21:30:34.575Z"}],"sources":[{"listingId":"c19dfaaa-48ea-4ef2-80af-8d8cb4e9d7d8","source":"github","sourceId":"sickn33/antigravity-awesome-skills/agentmail","sourceUrl":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/agentmail","isPrimary":false,"firstSeenAt":"2026-04-18T21:30:34.575Z","lastSeenAt":"2026-04-25T06:50:23.563Z"}],"details":{"listingId":"c19dfaaa-48ea-4ef2-80af-8d8cb4e9d7d8","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sickn33","slug":"agentmail","github":{"repo":"sickn33/antigravity-awesome-skills","stars":34997,"topics":["agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity","antigravity-skills","claude-code","claude-code-skills","codex-cli","codex-skills","cursor","cursor-skills","developer-tools","gemini-cli","gemini-skills","kiro","mcp","skill-library"],"license":"mit","html_url":"https://github.com/sickn33/antigravity-awesome-skills","pushed_at":"2026-04-25T06:33:17Z","description":"Installable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.","skill_md_sha":"d3b2f2eee722c64d9708334f67e9d7e478683a50","skill_md_path":"skills/agentmail/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/agentmail"},"layout":"multi","source":"github","category":"antigravity-awesome-skills","frontmatter":{"name":"agentmail","description":"Email infrastructure for AI agents. Create accounts, send/receive emails, manage webhooks, and check karma balance via the AgentMail API."},"skills_sh_url":"https://skills.sh/sickn33/antigravity-awesome-skills/agentmail"},"updatedAt":"2026-04-25T06:50:23.563Z"}}