<?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: Nitin Sharma</title>
    <description>The latest articles on DEV Community by Nitin Sharma (@nitinmms).</description>
    <link>https://dev.to/nitinmms</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%2F4060458%2Ff0ac6149-0105-400d-b1fc-df3ac9c7c252.png</url>
      <title>DEV Community: Nitin Sharma</title>
      <link>https://dev.to/nitinmms</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nitinmms"/>
    <language>en</language>
    <item>
      <title>Litos: Building a Minimal AI Coding Agent, from Scratch in pure C#/.NET</title>
      <dc:creator>Nitin Sharma</dc:creator>
      <pubDate>Wed, 05 Aug 2026 08:43:51 +0000</pubDate>
      <link>https://dev.to/nitinmms/litos-building-a-minimal-ai-coding-agent-from-scratch-in-pure-cnet-a6j</link>
      <guid>https://dev.to/nitinmms/litos-building-a-minimal-ai-coding-agent-from-scratch-in-pure-cnet-a6j</guid>
      <description>&lt;p&gt;Hi dev.to, this is my first post here.&lt;/p&gt;

&lt;p&gt;I've been writing C#/.NET for 23+ years, and over the last month or so I've been building &lt;strong&gt;Litos&lt;/strong&gt; — a small, transparent AI coding agent, written entirely in pure C#/.NET. No Python or Typescript.&lt;br&gt;
 The goal wasn't to compete with the big coding agents out there, it was to actually understand how one works, from the inside, by building it myself.&lt;/p&gt;

&lt;p&gt;This post is just the basics: what an "agent loop" is, and how 'Litos' AI Coding Agent is put together.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is an agent loop?
&lt;/h2&gt;

&lt;p&gt;At the core of any AI coding agent is a surprisingly simple. A "turn" starts when you send a message, and then the agent just keeps going — asking the model for a response, running any tools the model asks for (like reading a file, editing code, or running a shell command), feeding the results back to the model, and repeating — until the model comes back with a plain answer and no more tool calls to make.&lt;/p&gt;

&lt;p&gt;That's it. &lt;br&gt;
That loop, repeated with an ever-growing transcript (context) of what's happened so far, is what lets the model read your code, make edits, run commands, and check its own work.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Litos is structured
&lt;/h2&gt;

&lt;p&gt;I divided the project into three parts, inspired by &lt;a href="https://github.com/alejandro-ao/tau" rel="noopener noreferrer"&gt;Tau&lt;/a&gt;'s "brain, environment, face" split, and by Mario Zechner's &lt;a href="https://pi.dev" rel="noopener noreferrer"&gt;pi&lt;/a&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The brain&lt;/strong&gt; (&lt;code&gt;Litos.Agent&lt;/code&gt;) — the core loop, the transcript, and context management. It doesn't know or care whether it's talking to Anthropic, OpenAI, or Gemini, or whether it's running in a terminal or a desktop app.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The environment&lt;/strong&gt; (&lt;code&gt;Litos.Tools&lt;/code&gt;, &lt;code&gt;Litos.Providers.*&lt;/code&gt;) — the actual capabilities: file editing, shell access, web search, and the calls to whichever LLM provider you've configured.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The face&lt;/strong&gt; ( &lt;code&gt;Litos.Gui&lt;/code&gt;, &lt;code&gt;Litos.Api&lt;/code&gt;,&lt;code&gt;Litos.Console&lt;/code&gt;) — the thin UI layer.An Avalonia desktop app, and an HTTP/API host (with a working Telegram bridge) and a terminal UI all drive the exact same loop underneath.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keeping those separate has made it much easier to reason about — and to add a new provider or a new UI without touching the core loop at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  See it in action
&lt;/h2&gt;

&lt;p&gt;I've got two short videos showing it working end to end:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=em8w0SwgT5Q" rel="noopener noreferrer"&gt;Built an AI Coding Agent in Pure C#/.NET (No Python!) — Watch It Build a WinForms 15-Puzzle Game&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=S2Sn_kwCRjE&amp;amp;t=8s" rel="noopener noreferrer"&gt;Built an AI Agent in Pure C#/.NET — Here it is working through Telegram creating Mermaid Diagrams&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;It's all open source: &lt;a href="https://github.com/nitinmms/LitosAiCodingAgent" rel="noopener noreferrer"&gt;github.com/nitinmms/LitosAiCodingAgent&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's still very much a work in progress — some pieces (like the console UI and a couple of the provider adapters) are unfinished, and the README is upfront about that. But the Desktop coding agent and the desktop/Telegram experiences work today.&lt;/p&gt;

&lt;p&gt;I'll follow up with more detail posts on individual pieces (context management, MCP support, etc.) if there's interest. &lt;/p&gt;

&lt;p&gt;Feedback welcome!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>dotnet</category>
      <category>csharp</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
