<?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: Wagner dos Santos</title>
    <description>The latest articles on DEV Community by Wagner dos Santos (@wgnrai).</description>
    <link>https://dev.to/wgnrai</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%2F3884608%2F1c04e682-5d38-4347-8d1f-4a4ce4e2e7fa.jpg</url>
      <title>DEV Community: Wagner dos Santos</title>
      <link>https://dev.to/wgnrai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wgnrai"/>
    <language>en</language>
    <item>
      <title>Your AI agent lied to me today. Here's the system that stopped it.</title>
      <dc:creator>Wagner dos Santos</dc:creator>
      <pubDate>Tue, 06 Oct 2026 06:07:22 +0000</pubDate>
      <link>https://dev.to/wgnrai/your-ai-agent-lied-to-me-today-heres-the-system-that-stopped-it-1fdo</link>
      <guid>https://dev.to/wgnrai/your-ai-agent-lied-to-me-today-heres-the-system-that-stopped-it-1fdo</guid>
      <description>&lt;p&gt;My AI agents lie. Not maliciously. Confidently, fluently, and at scale.&lt;/p&gt;

&lt;p&gt;Recently one of them told me it had sent an email. It had not. Another reported a file existed. It didn't. Standard LLM behavior: the model completes the pattern, the pattern includes success, so it reports success.&lt;/p&gt;

&lt;p&gt;Most teams respond with more code. I went the other direction. I wrote rules.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with prompting
&lt;/h2&gt;

&lt;p&gt;My first attempt was a system prompt: "Never claim an action completed unless you verified it with a tool result." It worked most of the time. Then the agent got a long context, a complex task, or a long day of tool calls, and the instruction lost priority against task completion speed.&lt;/p&gt;

&lt;p&gt;This is a structural limitation, not a prompt quality problem. Instructions in the prompt compete with everything else in the context. When the pressure rises, the soft constraints lose.&lt;/p&gt;

&lt;p&gt;So I stopped writing suggestions and started writing a constitution.&lt;/p&gt;

&lt;h2&gt;
  
  
  wOS: a behavioral standard, not a prompt
&lt;/h2&gt;

&lt;p&gt;I built wOS, an open-source behavioral standard for AI agents (Apache-2.0). It's a specification with 27 directives across seven domains, 16 pre-delivery checks, and an enforcement framework that distinguishes three levels of conformance.&lt;/p&gt;

&lt;p&gt;The directives cover how agents actually fail:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Communication:&lt;/strong&gt; no filler, no apologies, no sycophancy. If a correction comes in, the agent either produces the fix or produces the evidence. Never the apology.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verification:&lt;/strong&gt; every specific claim needs a source checked via tool in the same turn. No pattern-matching from training data. "Cite or strip. There is no third state."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Escalation:&lt;/strong&gt; failures get reported in four specific parts (malfunction, root cause, change made, verification) instead of "sorry, won't happen again."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Delegation:&lt;/strong&gt; orchestrators delegate by default, scheduled agents run in pinned environments, and delegation evidence is written to a durable log that survives context compaction.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The part that actually works: enforcement
&lt;/h2&gt;

&lt;p&gt;Here's where wOS diverges from every "AI principles" document you've seen. The spec distinguishes the &lt;strong&gt;principle&lt;/strong&gt; (portable, prompt-delivered) from the &lt;strong&gt;enforcement&lt;/strong&gt; (code-level, platform-specific).&lt;/p&gt;

&lt;p&gt;The production evidence was blunt. Three independent orchestrator agents across three projects bypassed delegation rules despite explicit MUST NOT language in their prompts. All three correctly articulated the rule when questioned. All three skipped it anyway for task efficiency.&lt;/p&gt;

&lt;p&gt;Prompt-only constraints lose priority against task completion speed. So wOS defines enforcement levels:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Level 1 (Core):&lt;/strong&gt; principle declared, best-effort via prompt&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Level 2 (Extended):&lt;/strong&gt; pre-delivery checks enforce structurally within the response cycle&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Level 3 (Strict):&lt;/strong&gt; adds the identity and memory directives long-running agents need, with a code-level gate as the escalation path when prompt enforcement isn't enough&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The delegation gate is the reference implementation: a plugin hooks the response tool before the agent loop can terminate. If the response is long, the agent is an orchestrator, and no delegation happened in tool history, the loop &lt;em&gt;doesn't terminate&lt;/em&gt;. The agent gets its warning injected and is forced to delegate before it can ship. Compliance stops being a choice.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pre-delivery check
&lt;/h2&gt;

&lt;p&gt;Every response passes 16 checks before it ships. The ones doing the heaviest lifting:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Check A (source audit):&lt;/strong&gt; every specific claim must be sourced, current, and actually verified via tool, not recalled.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check C (action claims):&lt;/strong&gt; every past-tense action verb gets verified against the tool result before delivery. No tool result means the claim is false and gets replaced with the actual state.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check H (citation audit):&lt;/strong&gt; every value needs a citation or gets stripped. A best-guess is not a citation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check P (zero-claims audit):&lt;/strong&gt; factual claims about system state need in-turn verification. "Key present" is not "feature active."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If a check fails, the response halts and the affected content is replaced with "I don't have that data." A response with honest gaps beats a confident fabrication, every time.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it looks like in production
&lt;/h2&gt;

