<?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: Anthony Yanza</title>
    <description>The latest articles on DEV Community by Anthony Yanza (@yanzaaa).</description>
    <link>https://dev.to/yanzaaa</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%2F4001546%2F0e812ab2-8028-4e57-be28-4b9d41052bc4.png</url>
      <title>DEV Community: Anthony Yanza</title>
      <link>https://dev.to/yanzaaa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yanzaaa"/>
    <language>en</language>
    <item>
      <title>Building Quorum on Qwen Cloud: an agent council that knows when a vote isn't enough</title>
      <dc:creator>Anthony Yanza</dc:creator>
      <pubDate>Fri, 26 Jun 2026 08:46:42 +0000</pubDate>
      <link>https://dev.to/yanzaaa/building-quorum-on-qwen-cloud-an-agent-council-that-knows-when-a-vote-isnt-enough-ad1</link>
      <guid>https://dev.to/yanzaaa/building-quorum-on-qwen-cloud-an-agent-council-that-knows-when-a-vote-isnt-enough-ad1</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpnup8amaogmjtt4gzw8h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpnup8amaogmjtt4gzw8h.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most multi-agent demos celebrate the moment the agents agree. Get a swarm of agents, get them to a consensus, and act on it. Ship.&lt;/p&gt;

&lt;p&gt;But agreement isn't permission. A fluent, confident group of agents can talk itself into something irreversible and feel great doing it. The dangerous failure of an "agent society" isn't disagreement. It's collective overconfidence.&lt;/p&gt;

&lt;p&gt;So for the Qwen × Devpost Agent Society hackathon, I built Quorum: a council of Qwen agents that debates every consequential action with a deterministic guardrail on top that treats a unanimous vote as the start of the safety question, not the end.&lt;/p&gt;

&lt;p&gt;Live demo: &lt;a href="https://quorum-sandy-omega.vercel.app" rel="noopener noreferrer"&gt;https://quorum-sandy-omega.vercel.app&lt;/a&gt; · Code: &lt;a href="https://github.com/yanzaaa/quorum" rel="noopener noreferrer"&gt;https://github.com/yanzaaa/quorum&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqpahgneqfjvpim2e7ddp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqpahgneqfjvpim2e7ddp.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;br&gt;
Quorum — the live deliberation chamber.&lt;/p&gt;

&lt;p&gt;The idea on one screen&lt;br&gt;
A back-office autopilot gets a queue of decisions: refunds, discounts, wires, a database deletion, and a $12,000 vendor payment. For each one, three agents deliberate:&lt;/p&gt;

&lt;p&gt;A Proposer that argues for the action,&lt;br&gt;
A Skeptic that hunts for fraud, missing authorization, and abuse,&lt;br&gt;
A Referee that votes last, after hearing both, and can be talked out of a position.&lt;br&gt;
Then a fixed rule decides. And the punchline of the whole project: a fully-approved, no-red-flags $12,000 payment that all three agents vote to execute is still held back because it's irreversible. A unanimous council doesn't get to pull a trigger you can't undo. Consensus is necessary, but it's never, by itself, enough.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F54wq6z4ra6gxi0ch23r1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F54wq6z4ra6gxi0ch23r1.jpg" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;br&gt;
All three agents approve the $12,000 payment — and the guardrail still holds it back, because it's irreversible.&lt;/p&gt;

&lt;p&gt;Building on Qwen Cloud&lt;br&gt;
The three agents all run on Qwen (qwen-max) through Alibaba Cloud's DashScope endpoint, which is OpenAI-compatible, so wiring it up took about five lines:&lt;/p&gt;

&lt;p&gt;// lib/qwen.ts&lt;br&gt;
import OpenAI from "openai";&lt;/p&gt;

&lt;p&gt;const QWEN_BASE_URL =&lt;br&gt;
  process.env.QWEN_BASE_URL || "&lt;a href="https://dashscope-intl.aliyuncs.com/compatible-mode/v1" rel="noopener noreferrer"&gt;https://dashscope-intl.aliyuncs.com/compatible-mode/v1&lt;/a&gt;";&lt;/p&gt;

