Inspiration
Every day, small and medium businesses lose 40% of potential revenue because they cannot respond to customers fast enough. Support tickets pile up. Quotes take days. Follow-ups get forgotten. I asked myself: what if an AI agent could handle 80% of routine business operations autonomously and only escalate critical decisions to humans?
What it does
NexusOps is a multi-agent autonomous business operations system that processes the full customer lifecycle without human intervention. When a customer email arrives, the system:
- Classifies the message (sales inquiry, support ticket, complaint, follow-up, spam)
- Retrieves relevant memories from the customer's interaction history using semantic search
- Generates quotes with pricing rules, discounts, and approval thresholds
- Drafts personalized responses using customer context and preferences
- Schedules follow-ups and calendar meetings
- Escalates to humans when confidence drops below threshold, with full reasoning chains
How we built it
The system uses 5 specialized agents coordinated by a central orchestrator:
- Classifier Agent (Qwen-Plus) - Fast, cheap categorization
- Responder Agent (Qwen3-Coder-Next) - Contextual response drafting
- Quoter Agent (Qwen3-Coder-Next) - Quote generation with pricing rules
- Scheduler Agent (Qwen-Plus) - Calendar and follow-up management
- Escalator Agent (Qwen3-Coder-Next) - Human escalation packages
All agents share a dual-layer memory system: Redis/Tair for short-term context (24h TTL) and PostgreSQL with pgvector for long-term semantic search across entire interaction history. The MCP tool server exposes 9 business tools including email, CRM, calendar, document generation, and analytics.
Challenges
- Context window management: Five agents with memory, tools, and history can exceed context limits. Solved by limiting memory retrieval to 5 entries and using cheaper models for simple tasks.
- Latency: A 5-agent chain takes 15-20 seconds. Optimized by routing classification to Qwen-Plus (fast) and only activating necessary downstream agents.
- Cost optimization: Qwen3-Coder-Next is expensive. Routing simple tasks to Qwen-Plus saves 60% on token costs.
- Human-in-the-loop: Full autonomy is a trap. Built confidence-based escalation with reasoning chain presentation for human reviewers.
Accomplishments
- Built a complete multi-agent system with 5 specialized agents in under 48 hours
- Validated Qwen function calling with 3 passing API spikes before building the framework
- Implemented semantic memory search using pgvector with 1024-dimensional embeddings
- Created a Streamlit dashboard for real-time monitoring and human queue management
- All code runs on Alibaba Cloud infrastructure (Model Studio, RDS PostgreSQL, Tair, OSS)
What we learned
The hardest part of autonomous agents is not the AI. It is the engineering around it: memory management, error handling, human escalation, and cost optimization. Qwen Cloud gave the right foundation. The models are capable, the API is clean, and the OpenAI-compatible interface meant zero custom adapters needed.
What's next
- Real email integration via Alibaba Direct Mail
- Real CRM backend with customer database
- PDF generation with ReportLab for professional quotes
- A/B testing different agent prompts and model combinations
- Production deployment with load balancing and monitoring
Built With
- alibaba
- cloud
- contextprotocol
- docker
- fastapi
- model
- openai
- pgvector
- postgresql
- python
- qwen
- redis
- sdk
- streamlit
- tair
Log in or sign up for Devpost to join the conversation.