<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: lenin coronel</title>
    <description>The latest articles on DEV Community by lenin coronel (@leno0421).</description>
    <link>https://dev.to/leno0421</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4010517%2F92b331e8-ae76-45ca-9541-b208bac22620.gif</url>
      <title>DEV Community: lenin coronel</title>
      <link>https://dev.to/leno0421</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/leno0421"/>
    <language>en</language>
    <item>
      <title>Building a Multi-Agent Society with Qwen Cloud — My Hackathon Journey</title>
      <dc:creator>lenin coronel</dc:creator>
      <pubDate>Wed, 01 Jul 2026 08:06:00 +0000</pubDate>
      <link>https://dev.to/leno0421/building-a-multi-agent-society-with-qwen-cloud-my-hackathon-journey-2cp8</link>
      <guid>https://dev.to/leno0421/building-a-multi-agent-society-with-qwen-cloud-my-hackathon-journey-2cp8</guid>
      <description>&lt;p&gt;When I first read the Track 3 description — &lt;em&gt;"Design a multi-agent collaboration system where multiple Agents with distinct capabilities work together through task division, dialogue, and negotiation"&lt;/em&gt; — I knew I had to build something beyond the typical "ask an AI and get an answer" pattern.&lt;/p&gt;

&lt;p&gt;What if agents could &lt;strong&gt;debate&lt;/strong&gt; with each other? What if they could &lt;strong&gt;disagree&lt;/strong&gt;, &lt;strong&gt;negotiate&lt;/strong&gt;, and &lt;strong&gt;reach consensus&lt;/strong&gt; — just like a real team of experts?&lt;/p&gt;

&lt;p&gt;That's how &lt;strong&gt;Qwen Council&lt;/strong&gt; was born.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Single-agent AI code review has a fundamental limitation: one model, one perspective. It might catch SQL injection but miss architectural debt. It might flag a performance issue but overlook accessibility problems.&lt;/p&gt;

&lt;p&gt;In the real world, code reviews are done by &lt;strong&gt;teams&lt;/strong&gt; — security engineers, architects, QA specialists. Each brings a different lens. Why should AI be any different?&lt;/p&gt;

&lt;h2&gt;
  
  
  The Architecture
&lt;/h2&gt;

&lt;p&gt;Qwen Council is a multi-agent system with &lt;strong&gt;14 specialised agents&lt;/strong&gt; running on Qwen Cloud, deployed on Alibaba Cloud ECS.&lt;/p&gt;

&lt;h3&gt;
  
  
  Two Modes
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Code Review&lt;/strong&gt; — 6 agents with distinct expertise (Security, Architecture, Quality, Performance, UX, Vision) review code through 4 structured debate rounds: individual analysis, cross-debate, refinement, and negotiation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;General Chat&lt;/strong&gt; — 8 personality-based agents (inspired by Feynman, Torvalds, Socrates, Harari, Miyazaki, Jung, Sun Tzu, and Franklin) answer any question. Each agent has a strict domain boundary — they decline out-of-scope questions. A router classifies the question and activates only the 1-3 most relevant agents.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Communication Protocol
&lt;/h3&gt;

&lt;p&gt;The key innovation is an inter-agent protocol based on cognitive linguistics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Inverted Pyramid&lt;/strong&gt;: Each finding starts with the conclusion first — one line any agent can grasp in 1 second.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Given-New&lt;/strong&gt;: In debate rounds, agents explicitly reference each other's findings before adding new evidence.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3-Level Memory
&lt;/h3&gt;

&lt;p&gt;Working memory (volatile) holds the current session. Episodic memory (PostgreSQL) stores past sessions with a forgetting curve that decays unused data. Semantic memory (PostgreSQL + pgvector) consolidates recurring patterns as vector embeddings.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Results
&lt;/h2&gt;

&lt;p&gt;I ran a benchmark comparing a single generalist agent vs the full council on the same code:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Single-Agent&lt;/th&gt;
&lt;th&gt;Multi-Agent&lt;/th&gt;
&lt;th&gt;Change&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Total findings&lt;/td&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;td&gt;127&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+958%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Categories covered&lt;/td&gt;
&lt;td&gt;6/6&lt;/td&gt;
&lt;td&gt;6/6&lt;/td&gt;
&lt;td&gt;100% overlap&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Unique findings&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;115&lt;/td&gt;
&lt;td&gt;+115&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The multi-agent system found &lt;strong&gt;10.6x more issues&lt;/strong&gt; while preserving everything the single agent caught.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploying on Alibaba Cloud
&lt;/h2&gt;

&lt;p&gt;The entire stack runs on a single &lt;strong&gt;Alibaba Cloud ECS instance&lt;/strong&gt; (2 vCPU, 4 GB RAM) in the Singapore region. Three Docker containers handle everything:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Nginx&lt;/strong&gt; serves the React frontend and routes API calls to the backend&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FastAPI&lt;/strong&gt; orchestrates the agents and manages the memory system&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PostgreSQL with pgvector&lt;/strong&gt; stores both session data and semantic embeddings&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The backend connects to &lt;strong&gt;Qwen Cloud&lt;/strong&gt; via its OpenAI-compatible API, using three models: &lt;strong&gt;qwen3-coder-plus&lt;/strong&gt; for code analysis, &lt;strong&gt;qwen-vl-plus&lt;/strong&gt; for visual inspection, and &lt;strong&gt;text-embedding-v3&lt;/strong&gt; for semantic memory embeddings.&lt;/p&gt;

&lt;p&gt;Why Alibaba Cloud? The ECS + Docker Compose setup gave me a simple, production-ready deployment with zero orchestration overhead. Qwen Cloud's native integration meant low-latency API calls from the ECS instance. And pgvector let me run hybrid relational + vector search in a single database — no separate vector DB needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Agents need boundaries&lt;/strong&gt;. Initially, every agent answered every question with equal competence. Adding explicit domain restrictions made the system much more realistic.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Routing matters&lt;/strong&gt;. A keyword-based classifier routes questions to 1-3 relevant agents. Getting this right is crucial — misrouting wastes tokens and dilutes quality.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Memory is hard&lt;/strong&gt;. The forgetting curve required careful tuning. Too aggressive and sessions disappear; too lenient and the database fills up.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;SSE streaming transforms UX&lt;/strong&gt;. Watching agents respond in real-time is dramatically more engaging than waiting for a single response.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Repository
&lt;/h2&gt;

&lt;p&gt;The full source code is open source under MIT license:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/02NIN20/qwen-council" rel="noopener noreferrer"&gt;github.com/02NIN20/qwen-council&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built for the &lt;a href="https://qwencloud-hackathon.devpost.com/" rel="noopener noreferrer"&gt;Global AI Hackathon Series with Qwen Cloud&lt;/a&gt; — Track 3: Agent Society.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>alibabachallenge</category>
      <category>ai</category>
      <category>agents</category>
      <category>hackathon</category>
    </item>
  </channel>
</rss>
