<?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: Carlos Martinez Tuanama</title>
    <description>The latest articles on DEV Community by Carlos Martinez Tuanama (@carlosmartinezt).</description>
    <link>https://dev.to/carlosmartinezt</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%2F4165283%2F173e963f-3efd-4dd8-91a4-8f645864d00a.jpg</url>
      <title>DEV Community: Carlos Martinez Tuanama</title>
      <link>https://dev.to/carlosmartinezt</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/carlosmartinezt"/>
    <language>en</language>
    <item>
      <title>Introducing Chloe: An agent is one file that you write</title>
      <dc:creator>Carlos Martinez Tuanama</dc:creator>
      <pubDate>Wed, 07 Oct 2026 20:41:00 +0000</pubDate>
      <link>https://dev.to/carlosmartinezt/introducing-chloe-an-agent-is-one-file-that-you-write-i59</link>
      <guid>https://dev.to/carlosmartinezt/introducing-chloe-an-agent-is-one-file-that-you-write-i59</guid>
      <description>&lt;p&gt;I’ve been building Chloe (&lt;a href="https://chloejs.org/" rel="noopener noreferrer"&gt;https://chloejs.org/&lt;/a&gt;), an open-source TypeScript runtime for AI agents.&lt;/p&gt;

&lt;p&gt;The question behind it is simple: &lt;strong&gt;how much of a workflow should an LLM?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sometimes you know exactly what needs to happen. Sometimes you need a model to interpret something. And sometimes you know the outcome you want, but you need an agent to investigate and figure out the steps.&lt;/p&gt;

&lt;p&gt;I wanted to express those choices in code, within the same workflow, and see what happened when it ran.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with the workflow
&lt;/h2&gt;

&lt;p&gt;Consider a job that checks customer support messages.&lt;/p&gt;

&lt;p&gt;Loading unread messages is an ordinary API call. Understanding whether a customer is describing a delivery problem may require a model. Investigating that problem might require an agent to look through orders and previous conversations. Issuing a large refund might require a person’s approval.&lt;/p&gt;

&lt;p&gt;Those are four different kinds of work. Giving a model control over all of them introduces decisions that the application could already make.&lt;/p&gt;

&lt;p&gt;Chloe lets you choose the appropriate level of autonomy for each step:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;work.step()&lt;/strong&gt; — I know what to do. Run ordinary code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;work.model()&lt;/strong&gt; — I know what to ask. Get a structured answer from a model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;work.agent()&lt;/strong&gt; — I know what I want. Give an agent a goal, tools, and limits.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;work.ask()&lt;/strong&gt; — A person needs to decide. Pause the job and wait for an answer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The principle is &lt;strong&gt;the least autonomy that does the job.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Your loops, conditions, and business rules stay in TypeScript. You decide when to call a model, what information it receives, and what happens with its answer.&lt;/p&gt;

&lt;p&gt;This doesn’t make the model’s judgment deterministic. It makes the boundary around that judgment explicit.&lt;/p&gt;

&lt;h2&gt;
  
  
  An agent is a file you can read
&lt;/h2&gt;

&lt;p&gt;In Chloe, you define an agent in TypeScript: its model, instructions, memory folder, tools, jobs, and channels.&lt;/p&gt;

&lt;p&gt;You can read that definition and understand what you configured it to do. Another agent is another file, with its own responsibilities.&lt;/p&gt;

&lt;p&gt;Jobs can run on a schedule, start from a conversation, or be triggered manually. An agent might send a morning briefing, answer questions about your email, or investigate something using a limited set of tools.&lt;/p&gt;

&lt;p&gt;For an autonomous step, you can specify the tools available to it, limit how many steps it takes, and set a spending budget. When a decision needs human approval, the job can wait — even across a runtime restart.&lt;/p&gt;

&lt;h2&gt;
  
  
  See what happened and what it cost
&lt;/h2&gt;

&lt;p&gt;Writing the workflow is only part of the problem. Once it runs, I want to understand its behavior.&lt;/p&gt;

&lt;p&gt;Chloe records the steps, model calls, and tool calls in a run, along with timing and model costs. You can see where ordinary code ended and model judgment began.&lt;/p&gt;

&lt;p&gt;That distinction also helps with testing. Application logic gets ordinary tests; prompts get evals. A correct workflow and a good model decision are related, but they need different checks.&lt;/p&gt;

&lt;p&gt;The dashboard gives you a place to inspect runs, chat with agents, and browse their memory.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run locally, access remotely
&lt;/h2&gt;

&lt;p&gt;Chloe runs on your own machine or server as a single Node.js process. Runtime state lives in SQLite, and agent memory lives in files you own.&lt;/p&gt;

&lt;p&gt;The dashboard can run alongside it. An optional cloud connection lets you access that dashboard remotely while the runtime continues executing on your machine.&lt;/p&gt;

&lt;p&gt;Local execution doesn’t mean every model runs locally: model calls go to the provider you configure.&lt;/p&gt;

&lt;p&gt;I’ve kept the architecture small deliberately. Chloe currently targets workloads that fit in one process on one machine. It isn’t a distributed workflow engine, and an interrupted active run is marked failed rather than automatically continuing from any arbitrary point.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I’m building it
&lt;/h2&gt;

&lt;p&gt;I’m interested in AI systems that fit into real processes: systems with clear inputs, useful outputs, visible costs, and decisions that someone can review.&lt;/p&gt;

&lt;p&gt;Chloe is my way of exploring that through a runtime where the workflow is readable TypeScript and autonomy is a choice you make at each step.&lt;/p&gt;

&lt;p&gt;There’s room for ordinary code, model judgment, autonomous investigation, and human decisions in the same application. I want the developer to be able to say clearly which one belongs where.&lt;/p&gt;

&lt;p&gt;Chloe is open source under the MIT license. If this approach matches something you’re building, you can explore the examples (&lt;a href="https://chloejs.org/examples" rel="noopener noreferrer"&gt;https://chloejs.org/examples&lt;/a&gt;), read the documentation, or look through the source on GitHub (&lt;a href="https://github.com/carlosmartinezt/chloejs" rel="noopener noreferrer"&gt;https://github.com/carlosmartinezt/chloejs&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;I’d be interested to hear where you would draw the boundary between a workflow you write and one an agent figures out.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>llm</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