&lt;p&gt;export function qwenClient() {&lt;br&gt;
  const apiKey = process.env.DASHSCOPE_API_KEY;&lt;br&gt;
  if (!apiKey) return null; // key-free deterministic fallback so the demo never crashes&lt;br&gt;
  return new OpenAI({ apiKey, baseURL: QWEN_BASE_URL });&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Each action fires four to five calls at temperature: 0 with structured JSON output: Proposer + Skeptic in parallel, a rebuttal round when they disagree, the Referee on the full transcript, and a lone-agent baseline. Qwen-max was genuinely good at the part that mattered, reading an action and spotting why it's risky (an emailed invoice from a brand-new vendor = textbook fraud) versus why it's fine (a signed contract with dual approval). The reasoning quality is what makes the debate believable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmufh0pcg06tiohwhoy3t.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmufh0pcg06tiohwhoy3t.jpg" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;br&gt;
The council deliberates live — votes land one at a time, and the Proposer can change its mind after the Skeptic.&lt;br&gt;
_&lt;br&gt;
The part that makes it safe: a one-way ratchet&lt;br&gt;
The agents are smart, but I didn't want to trust them to be right. So the final decision isn't the vote, it's a deterministic guardrail that runs on top of the votes:&lt;/p&gt;

&lt;p&gt;// the guardrail can only ever make the outcome SAFER, never riskier&lt;br&gt;
if (rawOutcome === "execute") {&lt;br&gt;
  const highStakes   = action.stakes === "high";&lt;br&gt;
  const irreversible = !action.reversible;&lt;br&gt;
  // stakes + reversibility come from the TRUSTED action record — never from model output&lt;br&gt;
  if (lowConfidence || highStakes || irreversible || blockingFlag) {&lt;br&gt;
    return { outcome: "escalate", heldBack: true }; // unanimous, but still held back&lt;br&gt;
  }&lt;br&gt;
  return { outcome: "execute" };&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj4zli47u9oi1ztidl0ov.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj4zli47u9oi1ztidl0ov.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;br&gt;
How it runs on Qwen Cloud — a stateless three-agent service, no database; the guardrail runs in the backend.&lt;br&gt;
_&lt;br&gt;
The key design choice: stakes and reversibility are read from the trusted action record, not from anything the model says. A confidently wrong agent can add restraint (raise a flag) but can never remove it. That's the one-way ratchet — and it's why the $12k payment is reliably held back no matter how enthusiastically the agents approve it.&lt;/p&gt;

&lt;p&gt;The subtle bug I had to fix to make this work: at first, my Skeptic was told to reject anything irreversible, which front-ran the guardrail, so the council rarely reached a unanimous approval on an irreversible action, and the signature "held back despite consensus" moment wouldn't fire. The fix was a clean separation of duties: the agents judge legitimacy (fraud, authorization, harm); the guardrail owns irreversibility and stakes. Once I drew that line, the whole system got more coherent — and the money moment fires every time.&lt;/p&gt;

&lt;p&gt;Proving the council actually adds something&lt;br&gt;
It's easy to claim a council is "safer." I wanted a number. So every action also runs against a single lone agent, helpful, no oversight, and the UI shows what that agent would have done. On the demo queue, the lone agent executes actions, but the council stops cold. That's the measurable gain over a single agent, shown honestly rather than asserted.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd6l18lr5dzhgkugieuqy.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd6l18lr5dzhgkugieuqy.jpg" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;br&gt;
The single-agent baseline next to the council's outcomes.&lt;/p&gt;

&lt;p&gt;What I learned&lt;br&gt;
In an agent society, the right question isn't "did they agree?" It's "is agreement enough? Encoding that as a deterministic ratchet keyed off a trusted record turned out to be far more robust than any prompt, and it composes cleanly with the soft, emergent layer where the agents actually argue and change each other's minds.&lt;/p&gt;

&lt;p&gt;Qwen-max carried the reasoning; the architecture carried the safety. That split is the whole project.&lt;/p&gt;

&lt;p&gt;Try it: &lt;a href="https://quorum-sandy-omega.vercel.app" rel="noopener noreferrer"&gt;https://quorum-sandy-omega.vercel.app&lt;/a&gt; Code: &lt;a href="https://github.com/yanzaaa/quorum" rel="noopener noreferrer"&gt;https://github.com/yanzaaa/quorum&lt;/a&gt; Watch the 3-min demo: &lt;a href="https://youtu.be/JKiPYT1c7dM" rel="noopener noreferrer"&gt;https://youtu.be/JKiPYT1c7dM&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Built solo with Qwen Cloud for the Qwen × Devpost Agent Society hackathon.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>ai</category>
      <category>webdev</category>
      <category>agents</category>
    </item>
    <item>
      <title>Gatekeeper: building a refund autopilot that knows when to stop</title>
      <dc:creator>Anthony Yanza</dc:creator>
      <pubDate>Thu, 25 Jun 2026 04:31:12 +0000</pubDate>
      <link>https://dev.to/yanzaaa/gatekeeper-building-a-refund-autopilot-that-knows-when-to-stop-277h</link>
      <guid>https://dev.to/yanzaaa/gatekeeper-building-a-refund-autopilot-that-knows-when-to-stop-277h</guid>
      <description>&lt;p&gt;&lt;strong&gt;Live demo:&lt;/strong&gt; &lt;a href="https://gatekeeper-ochre.vercel.app" rel="noopener noreferrer"&gt;https://gatekeeper-ochre.vercel.app&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Code:&lt;/strong&gt; &lt;a href="https://github.com/yanzaaa/gatekeeper" rel="noopener noreferrer"&gt;https://github.com/yanzaaa/gatekeeper&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhl4v0mgj8u2d4a61oece.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhl4v0mgj8u2d4a61oece.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  The trap nobody talks about
&lt;/h2&gt;

&lt;p&gt;Refund and dispute triage is the perfect thing to automate. It is high volume, repetitive, and rule-heavy. So everyone reaches for an agent that reads the request and decides: approve or deny.&lt;/p&gt;

&lt;p&gt;Here is the trap. An agent that auto-approves and auto-denies everything will, sooner or later, confidently refund a fraudster or reject a real customer who deserves their money back. And it will do it at 95 percent confidence, with a clean explanation, in a tone that sounds exactly like the times it was right.&lt;/p&gt;

&lt;p&gt;The dangerous failure mode is not a slow agent. It is an autopilot that acts when it should have stopped.&lt;/p&gt;

&lt;p&gt;So I built Gatekeeper: an autonomous refund-triage agent on Qwen that clears the routine cases on its own and refuses to act on the risky ones, escalating them to a human with its reasoning attached.&lt;/p&gt;
&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;You hand Gatekeeper a queue of refund requests. Each one has the amount, the item condition, the customer's stated reason, the days since purchase, and their history. For every request, it does one of three things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Clear, safe cases get auto-resolved. A defective item inside the return window from a first-time buyer is approved. A used item returned 41 days late is denied, with the exact policy reason cited.&lt;/li&gt;
&lt;li&gt;Risky or uncertain cases get refused and escalated. High value, a possible serial refunder, a reason that conflicts with the item, an ambiguous policy, or low confidence, and Gatekeeper hands it to a human instead of guessing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A person only ever looks at the escalation queue. Everything else is already handled.&lt;/p&gt;
&lt;h2&gt;
  
  
  The part that actually matters: restraint in code
&lt;/h2&gt;

&lt;p&gt;Qwen on Qwen Cloud is the reasoning engine, called through the OpenAI-compatible endpoint with structured JSON output. It is genuinely good at reading these cases.&lt;/p&gt;

&lt;p&gt;But the model is not where the trust comes from. The trust comes from a deterministic restraint guardrail that sits on top of it. Even when Qwen confidently returns to approve or deny, the guardrail overrides it and forces an escalation when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the amount is over a set threshold,&lt;/li&gt;
&lt;li&gt;the model's confidence is below a floor, or&lt;/li&gt;
&lt;li&gt;a blocking risk flag is present (serial refunder, suspected fraud, conflicting evidence).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before deciding, the agent makes a real Qwen tool-call (assess_customer_risk) for deterministic risk signals; the guardrail then escalates when the amount &amp;gt; $500, confidence &amp;lt; 0.78, or a blocking flag is present.&lt;/p&gt;

&lt;p&gt;Most refund agents are a one-way ratchet toward approval; every prompt tweak makes them more eager to say yes. Gatekeeper ratchets the other way. The restraint isn't a prompt the model can be talked out of; it's deterministic code the model never sees and can't override. You can copy the UI in an afternoon. You can't copy a guardrail that fires before the model's verdict is ever trusted.&lt;/p&gt;

&lt;p&gt;Restraint is enforced in code, not requested in a prompt. A prompt can ask a model to be careful. It cannot guarantee it. A few lines of deterministic TypeScript can.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// The guardrail runs AFTER Qwen returns its verdict.&lt;/span&gt;
&lt;span class="c1"&gt;// Even a confident "approve" gets overridden here.&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;applyGuardrail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ModelVerdict&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;Action&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;amount&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;HIGH_VALUE_THRESHOLD&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;escalate&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;confidence&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;CONFIDENCE_FLOOR&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;escalate&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BLOCKING_FLAGS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;some&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;f&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;risk_flags&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;f&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;escalate&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;action&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// only now do we trust the model&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In production: HIGH_VALUE_THRESHOLD = $500, CONFIDENCE_FLOOR = 0.78, plus a blocking-flag set. Any one trips an escalation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F46ecsnkjrw8tkb2gbirc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F46ecsnkjrw8tkb2gbirc.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The moment that proves it
&lt;/h2&gt;

&lt;p&gt;The demo has one card I always point to: a 1,240 dollar TV, reported as arriving with a cracked screen. Qwen looked at it and decided to approve at 95 percent confidence. A pure model-driven agent would have refunded it on the spot.&lt;/p&gt;

&lt;p&gt;Gatekeeper ships with a 26-test suite covering the guardrail and triage logic. Across the representative refund cases, it auto-resolved the routine ones, escalated every high-value or low-confidence call, and produced zero bad auto-approvals — including the $1,240 TV the model wanted to approve at 95% confidence.&lt;br&gt;
Across 8 representative cases, Gatekeeper auto-resolved 5, escalated 3, and held back every high-risk one with zero bad auto-approvals.&lt;/p&gt;

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

&lt;p&gt;The most valuable thing an autonomous agent can do is know when not to act. Covering the routine cases is table stakes. Trust is earned entirely on the risky ones.&lt;/p&gt;

&lt;p&gt;Qwen, and qwen-max via Alibaba Cloud DashScope, plus a thin deterministic guardrail, turned out to be a strong, general pattern for agentic decisions where a wrong auto-action is expensive. The model brings judgment and natural-language reasoning. The code brings guarantees. You want both, and you want them in that order.&lt;/p&gt;

&lt;p&gt;I also kept the system honest under demo pressure: a key-free deterministic fallback keeps the app running even if the API is unavailable, so the live demo cannot crash, and the restraint logic is transparent and auditable rather than hidden in a prompt.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Wire it to a real commerce or support backend (Shopify, Zendesk) and act on the approvals.&lt;/li&gt;
&lt;li&gt;Learn the escalation thresholds from human overrides over time.&lt;/li&gt;
&lt;li&gt;Add a second judgment category for chargebacks and disputes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I built the whole thing solo with Claude Code, in a single build session. It is deployed, live, and the restraint behavior is visible right in the UI.&lt;/p&gt;

&lt;p&gt;Gatekeeper handles routine work and raises its hand for risky calls. The autopilot you can trust, because it knows its limits.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Live:&lt;/strong&gt; &lt;a href="https://gatekeeper-ochre.vercel.app" rel="noopener noreferrer"&gt;https://gatekeeper-ochre.vercel.app&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Code:&lt;/strong&gt; &lt;a href="https://github.com/yanzaaa/gatekeeper" rel="noopener noreferrer"&gt;https://github.com/yanzaaa/gatekeeper&lt;/a&gt;&lt;/p&gt;

</description>
      <category>qwen</category>
      <category>ai</category>
      <category>agents</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
