A collection of AI agents and examples that integrate with Boson Protocol for decentralized commerce operations. This repository provides various implementations and patterns for building intelligent agents that can interact with blockchain networks and perform commerce-related tasks.
Agent Builder is a comprehensive toolkit for creating AI-powered agents that integrate with Boson Protocol's decentralized commerce infrastructure. It includes multiple example implementations across different platforms and communication channels, demonstrating how to build agents that can handle wallet management, blockchain transactions, and commerce operations.
- Multiple AI Integrations: Support for Claude AI, LangChain, and other AI frameworks
- Multi-Platform Examples: Telegram bots, email agents, XMTP messaging, and standalone applications
- Blockchain Integration: Full Boson Protocol MCP server integration with multi-chain support
- Wallet Management: Secure private key handling and transaction signing
- Commerce Operations: Complete decentralized commerce functionality
- TypeScript Support: Fully typed codebase with modern development tooling
- Common Utilities (
src/common/): Shared blockchain configurations and utilities - Examples (
src/examples/): Various agent implementations and patterns - Documentation (
docs/): Detailed guides and prompts for specific operations
- Vercel AI SDK: Direct AI integration examples
- LangChain: Structured chat agents with tool integration
- Telegram: Interactive Telegram bots with Claude AI
- Email: Email-based agent interactions
- XMTP: Decentralized messaging integration
- Node.js 23.11.1+ (managed via Volta)
- npm 11.5.2+
- API keys for your chosen AI provider
- Access to Boson Protocol MCP server
# Clone the repository
git clone https://github.com/bosonprotocol/agent-builder.git
cd agent-builder
# Install all dependencies
npm installnpm run start:telegram-bot-vercelnpm run start:standalone-vercelnpm run start:standalone-langchainnpm run start:emailnpm run start:xmtpInteractive Telegram bot powered by Claude AI with full Boson Protocol integration. Features secure wallet management, multi-chain support, and conversational AI capabilities.
Key Features:
- Claude AI integration for natural conversations
- Secure in-memory private key storage
- Multi-chain blockchain operations
- Dynamic tool loading per network
- User context management
Direct integration examples using Vercel's AI SDK, demonstrating how to build command-line agents with Boson Protocol tools.
Structured chat agents using LangChain framework with GOAT SDK adapter, providing a clean pattern for tool-based AI interactions.
Email-based agent that can process commerce operations through email interactions, perfect for asynchronous workflows.
Decentralized messaging integration using XMTP protocol, enabling Web3-native communication channels.
Each example includes its own environment configuration. Common environment variables include:
# AI Provider Keys
ANTHROPIC_API_KEY=your_anthropic_key_here
OPENAI_API_KEY=your_openai_key_here
# Boson Protocol
BOSON_MCP_URL=https://boson-mcp-server-staging-170470978472.europe-west2.run.app/mcp
# Platform-specific
TG_BOT_TOKEN=your_telegram_bot_token # For Telegram examples
XMTP_BOSON_MCP_URL=your_xmtp_mcp_server_url # For XMTP examples - MCP server URL for XMTP interactions- create-offer.md: Guide for creating offers on Boson Protocol
- commit-offer.md: Instructions for committing to offers
- redeem-exchange.md: Exchange redemption process
- create-seller-if-needed.md: Seller entity creation workflow
- chains.ts: Blockchain network configurations
- README.md: Shared utilities documentation
This project uses npm workspaces for managing multiple packages:
src/examples/
├── standalone/vercel/ # Vercel AI SDK examples
├── standalone/langchain/ # LangChain integration
├── telegram/vercel/ # Telegram bot implementation
├── email/ # Email agent
└── xmtp/ # XMTP messaging
# Watch mode for development
npm run watch
# Linting
npm run lint
npm run lint:fix
# Start specific examples
npm run start:telegram-bot-vercel
npm run start:standalone-vercel
npm run start:standalone-langchain
npm run start:email
npm run start:xmtp- Create a new directory under
src/examples/ - Add workspace configuration to root
package.json - Create example-specific
package.jsonwith dependencies - Implement your agent following existing patterns
- Add startup script to root package.json
All examples integrate with Boson Protocol's decentralized commerce infrastructure through the MCP (Model Context Protocol) server. This enables agents to:
- Create and manage seller/buyer entities
- Create and list offers
- Handle commitments and exchanges
- Process redemptions and disputes
- Manage multi-chain operations
- Agent receives user request
- Calls appropriate Boson Protocol MCP tool
- Receives transaction data (to, data fields)
- Signs transaction with user's wallet
- Broadcasts transaction to blockchain
- Monitors transaction confirmation
- Private Key Management: All examples implement secure, memory-only private key storage
- Environment Variables: Sensitive data managed through environment configuration
- Transaction Validation: All blockchain operations include proper validation
- Error Handling: Comprehensive error handling with secure logging
@bosonprotocol/agentic-commerce: Boson Protocol MCP integration@bosonprotocol/chat-sdk: Communication utilities@bosonprotocol/common: Shared protocol utilitiesgrammy: Telegram Bot API framework
- TypeScript with strict configuration
- ESLint with comprehensive rule set
- Prettier for code formatting
- Turbo for build optimization
This project uses Volta for Node.js version management:
- Node.js: 23.11.1
- npm: 11.5.2
- Fork the repository
- Create a feature branch
- Follow existing code patterns and conventions
- Add tests for new functionality
- Ensure all linting passes
- Submit a pull request
- Issues: GitHub Issues
- Documentation: Check individual example READMEs
- Boson Protocol: Protocol Documentation
These are just examples showcasing how agent developers can use our agentic commerce tools. The Agent examples are basic ones an do not implement an advanced context management. Deploying them to production might lead to unexpected behaviour.