Inspiration Every engineer knows the 3 AM dread the pager goes off, a cloud service is down, and you're scrambling through logs while customers are screaming. Cloud incidents are repetitive, expensive, and emotionally draining. According to industry reports, the average cost of cloud downtime exceeds $300,000 per hour.
I was tired of watching brilliant engineers waste their cognitive energy on the same fires, week after week. I asked myself: What if we could build an AI team that handles the grunt work detecting, diagnosing, and proposing fixes while keeping humans in the loop for critical decisions?
That's when I discovered the Global AI Hackathon with Qwen Cloud and realized Qwen's multi-model ecosystem with Qwen-Plus for reasoning, Qwen-Flash for speed, and Qwen-Coder for code generation was the perfect foundation. I decided to build Aegis: an autonomous, multi-agent cloud operations team that turns incident response from a firefight into a well-orchestrated workflow.
What it does Aegis is a self-healing cloud infrastructure system powered by a swarm of specialized Qwen agents: Detective Agent (Qwen-Flash): Continuously monitors cloud logs and metrics, detecting anomalies in real-time with sub-second latency. Diagnostician Agent (Qwen-Plus): Performs deep causal analysis to identify root causes, correlating events across distributed systems. Remediation Agent (Qwen-Coder): Generates executable fix plans restart commands, rollback scripts, or configuration patches. Reporter Agent (Qwen-Flash): Automatically documents every incident with a complete post-mortem report. Memory Agent (Qwen-Plus + pgvector): Stores every incident and solution in persistent vector memory, enabling the system to learn and improve across sessions.
The system operates with a human-in-the-loop approval checkpoint critical actions require engineer confirmation before execution. This balances autonomous efficiency with responsible AI engineering.
Measurable impact: Reduces mean-time-to-resolution (MTTR) from hours to minutes, cuts downtime costs, and lets engineers focus on building features instead of fighting fires.
How we built it Architecture: A five-layer system designed for production-grade deployment on Alibaba Cloud: Layer Technology Purpose Presentation React + TypeScript + Tailwind CSS Real-time incident dashboard API Gateway FastAPI + Nginx Authentication, routing, rate limiting Orchestrator Python + Qwen Cloud SDK + LangChain Multi-agent coordination & task decomposition Agents Qwen-Plus / Qwen-Flash / Qwen-Coder Specialized AI reasoning & generation Data PostgreSQL + pgvector + Redis Persistent memory, caching, session management
Key technical decisions:
- Multi-Agent Orchestration: Instead of a single monolithic chatbot, I built specialized agents that communicate via a message bus and negotiate solutions. This mirrors how real engineering teams operate.
- Qwen Model Selection: Each agent uses the optimal Qwen model for its role—Qwen-Flash for high-volume log parsing (fastest and most cost-effective), Qwen-Plus for complex causal reasoning, and Qwen-Coder for precise code generation.
- Persistent Memory: Implemented vector similarity search with pgvector, allowing Aegis to remember past incidents and apply learned solutions automatically.
- Human Checkpoints: Built an approval workflow using WebSockets for real-time engineer notifications and decision capture.
- Production-Ready Deployment: Containerized with Docker, deployed on Alibaba Cloud ECS with environment variables for secrets management.
Challenges we ran into
- Agent Coordination Complexity: Getting five agents to collaborate without cascading failures was brutal. I solved this by implementing a supervisor pattern where a lightweight orchestrator manages task decomposition and monitors agent health.
- Prompt Engineering for Structured Output: Qwen agents needed to output JSON for inter-agent communication. I iterated through 20+ prompt versions before landing on a format that consistently returned valid, parseable responses with the required fields.
- Memory Retrieval Accuracy: Early versions retrieved irrelevant past incidents. I tuned the vector similarity threshold and added metadata filtering (incident type, severity, service) to achieve 89% relevant retrieval rate.
- Time Constraints: Building a full-stack multi-agent system solo in a hackathon timeframe required ruthless prioritization. I focused on the core agent loop first, then added the UI, and saved polish for last.
Accomplishments that we're proud of
- A working multi-agent system with 5 specialized Qwen agents communicating and collaborating in real-time.
- Persistent memory that actually works—Aegis remembers past incidents and applies learned solutions.
- Human-in-the-loop approval that makes this enterprise-ready, not just a toy demo.
- Clean, professional UI that visualizes the entire incident lifecycle from detection to resolution.
- Measurable efficiency demonstrated through load testing—Aegis resolves common incidents 87% faster than manual processes.
- Production-grade code with comprehensive documentation, Docker setup, and deployment scripts.
What we learned
- Qwen's OpenAI-compatible API is a game-changer. It allowed me to use familiar tooling (LangChain, Pydantic) while leveraging Qwen's unique strengths—especially the 1M-token context window for processing massive log dumps.
- Multi-agent systems > single chatbots. Specialized agents with distinct roles outperform a single generalist model in complex, multi-step tasks. The "team" approach is more scalable, debuggable, and explainable.
- Memory is the missing piece. Most AI agents have amnesia. Adding persistent memory transforms Aegis from a stateless responder into a system that actually improves over time.
- Human-in-the-loop is non-negotiable. Enterprise customers won't trust fully autonomous systems. Building approval workflows builds trust and enables gradual automation adoption.
- The hackathon process itself taught me to ship fast, prioritize ruthlessly, and document everything skills that translate directly to real-world engineering.
What's next for Aegis
- Open-Source Release: Publishing the full codebase on GitHub with an MIT license for the community to fork and extend.
- Alibaba Cloud Native Integrations: Deep integration with Alibaba Cloud's Log Service, OSS, and RDS for seamless deployment.
- Self-Improving Agents: Using reinforcement learning from human feedback (RLHF) to let Aegis learn from engineer approval/rejection patterns.
- Predictive Incident Prevention: Training the Detective Agent to predict incidents before they happen using anomaly forecasting.
- Multi-Cloud Support: Extending beyond Alibaba Cloud to AWS, GCP, and Azure making Aegis the universal self-healing layer for any cloud.
- Competing in Future Tracks: Taking lessons from this hackathon to build even more sophisticated agent systems in future Qwen Cloud competitions.
- The hackathon process itself taught me to ship fast, prioritize ruthlessly, and document everything skills that translate directly to real-world engineering.
Built With
- alibaba-cloud-ecs
- alibaba-cloud-oss
- docker-docker-compose
- fastapi
- github
- langchain
- locust
- nginx
- postgresql-15+
- pytest
- python-3.11+
- qwen-cloud-api
- react-18
- redis
- typescript
- websockets
Log in or sign up for Devpost to join the conversation.