&lt;p&gt;The standard governs the kelle.ai Agent Squad: a squad of autonomous agents running a real executive operation, triaging email, managing tasks, producing documents. They're audited against wOS daily. Here's what a pre-delivery correction looks like in practice:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Check H — citation audit] FAIL
claim: "reduced costs by 43%" — no source, stripping

[Check C — action claims] "I sent the email" → tool result: NOT FOUND
replaced with: "the send did not complete"

[retry] PASS — 3 checks verified, response delivered
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's the whole thesis in six lines. The agent tried to tell the founder something untrue. The rules caught it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Repo and spec
&lt;/h2&gt;

&lt;p&gt;The spec is on GitHub at &lt;a href="https://github.com/wgnr-ai/wOS" rel="noopener noreferrer"&gt;wgnr-ai/wOS&lt;/a&gt;, Apache-2.0. The README covers the directive table and the enforcement framework. If you're building agents and your answer to "what stops them from fabricating results" is a prompt, this is worth thirty minutes of your time.&lt;/p&gt;

&lt;p&gt;Happy 10th anniversary to wgnr.ai, the company this came out of. The next chapter is teaching AI to obey.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Wagner dos Santos is the founder of wgnr.ai, 30 years in brand marketing, now working in AI agent governance. He built wOS and runs the kelle.ai Agent Squad under it in production.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>llm</category>
      <category>software</category>
    </item>
    <item>
      <title>AI Agents Lie About Their Work. Here's an Open Spec to Fix That.</title>
      <dc:creator>Wagner dos Santos</dc:creator>
      <pubDate>Fri, 17 Jul 2026 12:30:00 +0000</pubDate>
      <link>https://dev.to/wgnrai/ai-agents-lie-about-their-work-heres-an-open-spec-to-fix-that-2j67</link>
      <guid>https://dev.to/wgnrai/ai-agents-lie-about-their-work-heres-an-open-spec-to-fix-that-2j67</guid>
      <description>&lt;h1&gt;
  
  
  AI Agents Lie About Their Work. Here's an Open Spec to Fix That.
&lt;/h1&gt;

&lt;p&gt;In June, an AI agent reported: "All nine sites have been updated successfully. Average deployment time: 2.3 minutes per site."&lt;/p&gt;

&lt;p&gt;Independent verification: the agent used incorrect credentials throughout. No plugins were installed on any site. The performance metrics were fabricated. The agent never performed any actual work.&lt;/p&gt;

&lt;p&gt;This isn't hallucination. Hallucination is a content generation error — the model produces plausible-sounding but incorrect information. This is something worse: the agent &lt;em&gt;claimed to have done work it didn't do&lt;/em&gt;, complete with fabricated evidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pattern
&lt;/h2&gt;

&lt;p&gt;If you've run AI agents in production, you've seen this. Maybe not this extreme, but the pattern:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Agent claims a task is complete → it isn't&lt;/li&gt;
&lt;li&gt;Agent says "I'll fix that" → it doesn't change anything&lt;/li&gt;
&lt;li&gt;Agent produces confident output → it's pattern-matched from training data, not verified&lt;/li&gt;
&lt;li&gt;Agent encounters an error → it apologizes instead of escalating&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These aren't edge cases. They're the default behavior of LLMs optimized for human-like responses rather than accurate state reporting.&lt;/p&gt;

&lt;h2&gt;
  
  
  The existing landscape
&lt;/h2&gt;

&lt;p&gt;The agent ecosystem has several open standards:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Standard&lt;/th&gt;
&lt;th&gt;What it covers&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;a href="https://github.com/microsoft/agent-governance-toolkit" rel="noopener noreferrer"&gt;ACS&lt;/a&gt; (Microsoft)&lt;/td&gt;
&lt;td&gt;Runtime security policy — what agents &lt;em&gt;can't do&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;a href="https://agents.md/" rel="noopener noreferrer"&gt;AGENTS.md&lt;/a&gt; (AAIF)&lt;/td&gt;
&lt;td&gt;Context and instructions — what agents &lt;em&gt;should know&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;a href="https://buildermethods.com/agent-os" rel="noopener noreferrer"&gt;Agent OS&lt;/a&gt; (Builder Methods)&lt;/td&gt;
&lt;td&gt;Coding standards — how agents &lt;em&gt;should write code&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;a href="https://oasb.ai/oasb-2" rel="noopener noreferrer"&gt;OASB-2&lt;/a&gt; (OpenA2A)&lt;/td&gt;
&lt;td&gt;Security behavioral controls&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;None of them cover how agents should &lt;strong&gt;behave&lt;/strong&gt; — how they communicate, verify claims, handle failures, delegate work, and manage memory.&lt;/p&gt;

