<?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: muhammad bilal hassan</title>
    <description>The latest articles on DEV Community by muhammad bilal hassan (@muhammad_bilalhassan).</description>
    <link>https://dev.to/muhammad_bilalhassan</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%2F4032780%2F37ef2a0e-e18b-4a5b-b4a5-433f10bad5e8.jpg</url>
      <title>DEV Community: muhammad bilal hassan</title>
      <link>https://dev.to/muhammad_bilalhassan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/muhammad_bilalhassan"/>
    <language>en</language>
    <item>
      <title>We built an AI society that argues about outages - and it's 3x more reliable than one agent</title>
      <dc:creator>muhammad bilal hassan</dc:creator>
      <pubDate>Thu, 16 Jul 2026 21:23:52 +0000</pubDate>
      <link>https://dev.to/muhammad_bilalhassan/we-built-an-ai-society-that-argues-about-outages-and-its-3x-more-reliable-than-one-agent-1mbf</link>
      <guid>https://dev.to/muhammad_bilalhassan/we-built-an-ai-society-that-argues-about-outages-and-its-3x-more-reliable-than-one-agent-1mbf</guid>
      <description>&lt;p&gt;&lt;em&gt;How a team of Qwen-powered agents watch a live app, debate what broke, prove their fix&lt;br&gt;
against reality, and get better every time.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this actually started
&lt;/h2&gt;

&lt;p&gt;Back in 2023, in my final year of my CS degree, a senior alumnus working at IBM told me&lt;br&gt;
about a problem IBM's own Watsonx team was exploring: could an LLM watch a database's&lt;br&gt;
error logs and fix things automatically? He handed my partner and me roughly that same&lt;br&gt;
problem as our final-year project. So we built a rough version of it — a local,&lt;br&gt;
Linux-based Python script. A Watchman-style process tailed the database's log file, and&lt;br&gt;
the moment an error appeared, it shipped the log straight to Gemini, parsed whatever fix&lt;br&gt;
came back, and applied it directly in the terminal. No debate. No second opinion. No check&lt;br&gt;
that the fix actually worked. Just one model's guess, applied on faith.&lt;/p&gt;

&lt;p&gt;It worked often enough to be exciting. A team like that typically runs on about five DBAs;&lt;br&gt;
ours got by with two, since most of the routine error-resolution work was already&lt;br&gt;
automated — until the same problem kept recurring, and a DBA still had to step in and&lt;br&gt;
clean up by hand. At the time, "agent," "RAG," and "MCP"&lt;br&gt;
weren't words I knew yet. I didn't have the vocabulary for&lt;br&gt;
what was actually missing: verification, disagreement, and trust.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with one smart agent
&lt;/h2&gt;

&lt;p&gt;Give a single large language model your logs, your metrics, and the ability to run&lt;br&gt;
commands, and it will confidently diagnose an outage. Sometimes it's right. The trouble is&lt;br&gt;
the other times: a lone agent that is &lt;em&gt;confidently wrong&lt;/em&gt; will apply a fix that doesn't&lt;br&gt;
work, or one that makes things worse, and then tell you it's done. There's no second&lt;br&gt;
opinion, no adversary, and — most dangerously — often no check that the system actually&lt;br&gt;
came back. That's exactly the failure mode my final-year script had, and exactly what I&lt;br&gt;
wanted to fix once I actually knew how.&lt;/p&gt;

&lt;p&gt;Incident response is exactly the domain where that failure mode is both most tempting to&lt;br&gt;
automate and most costly to get wrong. So we asked a narrower, more honest question: &lt;strong&gt;can&lt;br&gt;
a &lt;em&gt;society&lt;/em&gt; of agents — with disagreement, staked confidence, and a referee grounded in&lt;br&gt;
reality — be measurably more trustworthy than one agent working alone?&lt;/strong&gt; And can we &lt;em&gt;prove&lt;/em&gt;&lt;br&gt;
it rather than assert it?&lt;/p&gt;

&lt;p&gt;That's Mayday, our entry for the Global AI Hackathon with Qwen Cloud, Track 3: Agent&lt;br&gt;
Society.&lt;/p&gt;

