Inspiration

In enterprise retail, new employees face an overwhelming reality: hundreds of products, multiple service verticals (energy, logistics, digital services), and complex operational procedures they need to master before they can serve customers effectively. The typical learning curve is 2-3 weeks — during which the business loses revenue and customers lose patience.

We asked ourselves: What if an AI copilot could eliminate that learning curve entirely?

What it does

MyAgent is a multi-agent AI copilot that lets any employee — even on their first day — operate, sell, and advise like a seasoned expert. It features:

  • 7 specialized agents (Energy, Logistics, Support, Visual, Analytics, Society, Supervisor)
  • 20 MCP tools across 5 servers for real transactional execution
  • Agent Society: a multi-agent strategic debate where 5 AI agents (Sales, Marketing, Operations, Finance, Moderator) argue and converge on growth strategies using real business data
  • Persistent cross-session memory with intelligent forgetting
  • Visual analysis of bills and documents via Qwen VL
  • 7 languages with automatic detection
  • Intelligent Model Router with automatic failover across 30+ Qwen Cloud models

How we built it

  • Backend: FastAPI + LangGraph for multi-agent orchestration
  • Frontend: Next.js 14 + Tailwind CSS with SSE streaming for real-time workflow visualization
  • LLMs: Qwen Cloud (qwen3.6-flash, qwen-vl-max, text-embedding-v4) with automatic model failover
  • Protocol: MCP (Model Context Protocol) — 5 servers, 20 tools
  • Data: PostgreSQL + pgvector (RAG) + Redis (cache) + OSS (storage)
  • Observability: LangSmith + Alibaba Log Service (SLS)
  • Infrastructure: Alibaba Cloud ECS + VPC + Security Group
  • Security: Dual-layer guardrails (regex + ML content filter via Qwen)

Challenges we faced

  1. Model quota management: Free tier models exhaust quickly during development. We solved this by building an Intelligent Model Router that automatically falls back through 16 models per role — ensuring zero downtime regardless of individual quotas.

  2. MCP subprocess isolation: MCP servers running as subprocesses couldn't access environment variables. We implemented an in-process fallback transport that maintains the same MCP protocol interface.

  3. Agent Society consistency: Making 5 AI agents genuinely disagree (not just agree with each other) required carefully crafted personas with conflicting priorities and explicit instructions to challenge other agents' proposals.

  4. Multilingual in continuation mode: When the supervisor is skipped for follow-up messages, language detection had to be added at the graph level to maintain response language consistency.

Built With

Share this project:

Updates