Shopify AI Ops Agent
🛍️ Shopify AI 运营代理
一个基于 LangGraph v1、Model Context Protocol (MCP 2026-07-28)、FastAPI、PostgreSQL + pgvector、Redis、OpenTelemetry 以及严格的 Human-in-the-Loop (HITL) 风险治理构建的生产级自主电商运营代理。
📖 完整技术文档
有关深入架构、术语以及以 ASD-STE100(简化技术英语) 编写的架构决策记录 (ADR),请参阅:
👉 DOCUMENTATION.md
下载可视化演示 PDF:
👉 architecture_diagram.pdf (或访问 http://localhost:8000/architecture.pdf)
Related MCP server: MCP Shopify
🏗️ 核心架构不变量
执行前风险与策略门控:破坏性删除、财务预算和对外通信会触发 LangGraph 中断(
interrupt),要求人工批准。解耦的 MCP 工具层:所有业务能力均打包为 5 个无状态 MCP 工具服务器(
Shopify、Analytics、Meta Ads、Communications、Trend Intelligence)。确定性业务分析:财务指标使用确定性 SQL 例程计算,消除 LLM 算术幻觉。
防过早胜利传感器:代理会重新查询实时状态,以数学方式验证变更确实发生后才报告完成。
左移评估与追踪:28 个自动化 pytest 测试套件、17 个案例的黄金评估基准,以及独立的 Critic Agent 审计(得分:98.5/100,等级:A+)。
📁 仓库结构
shopify-ai-ops-agent/
├── DOCUMENTATION.md # Full technical documentation (ASD-STE100)
├── architecture_diagram.pdf # 2-slide landscape architecture diagram
├── docker-compose.yml # Postgres (pgvector) + Redis + Jaeger + API
├── pyproject.toml # Dependencies & packaging
├── app/
│ ├── api/ # FastAPI routes (agent, approvals, health)
│ ├── agent/ # LangGraph state machine & specialized nodes
│ ├── mcp_servers/ # 5 Stateless MCP tool servers
│ ├── core/ # Security (HMAC-SHA256), Idempotency, Database
│ ├── rag/ # Hybrid Vector + BM25 search & brand guidelines
│ ├── static/ # Executive SaaS Cockpit UI & Command Palette
│ └── evals/ # Golden datasets & Critic Agent audit
└── tests/ # 28 automated unit, safety, and integration tests🚀 快速入门与设置
1. 本地开发
# Install dependencies
pip install -r requirements.txt
# Start the application server & dashboard
python -m uvicorn app.api.main:app --reload --port 8000仪表盘 UI:
http://localhost:8000/(按Ctrl + K打开命令面板)交互式 API 文档:
http://localhost:8000/docs架构 PDF:
http://localhost:8000/architecture.pdf
🧪 验证与评估
# Run full automated test suite (28 tests)
python -m pytest tests/ -v
# Run independent Critic Agent technical audit
python -m app.evals.judge_agentTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Hosted Shopify MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Meta Ads MCP server: run Facebook and Instagram campaigns, ad sets, ads and reports from AI.
Multi-tenant MCP gateway for AI commerce. One connection, every store.
Multi-tenant MCP gateway for AI commerce. One connection, every store.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceA Shopify-focused MCP server that enables AI agents to manage store operations like order tracking, product discovery, and checkout link generation. It facilitates customer-facing interactions including shipping estimates and real-time inventory searches.-
- AlicenseNot gradedqualityCmaintenanceA comprehensive MCP server for Shopify Admin API integration, enabling AI assistants to manage products, orders, customers, inventory, analytics, and more through natural language.26 npm20MIT
- FlicenseNot gradedqualityDmaintenanceHosted MCP server connecting Shopify, Klaviyo, GA4, Meta Ads, Google Ads, Xero, Gorgias and 20+ e-commerce data sources so AI assistants can answer merchant questions that span every source at once.-
- AlicenseNot gradedqualityCmaintenanceMCP server for e-commerce operations including product catalog management, cart/checkout, and Stripe integration, with built-in EU AI Act compliance.86 PyPIMIT