Skip to main content
Glama
Shopify AI Ops Agent

Shopify AI Ops Agent

🛍️ Shopify AI 运营代理

Python 3.11+ FastAPI LangGraph License: MIT

一个基于 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

🏗️ 核心架构不变量

  1. 执行前风险与策略门控:破坏性删除、财务预算和对外通信会触发 LangGraph 中断(interrupt),要求人工批准。

  2. 解耦的 MCP 工具层:所有业务能力均打包为 5 个无状态 MCP 工具服务器(Shopify、Analytics、Meta Ads、Communications、Trend Intelligence)。

  3. 确定性业务分析:财务指标使用确定性 SQL 例程计算,消除 LLM 算术幻觉。

  4. 防过早胜利传感器:代理会重新查询实时状态,以数学方式验证变更确实发生后才报告完成。

  5. 左移评估与追踪: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_agent

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      A 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.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      A comprehensive MCP server for Shopify Admin API integration, enabling AI assistants to manage products, orders, customers, inventory, analytics, and more through natural language.
      26 npm
      20
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Hosted 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.
      -