&lt;h2&gt;
  
  
  The setup: a patient that really breaks
&lt;/h2&gt;

&lt;p&gt;We built a real Laravel CRM — login, dashboard, users, orders, reports — and called it the&lt;br&gt;
&lt;strong&gt;patient&lt;/strong&gt;. Then we built eight fault injectors that break it in controlled but genuine&lt;br&gt;
ways: five corrupt a real configuration value (a database pointer, an exhausted connection&lt;br&gt;
pool, a bad API key, a renamed route), and three corrupt real source code (a misspelled&lt;br&gt;
method, a broken template). Each fault leaves a real clue trail in the logs, exactly as a&lt;br&gt;
production incident would.&lt;/p&gt;

&lt;p&gt;The single most important design decision is what we call the &lt;strong&gt;golden rule&lt;/strong&gt;: there is a&lt;br&gt;
private ledger that records what the injector broke — but &lt;em&gt;nothing that counts as the&lt;br&gt;
system working is ever allowed to read it&lt;/em&gt;. Not the app's routes, not its health check, not&lt;br&gt;
any agent, not any tool. The ledger exists only to &lt;em&gt;grade&lt;/em&gt; a run after the fact. Every fix&lt;br&gt;
the agents make repairs the app's real state, discovered from evidence — never copied from&lt;br&gt;
an answer key. Without that rule, a multi-agent demo is theatre. With it, everything you&lt;br&gt;
see is real.&lt;/p&gt;

&lt;h2&gt;
  
  
  The society: watch, bid, argue, verify, learn
&lt;/h2&gt;

