You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
• AI Trading Companion: Message "buy $100 ETH when it hits $3,000" and your agent executes trades 24/7 while you sleep.
21
21
22
-
• Travel Planning Bot: "Book flight LAX to NYC under $300" and get instant booking with crypto payments, all in your group chat
22
+
• Travel Planning Agent: "Book flight LAX to NYC under $300" and get instant booking with crypto payments, all in your group chat
23
23
24
24
• Coinbase Wallet & XMTP are combining AI, crypto, and mini apps with secure messaging – to unlock use-cases never before possible. Secure group chats & DMs are the new surface area for developers.
25
25
@@ -28,7 +28,7 @@ Real Examples:
28
28
This guide will walk you through creating, testing, and deploying your first XMTP messaging agent. By the end, you'll have a fully functional agent that can send and receive messages on the XMTP messaging network.
29
29
30
30
**Prerequisites**
31
-
• Node.js (v16 or higher)
31
+
• Node.js (v20 or higher)
32
32
• Git
33
33
• A code editor
34
34
• Basic knowledge of JavaScript/TypeScript
@@ -37,109 +37,116 @@ This guide will walk you through creating, testing, and deploying your first XMT
37
37
38
38
-[Getting Started with XMTP (Video)](https://www.youtube.com/watch?v=djRLnWUvwIA)
39
39
-[Building Agents on XMTP](https://github.com/ephemeraHQ/xmtp-agent-examples)
console.log(`New conversation started with ${conversation.peerAddress}`)
115
+
Each user has a unique inboxId for retrieving their associated addresses (identifiers). One inboxId can have multiple identifiers like passkeys or EVM wallet addresses.
- [xmtp-gm](https://github.com/ephemeraHQ/xmtp-agent-examples/tree/main/examples/xmtp-gm): A simple agent that replies to all text messages with "gm".
127
+
- [xmtp-gpt](https://github.com/ephemeraHQ/xmtp-agent-examples/tree/main/examples/xmtp-gpt): An example using GPT API's to answer messages.
128
+
- [xmtp-nft-gated-group](https://github.com/ephemeraHQ/xmtp-agent-examples/tree/main/examples/xmtp-nft-gated-group): Add members to a group based on an NFT
129
+
- [xmtp-coinbase-agentkit](https://github.com/ephemeraHQ/xmtp-agent-examples/tree/main/examples/xmtp-coinbase-agentkit): Agent that uses a CDP for gassless USDC on base
130
+
- [xmtp-transactions](https://github.com/ephemeraHQ/xmtp-agent-examples/tree/main/examples/xmtp-transactions): Use XMTP content types to send transactions
131
+
- [xmtp-smart-wallet](https://github.com/ephemeraHQ/xmtp-agent-examples/tree/main/examples/xmtp-smart-wallet): Agent that uses a smart wallet to send messages
124
132
125
-
```
126
133
127
-
**STEP 5: TEST YOUR BOT**
134
+
**STEP 5: TEST YOUR AGENT**
128
135
129
136
**Development Testing**
130
137
131
-
1\. Start your bot:
138
+
1\. Start your agent:
132
139
133
140
```javascript
134
-
npm start
141
+
npm dev
135
142
```
136
143
137
144
2\. Test on [xmtp.chat:](https://xmtp.chat/conversations)
138
145
• Go to https://xmtp.chat
139
146
• Connect your personal wallet
140
147
• Switch to Dev environment in settings
141
-
• Start a new conversation with your bot's public address (from .env)
142
-
• Send a test message and verify the bot responds
148
+
• Start a new conversation with your agent's public address (from .env)
149
+
• Send a test message and verify the agent responds
143
150
144
151
**Production Testing**
145
152
@@ -152,36 +159,37 @@ XMTP_ENV=production
152
159
2\. Test on Coinbase Wallet:
153
160
• Open Coinbase Wallet mobile app
154
161
• Go to messaging
155
-
• Start conversation with your bot's address
162
+
• Start conversation with your agent's address
156
163
• Verify functionality
157
164
158
-
**STEP 6: GET A BASENAME FOR YOUR BOT**
165
+
**STEP 6: GET A BASENAME FOR YOUR AGENT**
159
166
160
-
Give your bot a human-readable name:
167
+
Give your agent a human-readable name:
161
168
162
-
**1\. Import bot wallet to Coinbase Wallet extension:**
169
+
**1\. Import agent wallet to Coinbase Wallet extension:**
163
170
• Install Coinbase Wallet browser extension
164
-
• Import using your bot's private key
171
+
• Import using your agent's private key
165
172
166
173
**2\. Purchase a basename:**
167
174
• Visit https://base.org/names
168
-
• Connect your bot's wallet
169
-
• Search and purchase your desired basename (e.g., mybot.base.eth)
175
+
• Connect your agent's wallet
176
+
• Search and purchase your desired basename (e.g., myagent.base.eth)
170
177
• Set as primary name
171
178
172
179
**3\. Verify setup:**
173
-
• Your bot can now be reached via the basename instead of the long address
174
-
• Users can message mybot.base.eth instead of 0x123...
180
+
• Your agent can now be reached via the basename instead of the long address
181
+
• Users can message myagent.base.eth instead of 0x123...
175
182
176
-
**STEP 7: DEPLOY YOUR BOT**
183
+
**STEP 7: DEPLOY YOUR AGENT**
177
184
178
185
**Option 1: Railway (Recommended)**
179
186
180
187
• Visit https://railway.app
181
188
• Connect your GitHub repository
182
189
• Add environment variables in Railway dashboard:
183
190
\- XMTP_ENV=production
184
-
\- PRIVATE_KEY=your_bot_private_key
191
+
\- WALLET_KEY=your_agent_private_key
192
+
\- ENCRYPTION_KEY=your_agent_encryption_key
185
193
• Deploy and monitor logs
186
194
187
195
**Option 2: Other Platforms**
@@ -193,22 +201,34 @@ Heroku, Vercel, or any Node.js hosting platform:
193
201
**STEP 8: MONITOR AND MAINTAIN**
194
202
195
203
**Best Practices**
196
-
1\. Logging: Add comprehensive logging to track bot activity
204
+
1\. Logging: Add comprehensive logging to track agent activity
197
205
2\. Error Handling: Implement try-catch blocks for network issues
198
-
3\. Rate Limiting: Respect XMTP rate limits in your bot logic
206
+
3\. Rate Limiting: Respect XMTP rate limits in your agent logic
199
207
4\. Security: Never expose private keys; use environment variables
Fill out the form [here](https://app.deform.cc/form/52b71db4-bfa2-4ef5-a954-76c66250bdd2/?page_number=0) to submit your agent for review. If approved, your bot will be featured in Coinbase Wallet. You will hear back from us within 5 business days.
232
+
Fill out the form [here](https://app.deform.cc/form/52b71db4-bfa2-4ef5-a954-76c66250bdd2/?page_number=0) to submit your agent for review. If approved, your agent will be featured in Coinbase Wallet. You will hear back from us within 5 business days.
213
233
214
234
Need help or have feature requests? Visit [https://community.xmtp.org/](https://community.xmtp.org/)
0 commit comments