<?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: Rajdeep Sadhu</title>
    <description>The latest articles on DEV Community by Rajdeep Sadhu (@rajdeep_sadhu_48ef617732c).</description>
    <link>https://dev.to/rajdeep_sadhu_48ef617732c</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%2F4149732%2F3e36ea7e-1e5a-4483-b0d4-ff314e709d01.png</url>
      <title>DEV Community: Rajdeep Sadhu</title>
      <link>https://dev.to/rajdeep_sadhu_48ef617732c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rajdeep_sadhu_48ef617732c"/>
    <language>en</language>
    <item>
      <title>I built a zero-dependency TypeScript agent loop with 24 built-in tools and human permission gates (No LangChain, No NestJS)</title>
      <dc:creator>Rajdeep Sadhu</dc:creator>
      <pubDate>Tue, 29 Sep 2026 16:42:40 +0000</pubDate>
      <link>https://dev.to/rajdeep_sadhu_48ef617732c/i-built-a-zero-dependency-typescript-agent-loop-with-24-built-in-tools-and-human-permission-gates-206k</link>
      <guid>https://dev.to/rajdeep_sadhu_48ef617732c/i-built-a-zero-dependency-typescript-agent-loop-with-24-built-in-tools-and-human-permission-gates-206k</guid>
      <description>&lt;p&gt;Hey r/typescript!&lt;/p&gt;

&lt;p&gt;Over the past year, every time I looked into building an autonomous coding agent in TypeScript, I was greeted with massive dependency trees, bloated Python wrappers, or heavy enterprise frameworks that drag in 400+ transitive packages just to run a loop.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;Smoke Monkey Harness&lt;/strong&gt; — an embeddable, framework-agnostic TypeScript agent harness with &lt;strong&gt;0 npm runtime dependencies&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What makes it different?
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Zero Runtime Dependencies&lt;/strong&gt;: Pure TypeScript compiled down to standard Node.js primitives (&lt;code&gt;child_process&lt;/code&gt;, &lt;code&gt;fs/promises&lt;/code&gt;, &lt;code&gt;events&lt;/code&gt;, &lt;code&gt;fetch&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic 6-Phase State Machine&lt;/strong&gt;: Instead of an unconstrained ReAct loop that burns tokens in circles, agents progress predictably through:
&lt;code&gt;explore&lt;/code&gt; ➔ &lt;code&gt;plan&lt;/code&gt; ➔ &lt;code&gt;edit&lt;/code&gt; ➔ &lt;code&gt;verify&lt;/code&gt; ➔ &lt;code&gt;recover&lt;/code&gt; ➔ &lt;code&gt;complete&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;24 Built-in Native Tools&lt;/strong&gt;: Full filesystem (atomic edits, multi-chunk replace, regex search), terminal execution with strict timeout &amp;amp; abort controller safety, git staging/diffing, and web inspection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Three Human Permission Pauses&lt;/strong&gt;: Never let an LLM run &lt;code&gt;rm -rf&lt;/code&gt; without authorization. Guardrails pause on shell execution, file edits, or external API calls until explicitly approved.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model Context Protocol (MCP)&lt;/strong&gt;: Native stdio MCP server &amp;amp; client support to connect directly into Claude Code, Cursor, or your custom services.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Quick Example:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
typescript
import { AgentLoop, AnthropicProvider, FileSystemTools, TerminalTools } from 'smoke-monkey-harness';

const agent = new AgentLoop({
  model: new AnthropicProvider({ apiKey: process.env.ANTHROPIC_API_KEY }),
  tools: [...FileSystemTools, ...TerminalTools],
  permissions: {
    terminal: 'ask_before_run',
    fileEdit: 'auto_approve',
  },
  maxPhases: 15,
});

await agent.run("Find all uncaught Promise rejections in src/ and add defensive try/catch blocks with unit tests.");

We also built an interactive agent simulator and drop-in web UI canvas (@smoke-monkey/ui).

🌐 Live Demo &amp;amp; Docs: [](https://smoke-monkey-harness.vercel.app)
📦 NPM: npm install smoke-monkey-harness
Would love to hear your feedback on the architecture and API ergonomics!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>programming</category>
      <category>agentskills</category>
    </item>
  </channel>
</rss>
