<?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: Tobías Chavarría</title>
    <description>The latest articles on DEV Community by Tobías Chavarría (@tobiaschc).</description>
    <link>https://dev.to/tobiaschc</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%2F3386013%2F587cfd82-8c5c-4458-8de7-a22131fa84ea.jpeg</url>
      <title>DEV Community: Tobías Chavarría</title>
      <link>https://dev.to/tobiaschc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tobiaschc"/>
    <language>en</language>
    <item>
      <title>I built a coding agent from scratch to see what's inside</title>
      <dc:creator>Tobías Chavarría</dc:creator>
      <pubDate>Sun, 04 Oct 2026 22:13:46 +0000</pubDate>
      <link>https://dev.to/tobiaschc/i-built-a-coding-agent-from-scratch-to-see-whats-inside-1e4f</link>
      <guid>https://dev.to/tobiaschc/i-built-a-coding-agent-from-scratch-to-see-whats-inside-1e4f</guid>
      <description>&lt;p&gt;I use coding agents every day, and for a while I couldn't explain what they actually do between my prompt and the edit to my file. So I built one.&lt;/p&gt;

&lt;p&gt;The answer turned out to be smaller than I expected. Claude Code, Cursor and Codex all run the same loop: send the conversation to a model, run the tools it asks for, send back the results, repeat until the model just answers. The model never touches your files. It only asks, and your machine does the work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;petite&lt;/strong&gt; is that loop, written from scratch in 565 lines of Python. I built it in 14 commits, one concept each:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;talking to a model, then giving it tools (Read, Write, Bash)&lt;/li&gt;
&lt;li&gt;the agent loop&lt;/li&gt;
&lt;li&gt;validating tool calls with Pydantic&lt;/li&gt;
&lt;li&gt;skills, slash commands and arguments&lt;/li&gt;
&lt;li&gt;the Skill tool, and subagents with their own conversation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every stage is a tagged commit that runs on its own. The site gives you a task for each one, keeps the solution folded until you want it, and has a command that proves it works:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    just stage 4
    &lt;span class="nb"&gt;cd&lt;/span&gt; .stages/04
    just run &lt;span class="s2"&gt;"How many carrots does the rabbit eat per day, according to rabbit.py?"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The diagrams put the model on top and your machine below, so you can see exactly what crosses the network.&lt;/p&gt;

&lt;p&gt;If you've wondered how these tools work, the fastest way to find out is to build one. The whole tutorial costs a few cents of API credit.&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://tobiaschc.github.io/petite/" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ftobiaschc.github.io%2Fpetite%2Fassets%2Fog.png" height="420" class="m-0" width="800"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://tobiaschc.github.io/petite/" rel="noopener noreferrer" class="c-link"&gt;
            petite — how coding agents work, built from scratch
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            Understand how coding agents like Claude Code work inside by building one: a complete agent in 565 lines of Python, one concept per commit: tool calling, the agent loop, skills, subagents.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ftobiaschc.github.io%2Fpetite%2Fassets%2Ffavicon.svg" width="64" height="64"&gt;
          tobiaschc.github.io
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



</description>
      <category>ai</category>
      <category>python</category>
      <category>tutorial</category>
      <category>opensource</category>
    </item>
    <item>
      <title>https://tobiaschc.github.io/petite/</title>
      <dc:creator>Tobías Chavarría</dc:creator>
      <pubDate>Sun, 04 Oct 2026 21:58:05 +0000</pubDate>
      <link>https://dev.to/tobiaschc/httpstobiaschcgithubiopetite-2d85</link>
      <guid>https://dev.to/tobiaschc/httpstobiaschcgithubiopetite-2d85</guid>
      <description>&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://tobiaschc.github.io/petite/" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ftobiaschc.github.io%2Fpetite%2Fassets%2Fog.png" height="420" class="m-0" width="800"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://tobiaschc.github.io/petite/" rel="noopener noreferrer" class="c-link"&gt;
            petite — how coding agents work, built from scratch
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            Understand how coding agents like Claude Code work inside by building one: a complete agent in 565 lines of Python, one concept per commit: tool calling, the agent loop, skills, subagents.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ftobiaschc.github.io%2Fpetite%2Fassets%2Ffavicon.svg" width="64" height="64"&gt;
          tobiaschc.github.io
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>frontend</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
