<?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: NEKOMYA</title>
    <description>The latest articles on DEV Community by NEKOMYA (@nekomyadev).</description>
    <link>https://dev.to/nekomyadev</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%2F4052600%2F6a889efd-b283-4008-8d8a-4aec5382ddfb.jpg</url>
      <title>DEV Community: NEKOMYA</title>
      <link>https://dev.to/nekomyadev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nekomyadev"/>
    <language>en</language>
    <item>
      <title>I got tired of parsing LLM output by hand, so I wrote a programming language for agents</title>
      <dc:creator>NEKOMYA</dc:creator>
      <pubDate>Wed, 29 Jul 2026 07:33:41 +0000</pubDate>
      <link>https://dev.to/nekomyadev/i-got-tired-of-parsing-llm-output-by-hand-so-i-wrote-a-programming-language-for-agents-1a9g</link>
      <guid>https://dev.to/nekomyadev/i-got-tired-of-parsing-llm-output-by-hand-so-i-wrote-a-programming-language-for-agents-1a9g</guid>
      <description>&lt;p&gt;Production agents in 2026 are still held together with Python glue: prompt chains parsed by hand, tool calls wrapped in try/except, no replay, no cost control, no regression tests. Libraries patch symptoms. I wanted to fix the layer where the problem actually lives — the language.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;Nudge&lt;/strong&gt;: a typed, replayable, budget-aware programming language for LLM agents. The compiler is written in Rust (zero dependencies), and it compiles to Python &amp;amp; TypeScript.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pain, concretely
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Pain&lt;/th&gt;
&lt;th&gt;With libraries&lt;/th&gt;
&lt;th&gt;With Nudge&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Untyped LLM output&lt;/td&gt;
&lt;td&gt;validate at runtime&lt;/td&gt;
&lt;td&gt;schema is a type — proven at compile time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hidden side effects&lt;/td&gt;
&lt;td&gt;invisible&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;uses LLM, Tool, IO&lt;/code&gt; in every signature&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No regression testing&lt;/td&gt;
&lt;td&gt;record/replay bolted on&lt;/td&gt;
&lt;td&gt;every run emits a trace; every trace is a test&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost surprises&lt;/td&gt;
&lt;td&gt;dashboards after the fact&lt;/td&gt;
&lt;td&gt;budget is a contract, enforced by compiler + runtime&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  A taste
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;type Finding = { claim: string, source: Url, confidence: float @range(0, 1) }

fn analyze(q: string, hits: [SearchResult]) -&amp;gt; [Finding] uses LLM {
    llm"""Extract verifiable findings about {q} from: {hits}"""
    with { schema: [Finding], model: "anthropic:sonnet-4.6",
           budget: 0.03 USD, retry: 2 with repair }
}

test "stays within budget on recorded trace" {
    let t = replay("traces/demo.jsonl")
    assert t.cost_usd &amp;lt; 0.25   // zero tokens burned in CI
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The compiler proves the schema matches, infers effects, and computes a static cost bound. The runtime records every call to a content-addressed trace you can diff, commit, and replay.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you get out of one .ndg file
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Typed LLM calls&lt;/strong&gt; — output schema is a language type; violations trigger automatic repair&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Effect system&lt;/strong&gt; — pure / &lt;code&gt;LLM&lt;/code&gt; / &lt;code&gt;Tool&lt;/code&gt; / &lt;code&gt;IO&lt;/code&gt; effects shown in signatures&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic replay&lt;/strong&gt; — traces are git-friendly JSONL; replay tests burn zero tokens&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Budget contracts&lt;/strong&gt; — per-call and per-run USD ceilings with static estimation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Checkpoint/resume&lt;/strong&gt; — crash, then &lt;code&gt;nudge resume&lt;/code&gt; from the last checkpoint&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Native parallelism&lt;/strong&gt; — &lt;code&gt;par map&lt;/code&gt;, &lt;code&gt;par race&lt;/code&gt;, &lt;code&gt;par all&lt;/code&gt; with compile-time race safety&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP tools, A2A agent-card export, LSP, OpenTelemetry&lt;/strong&gt; — built in, not bolted on&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;Everything runs against a deterministic fake provider by default — no API key, no token spend:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cargo build
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PYTHONPATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$PWD&lt;/span&gt;/runtime
nudgec check examples/research_agent.ndg
nudgec cost examples/research_agent.ndg
&lt;span class="nb"&gt;cd &lt;/span&gt;examples &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; nudgec &lt;span class="nb"&gt;test &lt;/span&gt;research_agent.ndg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There's also a VS Code extension (search "Nudge Language" in the Marketplace) with an LSP for diagnostics, hover, and completion.&lt;/p&gt;

&lt;p&gt;The project is MIT-licensed and v1.0 just shipped. I'd genuinely love feedback from people building agents in production — what would you want a language like this to prove for you?&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/NekomyaDev/nudge" rel="noopener noreferrer"&gt;https://github.com/NekomyaDev/nudge&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you find it useful, a ⭐ on the repo means a lot at this stage. Thanks for reading!&lt;/p&gt;

</description>
      <category>rust</category>
      <category>ai</category>
      <category>opensource</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