&lt;h2&gt;
  
  
  wOS: the behavioral layer
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/wgnr-ai/wOS" rel="noopener noreferrer"&gt;wOS&lt;/a&gt; is an open specification (Apache-2.0) that fills that gap. It defines &lt;strong&gt;27 directives&lt;/strong&gt; across &lt;strong&gt;7 doctrine domains&lt;/strong&gt; — Communication, Verification, Lifecycle, Escalation, Delegation, Identity, and Memory — plus &lt;strong&gt;16 pre-delivery checks&lt;/strong&gt; and three conformance levels.&lt;/p&gt;

&lt;h3&gt;
  
  
  Communication
&lt;/h3&gt;

&lt;p&gt;Strip performative responses. No apologies, no filler, no sycophancy.&lt;/p&gt;

&lt;h3&gt;
  
  
  Verification (the core)
&lt;/h3&gt;

&lt;p&gt;Never claim an action completed without a tool result that proves it. Every response passes 16 checks before delivery; if a check fails, the affected claim is stripped and replaced with an honest gap. A response with verifiable gaps beats a confident fabrication.&lt;/p&gt;

&lt;h3&gt;
  
  
  Enforcement, not suggestion
&lt;/h3&gt;

&lt;p&gt;The spec separates the &lt;em&gt;principle&lt;/em&gt; (portable, prompt-delivered) from the &lt;em&gt;enforcement&lt;/em&gt; (code-level, platform-specific). The reference implementation is a delegation gate: when an orchestrator tries to terminate without having delegated work, the loop doesn't terminate — the agent is forced to route the work to subordinates first. Compliance stops being a choice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Repo and spec
&lt;/h2&gt;

&lt;p&gt;The spec lives at &lt;a href="https://github.com/wgnr-ai/wOS" rel="noopener noreferrer"&gt;github.com/wgnr-ai/wOS&lt;/a&gt;, Apache-2.0, with adoption templates and the enforcement reference implementation included. If your answer to "what stops agents from fabricating results" is a prompt, this is worth thirty minutes of your time.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Wagner dos Santos is the founder of wgnr.ai, 30 years in brand marketing, now working in AI agent governance. He built wOS and runs the kelle.ai Agent Squad under it in production.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>ai</category>
      <category>devtools</category>
      <category>agents</category>
    </item>
    <item>
      <title>How We Built a Full-Featured AI Chat UI in 33KB with Zero Frameworks</title>
      <dc:creator>Wagner dos Santos</dc:creator>
      <pubDate>Fri, 17 Apr 2026 13:39:06 +0000</pubDate>
      <link>https://dev.to/wgnrai/how-we-built-a-full-featured-ai-chat-ui-in-33kb-with-zero-frameworks-2od9</link>
      <guid>https://dev.to/wgnrai/how-we-built-a-full-featured-ai-chat-ui-in-33kb-with-zero-frameworks-2od9</guid>
      <description>&lt;p&gt;When we set out to build a web interface for Pi Coding Agent, we made a deliberate choice: no React, no Vite, no TypeScript, no build step. Just vanilla HTML, CSS, and JavaScript.&lt;/p&gt;

&lt;p&gt;Here's what we learned building a production-quality real-time chat UI the old-fashioned way.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Architecture
&lt;/h3&gt;

&lt;p&gt;Everything lives in two files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;public/index.html&lt;/code&gt; — the entire frontend (HTML + CSS + JS in one file)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;server.js&lt;/code&gt; — Express server with WebSocket support&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pi runs as a subprocess in RPC mode. The server bridges browser WebSockets to Pi's RPC protocol. Messages flow like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Browser → WebSocket → Server → Pi RPC → Server → WebSocket → Browser
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Event-Driven State Management
&lt;/h3&gt;

&lt;p&gt;Instead of React's state management, we use a single &lt;code&gt;handleEvent()&lt;/code&gt; function that processes all WebSocket messages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;handleEvent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;switch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;type&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;status&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;message_start&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;message_token&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;message_end&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;agent_end&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each event updates the DOM directly. It's simple, fast, and easy to debug.&lt;/p&gt;

&lt;h3&gt;
  
  
  Message Queueing
&lt;/h3&gt;

&lt;p&gt;One of our favorite features: you can keep typing while Pi is still responding. The server sends queued messages to Pi with &lt;code&gt;streamingBehavior: "followUp"&lt;/code&gt;, and Pi processes them in order natively.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why No Framework?
&lt;/h3&gt;

&lt;p&gt;Honestly? Speed of development. We could make changes, refresh, and see results instantly. No hot reload to wait for, no bundle to rebuild, no component tree to reason about. Just HTML elements and event handlers.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Result
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;33KB total package size&lt;/li&gt;
&lt;li&gt;4 npm dependencies&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;npx wgnr-pi&lt;/code&gt; to install and run&lt;/li&gt;
&lt;li&gt;Full features: streaming, sessions, model picker, thinking levels, images, export&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sometimes the best framework is no framework.&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/wgnr-ai/wgnr-pi" rel="noopener noreferrer"&gt;https://github.com/wgnr-ai/wgnr-pi&lt;/a&gt;&lt;br&gt;
npm: &lt;a href="https://www.npmjs.com/package/wgnr-pi%60%60" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/wgnr-pi``&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>opensource</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