&lt;p&gt;When the patient breaks, here's what happens — end to end, autonomously:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A Watchman&lt;/strong&gt; patrols every page of the app and opens an incident the moment one fails.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A Dispatcher&lt;/strong&gt; classifies the failure and runs a &lt;strong&gt;trust-weighted auction&lt;/strong&gt;. Two&lt;br&gt;
investigator agents bid for the case, and each bid is weighted by how accurate that agent&lt;br&gt;
has been on &lt;em&gt;this category&lt;/em&gt; of failure in the past. Skin in the game, from the first step.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Two Investigators&lt;/strong&gt; go to work — and here's the twist that makes the society real: they&lt;br&gt;
have &lt;em&gt;different tools&lt;/em&gt;. One can read source code and tail exceptions; the other leans on&lt;br&gt;
metrics and configuration inspection. Because they see different slices of the truth, they&lt;br&gt;
often reach different conclusions. So they &lt;strong&gt;debate&lt;/strong&gt;: each stakes a confidence bet on its&lt;br&gt;
hypothesis, cites live tool evidence (the actual exception, the real config value — not a&lt;br&gt;
runbook), attacks the other's reasoning, and then holds or revises.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A deterministic Adjudicator&lt;/strong&gt; settles it — but &lt;em&gt;not&lt;/em&gt; by picking the better argument.&lt;br&gt;
It &lt;strong&gt;trials each proposed fix against the real health check&lt;/strong&gt;: apply the candidate, ask the&lt;br&gt;
app if it recovered, then revert. The winner is whatever genuinely heals the patient. This&lt;br&gt;
is the honesty guarantee made mechanical: "resolved" can only ever mean the app actually&lt;br&gt;
came back.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A Verifier&lt;/strong&gt; commits the cure. Config fixes apply autonomously; source-code changes pause&lt;br&gt;
for a single human approval click (you don't let an AI rewrite your code unwatched); and&lt;br&gt;
anything that doesn't hold is rolled back.&lt;/p&gt;

&lt;p&gt;Finally, &lt;strong&gt;trust settles&lt;/strong&gt; toward whoever was right, and a &lt;strong&gt;case file&lt;/strong&gt; is written to&lt;br&gt;
memory. The next incident of that kind starts with hindsight — the society gets measurably&lt;br&gt;
better over time.&lt;/p&gt;

&lt;p&gt;All of this streams into a &lt;strong&gt;War Room&lt;/strong&gt;: a siren when an incident opens, operator stations&lt;br&gt;
showing each agent's reasoning in speech bubbles, trust bars that shift as the society&lt;br&gt;
learns, a live mean-time-to-resolve clock, the human-approval modal, and the patient page&lt;br&gt;
itself going from a 500 error back to healthy in an embedded frame.&lt;/p&gt;

&lt;h2&gt;
  
  
  The proof: a fair fight against one agent
&lt;/h2&gt;

&lt;p&gt;Track 3 asks for efficiency gains over a single-agent baseline, so we built one — the same&lt;br&gt;
model, the same tools, the same apply-and-verify path — and benchmarked both over all eight&lt;br&gt;
faults on &lt;strong&gt;&lt;code&gt;qwen-max&lt;/code&gt;&lt;/strong&gt;. The critical fairness detail: we gave the lone agent the &lt;em&gt;same&lt;br&gt;
improved prompts&lt;/em&gt;, so the only thing that differs between the two is the society mechanism.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th&gt;Resolved&lt;/th&gt;
&lt;th&gt;Rate&lt;/th&gt;
&lt;th&gt;Mean MTTR&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Society&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;6 / 8&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;75%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;91.2s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Single-agent baseline&lt;/td&gt;
&lt;td&gt;2 / 8&lt;/td&gt;
&lt;td&gt;25%&lt;/td&gt;
&lt;td&gt;40.0s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Three times the resolution rate.&lt;/strong&gt; And the &lt;em&gt;where&lt;/em&gt; is the whole story: the society wins&lt;br&gt;
exactly on the hard faults — all three code bugs and the routing failure — where the lone&lt;br&gt;
agent bails out early or commits a fix that doesn't work. The society is slower by about&lt;br&gt;
fifty seconds per incident, because debating and trialing fixes takes time. That's not a&lt;br&gt;
bug; it's the same tradeoff a real on-call organization makes every day: a little latency&lt;br&gt;
for a lot more reliability.&lt;/p&gt;

&lt;h2&gt;
  
  
  What was actually hard
&lt;/h2&gt;

&lt;p&gt;It wasn't the agents. It was the honesty. Guaranteeing that no diagnosis path could ever&lt;br&gt;
reach the fault ledger, and that "resolved" always meant a real health check passed, shaped&lt;br&gt;
the entire architecture. The second-hardest part was resisting the urge to make the society&lt;br&gt;
look good with better prompting — the fair benchmark meant improving the baseline in&lt;br&gt;
lockstep. And a small but instructive one: the dev server is single-threaded, so a health&lt;br&gt;
check during an active fault can take ten seconds; the War Room caches health in a&lt;br&gt;
background thread so the live UI never freezes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we learned
&lt;/h2&gt;

&lt;p&gt;Disagreement is a feature. A second agent with different tools and a stake in being right&lt;br&gt;
catches the confident-but-wrong fixes a lone agent ships. And a referee grounded in reality&lt;br&gt;
— &lt;em&gt;did the app actually recover?&lt;/em&gt; — is worth more than any amount of clever argument. That&lt;br&gt;
combination, not the number of agents, is what made the system trustworthy.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;We're deploying the patient and the society to Alibaba Cloud (Simple Application Server +&lt;br&gt;
ApsaraDB RDS Postgres + OSS), which also closes out the one fault whose healthy value only&lt;br&gt;
exists in a real production environment. Then: a bigger fault catalog, and pushing the&lt;br&gt;
learning curve further with richer case-file memory.&lt;/p&gt;

&lt;h2&gt;
  
  
  Built on Qwen
&lt;/h2&gt;

&lt;p&gt;The whole society runs on Qwen — &lt;code&gt;qwen-max&lt;/code&gt; on Qwen Cloud for the real numbers, and&lt;br&gt;
&lt;code&gt;qwen2.5&lt;/code&gt; via Ollama for fast local iteration, switchable with a single environment&lt;br&gt;
variable. The tool layer speaks the Model Context Protocol; trust and memory persist in&lt;br&gt;
SQLite, ready for Postgres in production; and the War Room is dependency-free standard&lt;br&gt;
library, so there's nothing to install to watch a society of AI agents argue an outage back&lt;br&gt;
to health.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Everything in our demo is real: the break, the debate, the fix, the recovery. That was&lt;br&gt;
the point.&lt;/em&gt;&lt;/p&gt;

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