A collection of skills and examples for building XMTP agents using the @xmtp/agent-sdk.
Skills follow the Agent Skills format.
npx skills add xmtplabs/xmtp-agent-examplesSkills are structured best practices and patterns for building XMTP agents. Each skill contains a SKILL.md with guidelines and individual rule files with code examples.
| Skill | Description | Use when |
|---|---|---|
| building-agents | Core SDK setup, events, middleware | Creating new agents, handling messages |
| handling-commands | Validators, filters, type guards | Implementing commands, validating input |
| creating-inline-actions | Interactive buttons (XIP-67) | Creating menus, confirmations, selections |
| handling-attachments | Encrypted file handling | Sending/receiving files and images |
| handling-transactions | USDC transfers, wallet calls | Token transfers, transaction requests |
| managing-groups | Group management, permissions | Creating groups, managing members |
| sending-reactions | Emoji reactions, thinking indicator | Reacting to messages, showing state |
| resolving-domains | ENS, Farcaster resolution | Resolving mentions, fetching profiles |
Runnable example agents that demonstrate specific capabilities:
| Example | Description |
|---|---|
| xmtp-gm | Simple agent that replies "gm" |
| xmtp-gpt | GPT-powered responses |
| xmtp-gated-group | Group gating with passphrase |
| xmtp-domain-resolver | ENS and Farcaster resolution |
| xmtp-transactions | USDC transactions |
| xmtp-smart-wallet | Smart wallet usage |
| xmtp-attachments | File attachments with Pinata |
| xmtp-generalstore | Shopping cart with inline actions |
| xmtp-thinking-reaction | Thinking emoji pattern |
| xmtp-queue-dual-client | Dual client architecture |
| xmtp-welcome-message | Welcome messages with buttons |
Visit miniapps to explore the latest agents and mini-apps.
# Clone the repo
git clone https://github.com/xmtplabs/xmtp-agent-examples.git
cd xmtp-agent-examples
# Install packages
yarn
# Generate random XMTP keys
yarn gen:keys
# Run an example
cd examples/xmtp-gm
yarn devCreate a .env file with:
XMTP_WALLET_KEY= # Private key for the wallet
XMTP_DB_ENCRYPTION_KEY= # Encryption key for local database
XMTP_ENV=dev # local, dev, or productionyarn gen:keysWarning: Running
yarn gen:keyswill append keys to your existing.envfile.
See the skills directory for AI-assisted development patterns.
Prompt: Create an agent that multiplies numbers by 2XMTP_FORCE_DEBUG=true
XMTP_FORCE_DEBUG_LEVEL=debug # debug, info, warn, errorTest using xmtp.chat, the official playground for agents.
yarn debug
yarn debug --agent 0x81bddb3d7cd9ccdfaeb117ce19fd77c1433b907d# Start local network
./dev/up
# Update .env
XMTP_ENV=local
# Stop
./dev/downyarn revoke <inbox-id> <installations-to-exclude>See Deploy your own agent for production deployment guides.
| Example | Description |
|---|---|
| xmtp-gaia | Gaia AI integration |
| xmtp-groq | Groq AI integration |
See CONTRIBUTING.md for guidelines.
MIT