Skip to content

Conversation

@phdargen
Copy link
Contributor

@phdargen phdargen commented Oct 7, 2025

Description

This PR updates the xmtp chatbot example:

  • Replaces xmtp/node-sdk with new xmtp/agents-sdk
  • Replaces legacy CDP wallet provider with new CDP v2 wallet provider
  • Adds new /fund <amountInEth> command that trigger tx request to send ETH from connected user browser wallet to agent wallet, needs to be signed by user

Tests

Chatbot: typescript/examples/langchain-xmtp-chatbot/chatbot.ts
Network: Base Sepolia
Setup: XMTP keys generated with pnpm run gen:keys

Initializing Agent on XMTP...
Agent initialized on dev network
Agent address: 0xf0191e26a7ae7f011b1c5fbd32d83f572e26bcea
Send a message on http://xmtp.chat/dm/0xf0191e26a7ae7f011b1c5fbd32d83f572e26bcea?env=dev
Listening for messages...

Received message from 21a4826bb001d31fcc282d63103e66f981b5f4d257f7978777e454c59c0ce27e: Gm, request some usdc
Creating new agent for user: 21a4826bb001d31fcc282d63103e66f981b5f4d257f7978777e454c59c0ce27e, wallet data: Not found
Creating new memory store for user: 21a4826bb001d31fcc282d63103e66f981b5f4d257f7978777e454c59c0ce27e
Wallet data saved for user 21a4826bb001d31fcc282d63103e66f981b5f4d257f7978777e454c59c0ce27e
Sent response to 21a4826bb001d31fcc282d63103e66f981b5f4d257f7978777e454c59c0ce27e: I have successfully requested USDC from the faucet. Transaction hash: **0x15753617f091f456322438e30f49205575300e333c5ad7512bb58058d697fcfe**

Received message from 21a4826bb001d31fcc282d63103e66f981b5f4d257f7978777e454c59c0ce27e: request eth
Using existing agent for user: 21a4826bb001d31fcc282d63103e66f981b5f4d257f7978777e454c59c0ce27e

Received message from 21a4826bb001d31fcc282d63103e66f981b5f4d257f7978777e454c59c0ce27e: check usdc balance
Using existing agent for user: 21a4826bb001d31fcc282d63103e66f981b5f4d257f7978777e454c59c0ce27e
Sent response to 21a4826bb001d31fcc282d63103e66f981b5f4d257f7978777e454c59c0ce27e: Your USDC balance is **1 USDC**. 

Received message from 21a4826bb001d31fcc282d63103e66f981b5f4d257f7978777e454c59c0ce27e: send all usdc to 0xf2d4580adfe8e012f5550322706d62df11fdbe21
Using existing agent for user: 21a4826bb001d31fcc282d63103e66f981b5f4d257f7978777e454c59c0ce27e
Sent response to 21a4826bb001d31fcc282d63103e66f981b5f4d257f7978777e454c59c0ce27e: The transfer of **1 USDC** to **0xf2d4580adfe8e012f5550322706d62df11fdbe21** has been successfully completed. Transaction hash: **0xce49ac37c21dc4ac0f7e5e84161d710f85c2425311826fbeaeb17ab292e97c88**. 
Screenshot 2025-10-07 at 16 38 26

Checklist

A couple of things to include in your PR for completeness:

  • Added documentation to all relevant README.md files
  • Added a changelog entry

@phdargen phdargen requested a review from murrlincoln as a code owner October 7, 2025 06:19
@cb-heimdall
Copy link

cb-heimdall commented Oct 7, 2025

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@github-actions github-actions bot added documentation Improvements or additions to documentation example New example agent typescript labels Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation example New example agent typescript

Development

Successfully merging this pull request may close these issues.

3 participants