What you’ll learn
By the end of this guide, you’ll be able to:
- Integrate Mini Apps with chat agents for seamless in-conversation experiences
- Share Mini Apps directly through agent messages with rich previews
- Create engaging group experiences using agents and Mini Apps together
- Implement user mentions and social features in agent-driven Mini App experiences
- Build viral, conversational Mini App distribution through chat
Why Mini Apps & Agents Together?
Mini Apps can live inside conversations, letting friends play, trade, plan, and coordinate together without ever leaving the chat. This means that you can have virality spread through natural conversation (“try this right here”) along with sharing in larger settings. When combined with intelligent agents, you create powerful experiences that spread through natural conversation. This integration unlocks unique distribution and engagement patterns: Natural virality: “Try this right here” moments spread organically through conversation Contextual engagement: Agents can introduce Mini Apps at the perfect moment Group coordination: Agents orchestrate multiplayer experiences and keep everyone engaged Persistent presence: Agents maintain engagement between Mini App sessions Real Examples: • Group Gaming: Agent coordinates a multiplayer quiz, announces winners, and keeps score across sessions • Event Planning: Agent shares planning Mini App when someone mentions meeting up, handles RSVPs and updates • Trading Competitions: Agent creates trading challenges, shares leaderboards, and celebrates wins • Social Polls: Agent launches polls when decisions need to be made, tallies results, and announces outcomesHow Integration Works
1. Share Mini Apps in App
Every Mini App has a shareable URL that agents can send directly in chat. When dropped into a conversation, the link automatically unfurls into a rich preview card that others can tap to launch instantly. Share Flow:- Agent triggers share — Based on conversation context or user request
- Link generates preview — Platform fetches Mini App metadata and creates rich embed
- Users engage — Tap preview to launch Mini App directly in conversation
- Agent coordinates — Continues engagement, shares updates, mentions participants
Technical Implementation
Basic Mini App Sharing:User Engagement & Mentions
2. Engage & Mention Users
Agents on XMTP only have access to the 0x addresses. If you’re building a group chat experience with Mini Apps, you’ll want to use human-readable mentions like display names (like @jesse) for a more social, intuitive experience. This API from Neynar will give your agent access to this data: Getting Display Names:Creating Social Group Experiences
Example: Multiplayer Game CoordinationAgent Spotlight
Squabble uses Mini Apps in a social, fun way, with the agent coordinating the multiplayer experience. Check out their GitHub repo for guidance! The agent sends a Mini App to the group, and broadcasts to the group updates as people join and compete in the game. They mention the usernames of the people who have joined the game and won the game. The game happens inside the Mini App, which provides a more interactive, visual experience.How Squabble Works
1
Agent initiates game
Agent detects gaming context in conversation and shares the Squabble Mini App URL, which unfurls as a rich preview card.
2
Players join through Mini App
Users tap the preview to launch the Mini App, join the game, and start playing the interactive word game.
3
Agent coordinates experience
Agent monitors game progress and broadcasts updates to the group as players join and compete.
4
Agent celebrates results
Agent mentions winners by username, shares final scores, and encourages replay for ongoing engagement.
- Rich mentions — Agent uses display names (@username) instead of wallet addresses
- Real-time updates — Broadcasts join notifications and game progress to maintain group engagement
- Social celebration — Announces winners and achievements to drive continued participation
- Contextual triggers — Responds to gaming-related conversation with relevant Mini App shares
Content Types for Mini App Integration
Quick Actions for Mini App Engagement
Use Quick Actions to create interactive buttons that guide users to your Mini Apps:Transaction Integration
Combine Mini Apps with transaction capabilities for seamless onchain experiences:Best Practices
Agent Behavior
Timing and Context
Timing and Context
- Smart triggers — Share Mini Apps when conversation context suggests engagement opportunity
- Avoid spam — Don’t share the same Mini App repeatedly in short timeframes
- Read the room — Gauge group interest before introducing games or activities
- Natural integration — Make Mini App shares feel like helpful suggestions, not advertisements
Group vs. Direct Messages
Group vs. Direct Messages
- Direct messages — Automatically share relevant Mini Apps based on user requests
- Group messages — Only share Mini Apps when mentioned (@agentname) or when replying to agent messages
- React to acknowledge — Use emoji reactions (👀, ⌛) to show message received while processing
- Coordinate experience — In groups, act as facilitator for multiplayer Mini App experiences
User Experience
User Experience
- Use display names — Always resolve addresses to human-readable names for mentions
- Celebrate achievements — Announce wins, completions, and milestones to drive engagement
- Maintain context — Remember ongoing games/activities and provide relevant updates
- Enable discovery — Suggest related Mini Apps based on user interests and behavior
Technical Implementation
- Error handling — Gracefully handle Mini App load failures or API timeouts
- Rate limiting — Respect XMTP message limits and avoid overwhelming conversations
- State management — Track active Mini App sessions and user participation across conversations
- Privacy — Only access necessary user data and respect privacy preferences
Implementation Guide
Setting Up Mini App Integration
1
Configure agent with Mini App URLs
Set up your agent with a catalog of Mini App URLs and their associated triggers or contexts.
2
Implement context detection
Create logic to detect when sharing a Mini App would be valuable based on conversation content.
3
Add user mention capabilities
Integrate with Neynar API or similar service to resolve addresses to display names for better UX.
4
Test integration
Verify Mini App previews render correctly and agent coordination works across different conversation types.
Next Steps
Ready to build your Mini App & Agent integration?- Study the Squabble example — See real implementation patterns
- Review Chat Agents guide — Understand XMTP agent fundamentals
- Explore Mini Apps documentation — Learn Mini App development
- Join XMTP community — Get help and share your builds