A Shopify MCP (Model Context Protocol) agent built with the OpenAI Agent SDK, featuring real-time streaming responses and AWS Bedrock Claude integration.
- 🤖 AI Agent: Built with OpenAI Agent SDK for intelligent product recommendations
- 🛍️ Shopify MCP Integration: Connects to Shopify stores via MCP protocol
- ⚡ Real-time Streaming: Live streaming of agent responses as they're generated
- ☁️ AWS Bedrock: Uses Claude 3.7 Sonnet via AWS Bedrock for powerful AI capabilities
- 🔧 LiteLLM: Unified interface for multiple LLM providers
├── main.py # Basic agent implementation
├── main_advanced_streaming.py # Advanced streaming agent
├── requirements.txt # Python dependencies
├── .env.example # Environment variables template
└── examples/
└── simple_example.py # Usage examples
-
Install Dependencies
pip install -r requirements.txt
-
Configure Environment
cp .env.example .env # Edit .env with your credentials -
Required Environment Variables
# AWS Configuration AWS_ACCESS_KEY_ID=your_access_key AWS_SECRET_ACCESS_KEY=your_secret_key AWS_DEFAULT_REGION=us-east-1 # Shopify Store Configuration SHOPIFY_STORE_DOMAIN=your-store.myshopify.com
python3 main.pypython3 main_advanced_streaming.py- ✅ Real-time Streaming: Character-by-character streaming of AI responses
- ✅ MCP Tool Integration: Automatic discovery and use of Shopify MCP tools
- ✅ AWS Bedrock: Claude 3.7 Sonnet integration via LiteLLM
- ✅ Error Handling: Graceful fallback when MCP tools are unavailable
- ✅ Product Search: Intelligent product recommendations and search
- Agent SDK Version: 0.2.11 (downgraded to avoid logprobs validation issues)
- Model: Claude 3.7 Sonnet via AWS Bedrock
- MCP Endpoint:
https://happywax.com/api/mcp(working example) - Streaming: Real-time event processing with
Runner.run_streamed()
If you encounter MCP connection errors, ensure:
- The Shopify store has MCP enabled
- The MCP endpoint is accessible
- The store domain is correct
For streaming problems:
- Use Agent SDK version 0.2.11 or earlier
- Check AWS credentials are properly configured
- Verify Bedrock model access permissions
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - see LICENSE file for details