agentmail 0.2.8 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/inboxes/client/Client.js +4 -6
- package/dist/cjs/api/resources/websockets/client/Client.d.ts +2 -0
- package/dist/cjs/api/resources/websockets/client/Client.js +2 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/inboxes/client/Client.mjs +4 -6
- package/dist/esm/api/resources/websockets/client/Client.d.mts +2 -0
- package/dist/esm/api/resources/websockets/client/Client.mjs +2 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms-full.txt +415 -0
- package/dist/llms.txt +2 -0
- package/package.json +1 -1
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "agentmail",
|
|
46
|
-
"X-Fern-SDK-Version": "0.2.
|
|
47
|
-
"User-Agent": "agentmail/0.2.
|
|
46
|
+
"X-Fern-SDK-Version": "0.2.9",
|
|
47
|
+
"User-Agent": "agentmail/0.2.9",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -214,12 +214,10 @@ class InboxesClient {
|
|
|
214
214
|
contentType: "application/json",
|
|
215
215
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
216
216
|
requestType: "json",
|
|
217
|
-
body: request
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
})
|
|
222
|
-
: undefined,
|
|
217
|
+
body: serializers.inboxes.create.Request.jsonOrThrow(request, {
|
|
218
|
+
unrecognizedObjectKeys: "strip",
|
|
219
|
+
omitUndefined: true,
|
|
220
|
+
}),
|
|
223
221
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
224
222
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
225
223
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -5,6 +5,8 @@ export declare namespace WebsocketsClient {
|
|
|
5
5
|
type Options = BaseClientOptions;
|
|
6
6
|
interface ConnectArgs {
|
|
7
7
|
authToken?: string;
|
|
8
|
+
/** Additional query parameters to send with the websocket connect request. */
|
|
9
|
+
queryParams?: Record<string, unknown>;
|
|
8
10
|
/** Arbitrary headers to send with the websocket connect request. */
|
|
9
11
|
headers?: Record<string, string>;
|
|
10
12
|
/** Enable debug mode on the websocket. Defaults to false. */
|
|
@@ -56,7 +56,7 @@ class WebsocketsClient {
|
|
|
56
56
|
connect() {
|
|
57
57
|
return __awaiter(this, arguments, void 0, function* (args = {}) {
|
|
58
58
|
var _a, _b;
|
|
59
|
-
const { authToken, headers, debug, reconnectAttempts } = args;
|
|
59
|
+
const { authToken, queryParams, headers, debug, reconnectAttempts } = args;
|
|
60
60
|
const _queryParams = {
|
|
61
61
|
auth_token: authToken,
|
|
62
62
|
};
|
|
@@ -65,7 +65,7 @@ class WebsocketsClient {
|
|
|
65
65
|
const socket = new core.ReconnectingWebSocket({
|
|
66
66
|
url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production).websockets, "/v0"),
|
|
67
67
|
protocols: [],
|
|
68
|
-
queryParameters: _queryParams,
|
|
68
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), queryParams),
|
|
69
69
|
headers: _headers,
|
|
70
70
|
options: { debug: debug !== null && debug !== void 0 ? debug : false, maxRetries: reconnectAttempts !== null && reconnectAttempts !== void 0 ? reconnectAttempts : 30 },
|
|
71
71
|
});
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.2.
|
|
1
|
+
export declare const SDK_VERSION = "0.2.9";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "agentmail",
|
|
9
|
-
"X-Fern-SDK-Version": "0.2.
|
|
10
|
-
"User-Agent": "agentmail/0.2.
|
|
9
|
+
"X-Fern-SDK-Version": "0.2.9",
|
|
10
|
+
"User-Agent": "agentmail/0.2.9",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -178,12 +178,10 @@ export class InboxesClient {
|
|
|
178
178
|
contentType: "application/json",
|
|
179
179
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
180
180
|
requestType: "json",
|
|
181
|
-
body: request
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
})
|
|
186
|
-
: undefined,
|
|
181
|
+
body: serializers.inboxes.create.Request.jsonOrThrow(request, {
|
|
182
|
+
unrecognizedObjectKeys: "strip",
|
|
183
|
+
omitUndefined: true,
|
|
184
|
+
}),
|
|
187
185
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
188
186
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
189
187
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -5,6 +5,8 @@ export declare namespace WebsocketsClient {
|
|
|
5
5
|
type Options = BaseClientOptions;
|
|
6
6
|
interface ConnectArgs {
|
|
7
7
|
authToken?: string;
|
|
8
|
+
/** Additional query parameters to send with the websocket connect request. */
|
|
9
|
+
queryParams?: Record<string, unknown>;
|
|
8
10
|
/** Arbitrary headers to send with the websocket connect request. */
|
|
9
11
|
headers?: Record<string, string>;
|
|
10
12
|
/** Enable debug mode on the websocket. Defaults to false. */
|
|
@@ -20,7 +20,7 @@ export class WebsocketsClient {
|
|
|
20
20
|
connect() {
|
|
21
21
|
return __awaiter(this, arguments, void 0, function* (args = {}) {
|
|
22
22
|
var _a, _b;
|
|
23
|
-
const { authToken, headers, debug, reconnectAttempts } = args;
|
|
23
|
+
const { authToken, queryParams, headers, debug, reconnectAttempts } = args;
|
|
24
24
|
const _queryParams = {
|
|
25
25
|
auth_token: authToken,
|
|
26
26
|
};
|
|
@@ -29,7 +29,7 @@ export class WebsocketsClient {
|
|
|
29
29
|
const socket = new core.ReconnectingWebSocket({
|
|
30
30
|
url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production).websockets, "/v0"),
|
|
31
31
|
protocols: [],
|
|
32
|
-
queryParameters: _queryParams,
|
|
32
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), queryParams),
|
|
33
33
|
headers: _headers,
|
|
34
34
|
options: { debug: debug !== null && debug !== void 0 ? debug : false, maxRetries: reconnectAttempts !== null && reconnectAttempts !== void 0 ? reconnectAttempts : 30 },
|
|
35
35
|
});
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.2.
|
|
1
|
+
export declare const SDK_VERSION = "0.2.9";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.2.
|
|
1
|
+
export const SDK_VERSION = "0.2.9";
|
package/dist/llms-full.txt
CHANGED
|
@@ -1516,6 +1516,143 @@ Pod: "Marketing-Agent"
|
|
|
1516
1516
|
* Explore [Domains](/custom-domains) to set up custom email domains for your pods
|
|
1517
1517
|
|
|
1518
1518
|
|
|
1519
|
+
# Skills
|
|
1520
|
+
|
|
1521
|
+
> AgentMail's official skill for Moltbot, Claude Code, Cursor, and other AI assistants
|
|
1522
|
+
|
|
1523
|
+
## Getting started
|
|
1524
|
+
|
|
1525
|
+
AgentMail provides an official skill that can be installed on AI coding assistants and agents that support the [AgentSkills](https://skills.sh) format. This includes Moltbot, Claude Code, Cursor, Codex, and other compatible tools.
|
|
1526
|
+
|
|
1527
|
+
The skill is available at [skills.sh/agentmail-to/agentmail-skills/agentmail](https://skills.sh/agentmail-to/agentmail-skills/agentmail).
|
|
1528
|
+
|
|
1529
|
+
## Installation
|
|
1530
|
+
|
|
1531
|
+
### Moltbot
|
|
1532
|
+
|
|
1533
|
+
Install the skill using the Moltbot CLI:
|
|
1534
|
+
|
|
1535
|
+
```bash
|
|
1536
|
+
moltbot skills install agentmail-to/agentmail-skills/agentmail
|
|
1537
|
+
```
|
|
1538
|
+
|
|
1539
|
+
Or install via ClawdHub:
|
|
1540
|
+
|
|
1541
|
+
```bash
|
|
1542
|
+
clawdhub install agentmail
|
|
1543
|
+
```
|
|
1544
|
+
|
|
1545
|
+
### Claude Code
|
|
1546
|
+
|
|
1547
|
+
Add the skill to your Claude Code configuration:
|
|
1548
|
+
|
|
1549
|
+
```bash
|
|
1550
|
+
claude-code skills install agentmail-to/agentmail-skills/agentmail
|
|
1551
|
+
```
|
|
1552
|
+
|
|
1553
|
+
### Cursor
|
|
1554
|
+
|
|
1555
|
+
Install the skill in Cursor:
|
|
1556
|
+
|
|
1557
|
+
```bash
|
|
1558
|
+
cursor skills install agentmail-to/agentmail-skills/agentmail
|
|
1559
|
+
```
|
|
1560
|
+
|
|
1561
|
+
### Manual installation
|
|
1562
|
+
|
|
1563
|
+
You can also manually clone the skill repository:
|
|
1564
|
+
|
|
1565
|
+
```bash
|
|
1566
|
+
git clone https://github.com/agentmail-to/agentmail-skills.git ~/.skills/agentmail
|
|
1567
|
+
```
|
|
1568
|
+
|
|
1569
|
+
## Configuration
|
|
1570
|
+
|
|
1571
|
+
After installation, configure your AgentMail API key. The method varies by platform:
|
|
1572
|
+
|
|
1573
|
+
### Environment variable
|
|
1574
|
+
|
|
1575
|
+
Set the `AGENTMAIL_API_KEY` environment variable:
|
|
1576
|
+
|
|
1577
|
+
```bash
|
|
1578
|
+
export AGENTMAIL_API_KEY="your-api-key-here"
|
|
1579
|
+
```
|
|
1580
|
+
|
|
1581
|
+
### Moltbot configuration
|
|
1582
|
+
|
|
1583
|
+
Add the API key to `~/.clawdbot/moltbot.json`:
|
|
1584
|
+
|
|
1585
|
+
```json
|
|
1586
|
+
{
|
|
1587
|
+
"skills": {
|
|
1588
|
+
"entries": {
|
|
1589
|
+
"agentmail": {
|
|
1590
|
+
"enabled": true,
|
|
1591
|
+
"env": {
|
|
1592
|
+
"AGENTMAIL_API_KEY": "your-api-key-here"
|
|
1593
|
+
}
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
```
|
|
1599
|
+
|
|
1600
|
+
Get your API key from the [AgentMail Console](https://console.agentmail.to).
|
|
1601
|
+
|
|
1602
|
+
## Features
|
|
1603
|
+
|
|
1604
|
+
The official AgentMail skill provides comprehensive email functionality:
|
|
1605
|
+
|
|
1606
|
+
### Inboxes
|
|
1607
|
+
|
|
1608
|
+
Create scalable inboxes on-demand. Each inbox has a unique email address that your AI agent can use to send and receive emails.
|
|
1609
|
+
|
|
1610
|
+
### Messages
|
|
1611
|
+
|
|
1612
|
+
Send emails with both plain text and HTML content for best deliverability. The skill handles proper formatting and headers automatically.
|
|
1613
|
+
|
|
1614
|
+
### Threads
|
|
1615
|
+
|
|
1616
|
+
Threads group related messages in a conversation, making it easy to follow email chains and maintain context across multiple exchanges.
|
|
1617
|
+
|
|
1618
|
+
### Attachments
|
|
1619
|
+
|
|
1620
|
+
Send and receive attachments with Base64 encoding. The skill can retrieve attachments from messages or threads.
|
|
1621
|
+
|
|
1622
|
+
### Drafts
|
|
1623
|
+
|
|
1624
|
+
Create drafts for human-in-the-loop approval before sending. This is useful when you want to review emails before they go out.
|
|
1625
|
+
|
|
1626
|
+
### Pods
|
|
1627
|
+
|
|
1628
|
+
Multi-tenant isolation for SaaS platforms. Each customer gets isolated inboxes, perfect for building email-enabled applications.
|
|
1629
|
+
|
|
1630
|
+
### Idempotency
|
|
1631
|
+
|
|
1632
|
+
Use idempotency keys for safe retries on create operations. This prevents duplicate emails when network errors occur.
|
|
1633
|
+
|
|
1634
|
+
### Real-time events
|
|
1635
|
+
|
|
1636
|
+
The skill supports both WebSockets (persistent connection, no public URL needed) and webhooks (HTTP-based notifications) for real-time email notifications.
|
|
1637
|
+
|
|
1638
|
+
## Example usage
|
|
1639
|
+
|
|
1640
|
+
Once installed, you can ask your AI assistant to perform email tasks:
|
|
1641
|
+
|
|
1642
|
+
* "Create a new email inbox for my project"
|
|
1643
|
+
* "Send an email to [john@example.com](mailto:john@example.com) about the meeting tomorrow"
|
|
1644
|
+
* "Check my inbox for new emails"
|
|
1645
|
+
* "Reply to the latest email from Sarah"
|
|
1646
|
+
* "Create a draft response to the support ticket"
|
|
1647
|
+
|
|
1648
|
+
## Resources
|
|
1649
|
+
|
|
1650
|
+
* [Official AgentMail Skill on skills.sh](https://skills.sh/agentmail-to/agentmail-skills/agentmail)
|
|
1651
|
+
* [AgentMail Skills Repository](https://github.com/agentmail-to/agentmail-skills)
|
|
1652
|
+
* [AgentMail API Reference](/api-reference)
|
|
1653
|
+
* [AgentMail Console](https://console.agentmail.to)
|
|
1654
|
+
|
|
1655
|
+
|
|
1519
1656
|
# MCP
|
|
1520
1657
|
|
|
1521
1658
|
> AgentMail's Model Context Protocol (MCP) integration
|
|
@@ -1549,6 +1686,284 @@ The AgentMail MCP server works with any MCP-compatible client, including:
|
|
|
1549
1686
|
For detailed setup instructions and available tools, visit [mcp.agentmail.to](https://mcp.agentmail.to).
|
|
1550
1687
|
|
|
1551
1688
|
|
|
1689
|
+
# Moltbot
|
|
1690
|
+
|
|
1691
|
+
> AgentMail's Moltbot (Clawdbot) integration
|
|
1692
|
+
|
|
1693
|
+
## Getting started
|
|
1694
|
+
|
|
1695
|
+
Moltbot (formerly Clawdbot) is an open-source AI personal assistant that runs on your own devices and integrates with messaging platforms like WhatsApp, Telegram, Discord, and Slack. By adding AgentMail to Moltbot, your agent gains the ability to send and receive emails, enabling two-way email conversations alongside your existing chat channels.
|
|
1696
|
+
|
|
1697
|
+
There are three ways to integrate AgentMail with Moltbot: using the official AgentMail skill, the AgentMail MCP server, or creating a custom skill.
|
|
1698
|
+
|
|
1699
|
+
## Option 1: Official AgentMail Skill (Recommended)
|
|
1700
|
+
|
|
1701
|
+
The easiest way to add email capabilities to Moltbot is by installing the official AgentMail skill from [skills.sh](https://skills.sh/agentmail-to/agentmail-skills/agentmail). This skill is maintained by the AgentMail team and provides comprehensive email functionality.
|
|
1702
|
+
|
|
1703
|
+
### Installation
|
|
1704
|
+
|
|
1705
|
+
Install the skill using the Moltbot CLI:
|
|
1706
|
+
|
|
1707
|
+
```bash
|
|
1708
|
+
moltbot skills install agentmail-to/agentmail-skills/agentmail
|
|
1709
|
+
```
|
|
1710
|
+
|
|
1711
|
+
Or install via ClawdHub:
|
|
1712
|
+
|
|
1713
|
+
```bash
|
|
1714
|
+
clawdhub install agentmail
|
|
1715
|
+
```
|
|
1716
|
+
|
|
1717
|
+
### Configuration
|
|
1718
|
+
|
|
1719
|
+
Add your AgentMail API key to the skill configuration in `~/.clawdbot/moltbot.json`:
|
|
1720
|
+
|
|
1721
|
+
```json
|
|
1722
|
+
{
|
|
1723
|
+
"skills": {
|
|
1724
|
+
"entries": {
|
|
1725
|
+
"agentmail": {
|
|
1726
|
+
"enabled": true,
|
|
1727
|
+
"env": {
|
|
1728
|
+
"AGENTMAIL_API_KEY": "your-api-key-here"
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
```
|
|
1735
|
+
|
|
1736
|
+
Get your API key from the [AgentMail Console](https://console.agentmail.to).
|
|
1737
|
+
|
|
1738
|
+
### Features
|
|
1739
|
+
|
|
1740
|
+
The official skill includes:
|
|
1741
|
+
|
|
1742
|
+
* **Inbox management:** Create scalable inboxes on-demand with unique email addresses
|
|
1743
|
+
* **Message operations:** Send emails with text and HTML content for best deliverability
|
|
1744
|
+
* **Thread management:** Group related messages in conversations
|
|
1745
|
+
* **Attachments:** Send and receive attachments with Base64 encoding
|
|
1746
|
+
* **Drafts:** Create drafts for human-in-the-loop approval before sending
|
|
1747
|
+
* **Pods:** Multi-tenant isolation for SaaS platforms
|
|
1748
|
+
* **Idempotency:** Safe retries on create operations
|
|
1749
|
+
* **Real-time events:** WebSocket and webhook support for notifications
|
|
1750
|
+
|
|
1751
|
+
### Verify installation
|
|
1752
|
+
|
|
1753
|
+
Check that the skill is loaded:
|
|
1754
|
+
|
|
1755
|
+
```bash
|
|
1756
|
+
moltbot skills list --eligible
|
|
1757
|
+
```
|
|
1758
|
+
|
|
1759
|
+
You should see `agentmail` in the list of available skills.
|
|
1760
|
+
|
|
1761
|
+
## Option 2: MCP Server
|
|
1762
|
+
|
|
1763
|
+
An alternative way to add email capabilities to Moltbot is through the AgentMail MCP server. Moltbot supports MCP (Model Context Protocol) servers, which allows it to connect to external tools like AgentMail.
|
|
1764
|
+
|
|
1765
|
+
### Setup
|
|
1766
|
+
|
|
1767
|
+
1. Get your AgentMail API key from the [AgentMail Console](https://console.agentmail.to).
|
|
1768
|
+
|
|
1769
|
+
2. Add the AgentMail MCP server to your Moltbot configuration. Edit your `~/.clawdbot/moltbot.json` file:
|
|
1770
|
+
|
|
1771
|
+
```json
|
|
1772
|
+
{
|
|
1773
|
+
"mcp": {
|
|
1774
|
+
"servers": {
|
|
1775
|
+
"agentmail": {
|
|
1776
|
+
"command": "npx",
|
|
1777
|
+
"args": ["-y", "@agentmail/mcp-server"],
|
|
1778
|
+
"env": {
|
|
1779
|
+
"AGENTMAIL_API_KEY": "your-api-key-here"
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1785
|
+
```
|
|
1786
|
+
|
|
1787
|
+
3. Restart Moltbot to load the new MCP server:
|
|
1788
|
+
|
|
1789
|
+
```bash
|
|
1790
|
+
moltbot restart
|
|
1791
|
+
```
|
|
1792
|
+
|
|
1793
|
+
4. Verify the integration by asking Moltbot to list your inboxes:
|
|
1794
|
+
|
|
1795
|
+
```
|
|
1796
|
+
List my AgentMail inboxes
|
|
1797
|
+
```
|
|
1798
|
+
|
|
1799
|
+
### Available tools
|
|
1800
|
+
|
|
1801
|
+
Once connected, Moltbot can use the following AgentMail tools:
|
|
1802
|
+
|
|
1803
|
+
* **Inbox management:** Create, list, and delete inboxes
|
|
1804
|
+
* **Message operations:** Send, receive, and reply to emails
|
|
1805
|
+
* **Thread management:** Access and manage email threads
|
|
1806
|
+
* **Attachments:** Handle email attachments
|
|
1807
|
+
|
|
1808
|
+
## Option 3: Custom Skill
|
|
1809
|
+
|
|
1810
|
+
For more control over the integration, you can create a custom AgentMail skill. Skills are directories containing a `SKILL.md` file with instructions for Moltbot.
|
|
1811
|
+
|
|
1812
|
+
### Create the skill directory
|
|
1813
|
+
|
|
1814
|
+
Create a new skill in your Moltbot workspace:
|
|
1815
|
+
|
|
1816
|
+
```bash
|
|
1817
|
+
mkdir -p ~/.clawdbot/skills/agentmail
|
|
1818
|
+
```
|
|
1819
|
+
|
|
1820
|
+
### Create the skill file
|
|
1821
|
+
|
|
1822
|
+
Create `~/.clawdbot/skills/agentmail/SKILL.md` with the following content:
|
|
1823
|
+
|
|
1824
|
+
````markdown
|
|
1825
|
+
---
|
|
1826
|
+
name: agentmail
|
|
1827
|
+
description: Send and receive emails using AgentMail
|
|
1828
|
+
requires:
|
|
1829
|
+
env:
|
|
1830
|
+
- AGENTMAIL_API_KEY
|
|
1831
|
+
---
|
|
1832
|
+
|
|
1833
|
+
# AgentMail Skill
|
|
1834
|
+
|
|
1835
|
+
You can send and receive emails using the AgentMail API. Use the `exec` tool to run curl commands against the AgentMail API.
|
|
1836
|
+
|
|
1837
|
+
## API Base URL
|
|
1838
|
+
|
|
1839
|
+
```
|
|
1840
|
+
https://api.agentmail.to/v1
|
|
1841
|
+
```
|
|
1842
|
+
|
|
1843
|
+
## Authentication
|
|
1844
|
+
|
|
1845
|
+
Include your API key in the Authorization header:
|
|
1846
|
+
|
|
1847
|
+
```
|
|
1848
|
+
Authorization: Bearer $AGENTMAIL_API_KEY
|
|
1849
|
+
```
|
|
1850
|
+
|
|
1851
|
+
## Common Operations
|
|
1852
|
+
|
|
1853
|
+
### List inboxes
|
|
1854
|
+
|
|
1855
|
+
```bash
|
|
1856
|
+
curl -s -H "Authorization: Bearer $AGENTMAIL_API_KEY" \
|
|
1857
|
+
https://api.agentmail.to/v1/inboxes
|
|
1858
|
+
```
|
|
1859
|
+
|
|
1860
|
+
### Create an inbox
|
|
1861
|
+
|
|
1862
|
+
```bash
|
|
1863
|
+
curl -s -X POST -H "Authorization: Bearer $AGENTMAIL_API_KEY" \
|
|
1864
|
+
-H "Content-Type: application/json" \
|
|
1865
|
+
-d '{"display_name": "My Agent"}' \
|
|
1866
|
+
https://api.agentmail.to/v1/inboxes
|
|
1867
|
+
```
|
|
1868
|
+
|
|
1869
|
+
### Send an email
|
|
1870
|
+
|
|
1871
|
+
```bash
|
|
1872
|
+
curl -s -X POST -H "Authorization: Bearer $AGENTMAIL_API_KEY" \
|
|
1873
|
+
-H "Content-Type: application/json" \
|
|
1874
|
+
-d '{
|
|
1875
|
+
"to": ["recipient@example.com"],
|
|
1876
|
+
"subject": "Hello from Moltbot",
|
|
1877
|
+
"text": "This email was sent by my AI assistant."
|
|
1878
|
+
}' \
|
|
1879
|
+
https://api.agentmail.to/v1/inboxes/{inbox_id}/messages
|
|
1880
|
+
```
|
|
1881
|
+
|
|
1882
|
+
### List messages in an inbox
|
|
1883
|
+
|
|
1884
|
+
```bash
|
|
1885
|
+
curl -s -H "Authorization: Bearer $AGENTMAIL_API_KEY" \
|
|
1886
|
+
https://api.agentmail.to/v1/inboxes/{inbox_id}/messages
|
|
1887
|
+
```
|
|
1888
|
+
|
|
1889
|
+
### Reply to a message
|
|
1890
|
+
|
|
1891
|
+
```bash
|
|
1892
|
+
curl -s -X POST -H "Authorization: Bearer $AGENTMAIL_API_KEY" \
|
|
1893
|
+
-H "Content-Type: application/json" \
|
|
1894
|
+
-d '{"text": "Thanks for your email!"}' \
|
|
1895
|
+
https://api.agentmail.to/v1/inboxes/{inbox_id}/messages/{message_id}/reply
|
|
1896
|
+
```
|
|
1897
|
+
````
|
|
1898
|
+
|
|
1899
|
+
### Configure the skill
|
|
1900
|
+
|
|
1901
|
+
Add your AgentMail API key to the skill configuration in `~/.clawdbot/moltbot.json`:
|
|
1902
|
+
|
|
1903
|
+
```json
|
|
1904
|
+
{
|
|
1905
|
+
"skills": {
|
|
1906
|
+
"entries": {
|
|
1907
|
+
"agentmail": {
|
|
1908
|
+
"enabled": true,
|
|
1909
|
+
"env": {
|
|
1910
|
+
"AGENTMAIL_API_KEY": "your-api-key-here"
|
|
1911
|
+
}
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1915
|
+
}
|
|
1916
|
+
```
|
|
1917
|
+
|
|
1918
|
+
### Verify the skill
|
|
1919
|
+
|
|
1920
|
+
Check that the skill is loaded:
|
|
1921
|
+
|
|
1922
|
+
```bash
|
|
1923
|
+
moltbot skills list --eligible
|
|
1924
|
+
```
|
|
1925
|
+
|
|
1926
|
+
You should see `agentmail` in the list of available skills.
|
|
1927
|
+
|
|
1928
|
+
## Example use cases
|
|
1929
|
+
|
|
1930
|
+
Once AgentMail is integrated with Moltbot, you can ask your agent to:
|
|
1931
|
+
|
|
1932
|
+
* "Create a new email inbox for my project"
|
|
1933
|
+
* "Check my inbox for new emails"
|
|
1934
|
+
* "Send an email to [john@example.com](mailto:john@example.com) about the meeting tomorrow"
|
|
1935
|
+
* "Reply to the latest email from Sarah"
|
|
1936
|
+
* "Forward the invoice email to [accounting@company.com](mailto:accounting@company.com)"
|
|
1937
|
+
|
|
1938
|
+
## Real-time email notifications
|
|
1939
|
+
|
|
1940
|
+
For proactive email handling, you can combine AgentMail webhooks with Moltbot's webhook support. This allows Moltbot to notify you immediately when new emails arrive.
|
|
1941
|
+
|
|
1942
|
+
1. Set up a webhook endpoint in Moltbot (see [Moltbot webhook documentation](https://docs.molt.bot/automation/webhook))
|
|
1943
|
+
|
|
1944
|
+
2. Register the webhook with AgentMail:
|
|
1945
|
+
|
|
1946
|
+
```bash
|
|
1947
|
+
curl -X POST -H "Authorization: Bearer $AGENTMAIL_API_KEY" \
|
|
1948
|
+
-H "Content-Type: application/json" \
|
|
1949
|
+
-d '{
|
|
1950
|
+
"url": "https://your-moltbot-webhook-url",
|
|
1951
|
+
"events": ["message.received"]
|
|
1952
|
+
}' \
|
|
1953
|
+
https://api.agentmail.to/v1/webhooks
|
|
1954
|
+
```
|
|
1955
|
+
|
|
1956
|
+
Now Moltbot will be notified whenever a new email arrives, allowing it to proactively inform you or take action.
|
|
1957
|
+
|
|
1958
|
+
## Resources
|
|
1959
|
+
|
|
1960
|
+
* [Official AgentMail Skill](https://skills.sh/agentmail-to/agentmail-skills/agentmail)
|
|
1961
|
+
* [AgentMail API Reference](/api-reference)
|
|
1962
|
+
* [AgentMail MCP Server](https://mcp.agentmail.to)
|
|
1963
|
+
* [Moltbot Documentation](https://docs.molt.bot)
|
|
1964
|
+
* [Moltbot Skills Guide](https://docs.molt.bot/tools/skills)
|
|
1965
|
+
|
|
1966
|
+
|
|
1552
1967
|
# Replit
|
|
1553
1968
|
|
|
1554
1969
|
> AgentMail's Replit integration
|
package/dist/llms.txt
CHANGED
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
- [Labels](https://docs.agentmail.to/labels.mdx): Learn how to use Labels to manage state, track campaigns, and filter messages for powerful agentic workflows.
|
|
13
13
|
- [Attachments](https://docs.agentmail.to/attachments.mdx): Learn how to send files as attachments, and download incoming attachments from both messages and threads.
|
|
14
14
|
- [Pods](https://docs.agentmail.to/documentation/core-concepts/pods.mdx): Learn how to use pods for multi-tenant email management
|
|
15
|
+
- [Skills](https://docs.agentmail.to/integrations/skills.mdx): AgentMail's official skill for Moltbot, Claude Code, Cursor, and other AI assistants
|
|
15
16
|
- [MCP](https://docs.agentmail.to/integrations/mcp.mdx): AgentMail's Model Context Protocol (MCP) integration
|
|
17
|
+
- [Moltbot](https://docs.agentmail.to/integrations/moltbot.mdx): AgentMail's Moltbot (Clawdbot) integration
|
|
16
18
|
- [Replit](https://docs.agentmail.to/integrations/replit.mdx): AgentMail's Replit integration
|
|
17
19
|
- [Guide: Sending & Receiving Email](https://docs.agentmail.to/sending-receiving-email.mdx): A step-by-step guide to the practical workflow of sending initial emails and handling replies to have a full conversation.
|
|
18
20
|
- [IMAP & SMTP](https://docs.agentmail.to/imap-smtp.mdx): Configure IMAP and SMTP to access your AgentMail inboxes using email clients or programmatic access.
|