xmtp-agents
Building and extending XMTP agents with the Agent SDK. Use when: (1) creating or configuring an XMTP agent, (2) implementing agent features (commands, attachments, reactions, groups, transactions, inline actions, or domain resolution).
Why use this skill?
Learn to build, configure, and extend XMTP agents using the OpenClaw SDK. Handle commands, payments, and groups for decentralized messaging applications.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/humanagent/xmtp-agentWhat This Skill Does
The xmtp-agents skill provides a comprehensive framework for building, deploying, and managing intelligent messaging agents on the XMTP network. It serves as the primary gateway for developers looking to integrate decentralized, encrypted messaging capabilities into their AI agents. By leveraging the XMTP Agent SDK, this skill enables seamless event-driven interactions, allowing agents to participate in one-on-one chats, group conversations, and complex automated workflows. Whether you are building a simple chatbot or a sophisticated agent that handles transactions and file attachments, this skill provides the structured patterns and sub-skills necessary to scale your development efficiently.
Installation
To begin building your XMTP agent, ensure you have the OpenClaw environment set up. Install the skill directly into your project using the following command:
clawhub install openclaw/skills/skills/humanagent/xmtp-agent
Once installed, verify your environment variables—specifically your wallet private key and XMTP environmental configuration. Developers should then install the core SDK via npm:
npm install @xmtp/agent-sdk
Use Cases
This skill is highly versatile and supports a wide range of decentralized communication use cases:
- Customer Support Bots: Automatically responding to user queries within encrypted XMTP threads.
- DAO Management Agents: Managing group membership, welcoming new members, and facilitating on-chain voting.
- Payment Orchestration: Creating agents that initiate and track USDC transfers directly within a chat context.
- Community Engagement: Implementing reaction-based workflows or slash-command-driven moderation tools.
- Identity Resolution: Linking decentralized identifiers and Farcaster profiles to XMTP addresses for contextual interactions.
Example Prompts
- "Initialize a new XMTP agent project with middleware support and a default text handler."
- "Help me implement a slash command for my agent that triggers a USDC transfer request when a user types /pay."
- "Show me how to set up a group chat listener that welcomes new participants and assigns them a basic member role."
Tips & Limitations
- Modularity is Key: Always decompose your logic using the provided sub-skills. Don't build monolithic files; keep your
handling-commandslogic separate from yourmanaging-groupsimplementation. - Security: Never expose your private keys in plain text. Always use secure environment variable management (e.g., .env files with proper git-ignore rules).
- Limitations: Remember that XMTP is a decentralized network; agent performance is subject to network latency and node availability. Ensure your code handles connection drops gracefully using the lifecycle event listeners outlined in
building-agents.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-humanagent-xmtp-agent": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, external-api