<?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: Anindya Mukherjee</title>
    <description>The latest articles on DEV Community by Anindya Mukherjee (@aninmukhe).</description>
    <link>https://dev.to/aninmukhe</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%2F4060475%2Fd9d533e7-4790-4e0a-b505-c2ee054997aa.png</url>
      <title>DEV Community: Anindya Mukherjee</title>
      <link>https://dev.to/aninmukhe</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aninmukhe"/>
    <language>en</language>
    <item>
      <title>Why Does Your AI Keep Forgetting Everything Mid-Conversation?</title>
      <dc:creator>Anindya Mukherjee</dc:creator>
      <pubDate>Mon, 17 Aug 2026 11:12:23 +0000</pubDate>
      <link>https://dev.to/aninmukhe/why-does-your-ai-keep-forgetting-everything-mid-conversation-4jld</link>
      <guid>https://dev.to/aninmukhe/why-does-your-ai-keep-forgetting-everything-mid-conversation-4jld</guid>
      <description>&lt;p&gt;&lt;em&gt;You just spent 20 minutes briefing ChatGPT on your codebase. One new chat later, it's a stranger again. Here's the fix — and a 30-line memory loop you can paste today.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Me, last Tuesday:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Remember, our staging DB is &lt;code&gt;stg_not_prod_i_swear&lt;/code&gt;, never touch prod."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;ChatGPT, three messages later:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Sure! I'll run the migration against &lt;code&gt;production&lt;/code&gt; now 😊"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I did not, in fact, let it do that. But the amnesia was real. And if you've used any LLM for more than a week, you've lived some version of this: the model that was brilliant five prompts ago has the long-term memory of a goldfish who just discovered espresso.&lt;/p&gt;

&lt;p&gt;That's not a bug in &lt;em&gt;your&lt;/em&gt; prompting. It's a design limit of chat windows. &lt;strong&gt;AI agents&lt;/strong&gt; are how we bolt an actual filing cabinet onto the goldfish.&lt;/p&gt;




&lt;h2&gt;
  
  
  Chat Windows Are Goldfish Bowls
&lt;/h2&gt;

&lt;p&gt;A normal chat model only "knows" what's inside the current context window — roughly the last N tokens of the conversation. Close the tab, start a new thread, or overflow the window, and everything evaporates.&lt;/p&gt;

&lt;p&gt;It's like hiring a genius intern who gets medically-induced amnesia every time they leave the room. Day one: incredible. Day two: "Hi, who are you, and why is there a Postgres container named after a pinky swear?"&lt;/p&gt;

&lt;p&gt;Agents flip this. Instead of hoping the window is big enough, they &lt;strong&gt;write things down&lt;/strong&gt; and &lt;strong&gt;read them back&lt;/strong&gt; on purpose. Same brain. Different filing system.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Three Layers of Agent Memory (No PhD Required)
&lt;/h2&gt;

&lt;p&gt;You don't need a research paper. You need three buckets:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Working memory&lt;/strong&gt; — the live context window. Short, expensive, fragile. Good for "what are we doing &lt;em&gt;right now&lt;/em&gt;?"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Episodic memory&lt;/strong&gt; — notes from past runs. "Last Tuesday the deploy failed because the env var was &lt;code&gt;API_KEY&lt;/code&gt; not &lt;code&gt;OPENAI_API_KEY&lt;/code&gt;."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semantic memory&lt;/strong&gt; — durable facts about &lt;em&gt;your&lt;/em&gt; world. Repo conventions, preferred libraries, that one flaky endpoint that returns 200 while lying.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;ChatGPT gives you #1 for free. Useful agents add #2 and #3 — usually as a JSON file, a SQLite table, or a tiny vector store. Fancy is optional. &lt;strong&gt;Persistent&lt;/strong&gt; is not.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Memory Loop You Can Paste in 30 Lines
&lt;/h2&gt;

&lt;p&gt;Here's a minimal pattern: before each model call, pull relevant notes; after each run, save what mattered. No framework required.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pathlib&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OpenAI&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;MEMORY_FILE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;agent_memory.json&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;load_memory&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;MEMORY_FILE&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exists&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;MEMORY_FILE&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_text&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;save_memory&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;entries&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;MEMORY_FILE&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write_text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;entries&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;indent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;remember&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fact&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;semantic&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;mem&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;load_memory&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="n"&gt;mem&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;kind&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;fact&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;fact&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="nf"&gt;save_memory&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;mem&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;recall&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;mem&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;load_memory&lt;/span&gt;&lt;span class="p"&gt;()[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;:]&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;mem&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;No saved memory yet.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;- (&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;kind&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;) &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;fact&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;mem&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;ask_agent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_goal&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;memory_block&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;recall&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;system&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
                &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;You are a careful coding agent. Honor saved memory. &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
                &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Never touch production. If unsure, ask.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
                &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;## Saved memory&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;memory_block&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
            &lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;user_goal&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gpt-4o-mini&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;answer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;
    &lt;span class="c1"&gt;# Persist anything the human just taught us
&lt;/span&gt;    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;remember:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;user_goal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
        &lt;span class="nf"&gt;remember&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_goal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;kind&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;semantic&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;answer&lt;/span&gt;

&lt;span class="c1"&gt;# Seed durable facts once
&lt;/span&gt;&lt;span class="nf"&gt;remember&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Staging DB is stg_not_prod_i_swear — NEVER use production&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;semantic&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;remember&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Prefer pytest; repo uses src/ layout&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;semantic&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;ask_agent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Draft a migration plan for the users table on staging.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it twice. The second run still knows about &lt;code&gt;stg_not_prod_i_swear&lt;/code&gt; — even though it's a brand-new API call with no prior chat history. That tiny &lt;code&gt;agent_memory.json&lt;/code&gt; file is the whole magic trick.&lt;/p&gt;

&lt;p&gt;Swap the JSON file for SQLite or Chroma later if you want search. The &lt;em&gt;shape&lt;/em&gt; stays the same: &lt;strong&gt;recall → reason → act → write back&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why This Beats "Just Use a Bigger Context Window"
&lt;/h2&gt;

&lt;p&gt;Bigger windows help, the way a bigger desk helps a messy room. Eventually you still need folders.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Context is &lt;strong&gt;expensive&lt;/strong&gt; (you pay per token, every single call).&lt;/li&gt;
&lt;li&gt;Context is &lt;strong&gt;noisy&lt;/strong&gt; (old chit-chat crowds out the one constraint that matters).&lt;/li&gt;
&lt;li&gt;Context is &lt;strong&gt;not shared&lt;/strong&gt; across sessions, teammates, or cron jobs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A 20-line memory file is cheaper, sharper, and survives overnight. Agents that remember &lt;em&gt;your&lt;/em&gt; constraints feel 10× smarter than a larger model with a blank slate — same way a barista who knows your order beats a genius who asks "and you are…?" every morning.&lt;/p&gt;




&lt;h2&gt;
  
  
  What to Remember First (Start Embarrassingly Small)
&lt;/h2&gt;

&lt;p&gt;Don't boil the ocean with a multi-agent graph on day one. Write down the five facts your future self will curse you for forgetting:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Env names and "never touch X" rules&lt;/li&gt;
&lt;li&gt;How your team names branches / PRs&lt;/li&gt;
&lt;li&gt;The weird API that lies about status codes&lt;/li&gt;
&lt;li&gt;Preferred libraries and style rules&lt;/li&gt;
&lt;li&gt;Who to ping when the agent is stuck&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Put those in memory. Wire the recall step. Run one boring job tomorrow morning — a staging migration plan, a PR summary, an inbox triage — and watch the amnesia disappear.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Real Upgrade
&lt;/h2&gt;

&lt;p&gt;The leap from chatbot to agent isn't "more clever prompts." It's &lt;strong&gt;state&lt;/strong&gt;. Tools let the model touch the world. Memory lets it stay coherent while it does.&lt;/p&gt;

&lt;p&gt;So the next time your AI cheerfully offers to "help" by migrating production, don't just sigh and open a new chat. Give it a filing cabinet.&lt;/p&gt;

&lt;p&gt;Your goldfish deserves better. So do you.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;What's the one thing your AI forgets every single session? Drop it in the comments — I'm collecting the most cursed examples.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
    <item>
      <title>What If Your AI Assistant Could Actually *Do* Things While You Sleep?</title>
      <dc:creator>Anindya Mukherjee</dc:creator>
      <pubDate>Thu, 13 Aug 2026 18:45:58 +0000</pubDate>
      <link>https://dev.to/aninmukhe/what-if-your-ai-assistant-could-actually-do-things-while-you-sleep-2fc9</link>
      <guid>https://dev.to/aninmukhe/what-if-your-ai-assistant-could-actually-do-things-while-you-sleep-2fc9</guid>
      <description>&lt;h1&gt;
  
  
  What If Your AI Assistant Could Actually &lt;em&gt;Do&lt;/em&gt; Things While You Sleep?
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;Spoiler: it can. And it's called an AI agent. Here's how to build one in 10 minutes.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;You've used ChatGPT. You've marveled at its answers. You've also, at some point, copy-pasted its output into a spreadsheet, fired off an email yourself, and wondered — "why am I still doing the boring part?"&lt;/p&gt;

&lt;p&gt;That's not an AI assistant. That's a very smart autocomplete. &lt;/p&gt;

&lt;p&gt;An &lt;strong&gt;AI agent&lt;/strong&gt; is different. An agent doesn't just &lt;em&gt;answer&lt;/em&gt; — it &lt;em&gt;acts&lt;/em&gt;. It reads your inbox, summarizes the important bits, drafts replies, schedules follow-ups, and then goes to bed before you do. You wake up to a done thing.&lt;/p&gt;

&lt;p&gt;This sounds like sci-fi, but it's weekend-project territory right now. Let me show you exactly how it works.&lt;/p&gt;




&lt;h2&gt;
  
  
  The One Thing That Changes Everything: Tools
&lt;/h2&gt;

&lt;p&gt;The magic ingredient in any agent isn't the language model — those are everywhere now. It's &lt;strong&gt;tool use&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Think of it like this: GPT-4 alone is like a brilliant consultant locked in a room with no phone, no laptop, and no door. It can &lt;em&gt;think&lt;/em&gt; beautifully, but it can't touch the world. Give it tools — a web browser, a calculator, an API key — and suddenly it can reach out, do stuff, and report back.&lt;/p&gt;

&lt;p&gt;Here's the simplest possible version of an agent loop in Python using the OpenAI function-calling API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_weather&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;city&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# In real life, call a weather API here
&lt;/span&gt;    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;It&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;s 22°C and sunny in &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;city&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="n"&gt;tools&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;function&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;function&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;get_weather&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;description&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Get current weather for a city&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;parameters&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;object&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;properties&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;city&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;string&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;description&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;City name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;required&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;city&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}]&lt;/span&gt;

&lt;span class="n"&gt;messages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;What&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;s the weather in Tokyo?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt;

&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gpt-4o&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;tools&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# If the model wants to call a tool, handle it
&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;finish_reason&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;tool_calls&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;tool_call&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tool_calls&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;args&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tool_call&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;function&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;arguments&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;get_weather&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Tool result: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run that. Watch the model &lt;em&gt;decide&lt;/em&gt; to call &lt;code&gt;get_weather&lt;/code&gt;, extract the city name on its own, and use the result. That decision-and-action loop is the heartbeat of every AI agent.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why This Is Actually a Big Deal
&lt;/h2&gt;

&lt;p&gt;Traditional software follows a script. You write &lt;code&gt;if X then do Y&lt;/code&gt;. Every branch is something you predicted.&lt;/p&gt;

&lt;p&gt;An agent follows &lt;em&gt;goals&lt;/em&gt;, not scripts. You say "clear my inbox" and it figures out the steps. It reads emails, classifies them, decides which need replies, drafts them, and flags the edge cases for you. You didn't specify any of that — it reasoned its way there.&lt;/p&gt;

&lt;p&gt;This shift — from scripted to goal-directed — is the same shift that happened when we went from hand-coding websites to using frameworks. It doesn't replace programmers. It raises the ceiling of what one person can build.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Three Components Every Agent Has
&lt;/h2&gt;

&lt;p&gt;Whether you're using LangChain, AutoGen, CrewAI, or rolling your own, every agent has the same three parts:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. A brain (the LLM)&lt;/strong&gt; — decides what to do next based on its goal and what it knows so far.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. A memory&lt;/strong&gt; — keeps track of what's happened. Short-term memory is the conversation history. Long-term memory is a vector database or a file the agent reads/writes. Without memory, your agent has the attention span of a goldfish. A goldfish with a PhD, but still.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Tools&lt;/strong&gt; — the hands. APIs, file readers, web scrapers, calculators, code runners. The more tools, the more the agent can reach.&lt;/p&gt;

&lt;p&gt;Strip any of these out and you don't have an agent — you have a chatbot with ambition.&lt;/p&gt;




&lt;h2&gt;
  
  
  What You Can Build This Weekend
&lt;/h2&gt;

&lt;p&gt;Here are three genuinely doable weekend projects, ordered by ambition:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Inbox summarizer&lt;/strong&gt; — connects to Gmail, reads unread emails, groups them by topic, drops a bullet-point briefing into a Slack DM. ~100 lines of Python + LangChain.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Research agent&lt;/strong&gt; — give it a topic, it searches the web, reads 5 articles, compares them, and writes a one-page summary with citations. No more 45-minute rabbit holes.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dev assistant&lt;/strong&gt; — watches a GitHub repo for new issues, classifies them (bug/feature/question), drafts a triage response, and pings the right team member. Saves about 30 minutes per day on a busy repo.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these require a PhD. They require an API key, a few hours, and the willingness to let a machine handle the boring part.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Real Question
&lt;/h2&gt;

&lt;p&gt;The question isn't "can AI agents do this?" anymore. That ship has sailed.&lt;/p&gt;

&lt;p&gt;The question is: &lt;strong&gt;which part of your day are you still doing manually that an agent could own?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Pick the most tedious thing on your to-do list — the recurring task you dread, the copy-paste job that eats 20 minutes, the report nobody reads but everyone requests. That's your first agent.&lt;/p&gt;

&lt;p&gt;Build that one. You'll understand agentic AI better from one small working example than from reading every explainer on the internet.&lt;/p&gt;

&lt;p&gt;Including, possibly, this one.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Building something with agents? Drop it in the comments — I'd love to see what people are making.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
    <item>
      <title>5 Things That Make an AI Agent Actually Useful (Not Just Cool)</title>
      <dc:creator>Anindya Mukherjee</dc:creator>
      <pubDate>Mon, 03 Aug 2026 11:24:47 +0000</pubDate>
      <link>https://dev.to/aninmukhe/5-things-that-make-an-ai-agent-actually-useful-not-just-cool-4c1h</link>
      <guid>https://dev.to/aninmukhe/5-things-that-make-an-ai-agent-actually-useful-not-just-cool-4c1h</guid>
      <description>&lt;p&gt;You've seen the demos. An AI agent books a flight, refactors a codebase, or spins up a whole research report while you sip coffee. Cool? Absolutely. Useful enough to trust with real work on a Tuesday afternoon? That's a different question.&lt;/p&gt;

&lt;p&gt;Most "agents" today are ChatGPT with a trench coat and a to-do list. They look autonomous until they hit a wall, loop forever, or confidently invent a file path that never existed. The gap between &lt;em&gt;demo-cool&lt;/em&gt; and &lt;em&gt;actually useful&lt;/em&gt; is where the real engineering lives.&lt;/p&gt;

&lt;p&gt;I've spent the last year building, breaking, and babysitting agentic systems. Here are the five things that separate a parlor trick from something you'd put in a production workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. It knows when to stop talking and start doing
&lt;/h2&gt;

&lt;p&gt;A chatbot answers. An agent &lt;em&gt;acts&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;That sounds obvious until you watch an "agent" spend twelve turns politely discussing your request instead of calling a tool. Useful agents have a bias toward action. Give them a goal and a toolbox, and their default move is: pick a tool, use it, check the result, repeat.&lt;/p&gt;

&lt;p&gt;Think of it like the difference between a friend who says "you should really clean the kitchen" and a friend who just... starts loading the dishwasher. One is advice. The other is help.&lt;/p&gt;

&lt;p&gt;The technical version of this is &lt;strong&gt;tool-use loops&lt;/strong&gt; — the model proposes a function call, your runtime executes it, the result goes back into context, and the model decides the next move. LangChain, CrewAI, AutoGen, the OpenAI Agents SDK — they all orbit this same idea. Without a tight act-observe loop, you don't have an agent. You have a very expensive Magic 8-Ball.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. It has memory that isn't just "the last 20 messages"
&lt;/h2&gt;

&lt;p&gt;Chat windows are goldfish bowls. Useful agents need something closer to a filing cabinet.&lt;/p&gt;

&lt;p&gt;There are roughly three layers of memory that matter:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Working memory&lt;/strong&gt; — the current context window. Short-term. Fragile. Expensive.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Episodic memory&lt;/strong&gt; — what happened in past runs. "Last Tuesday I tried X and it failed because Y."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semantic memory&lt;/strong&gt; — durable facts about &lt;em&gt;your&lt;/em&gt; world. Your codebase conventions, your team's preferences, the weird API that returns 200 even when it errors.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without the last two, every session starts from zero. Your agent re-learns that your staging database is named &lt;code&gt;stg_not_prod_i_swear&lt;/code&gt; every single time. That's not autonomy. That's amnesia with extra steps.&lt;/p&gt;

&lt;p&gt;The practical move: store structured notes (vector DB, plain JSON, a Postgres table — pick your fighter) and retrieve the relevant ones before each run. Agents that remember &lt;em&gt;your&lt;/em&gt; constraints feel 10x smarter than agents with a bigger model and a blank slate.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. It can fail without falling apart
&lt;/h2&gt;

&lt;p&gt;Here's an uncomfortable truth: agents fail constantly. Tools time out. APIs return garbage. The model misreads a schema. The useful ones don't panic — they recover.&lt;/p&gt;

&lt;p&gt;A useful agent has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Retries with backoff&lt;/strong&gt; for flaky tools&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fallback paths&lt;/strong&gt; when Plan A is clearly dead&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A definition of done&lt;/strong&gt; so it doesn't retry forever&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The ability to ask a human&lt;/strong&gt; when it's genuinely stuck&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is less "AI magic" and more "the same reliability engineering you'd do for any distributed system," except the component making decisions is a probabilistic text generator. Treat it accordingly.&lt;/p&gt;

&lt;p&gt;My favorite analogy: a junior hire who's brilliant but occasionally confident about wrong things. You don't fire them on day one. You give them guardrails, code review, and a clear escalation path. Agents need the same management style.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Its goals are sharper than "be helpful"
&lt;/h2&gt;

&lt;p&gt;"Be helpful" is how you get an agent that writes a 40-page essay when you asked it to rename a variable.&lt;/p&gt;

&lt;p&gt;Useful agents run on &lt;strong&gt;narrow, testable goals&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Open a PR that fixes issue #482 and passes CI"&lt;/li&gt;
&lt;li&gt;"Summarize today's support tickets into 5 bullets for Slack"&lt;/li&gt;
&lt;li&gt;"Find three vendors under $2k/mo that integrate with Salesforce"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Notice the pattern: a clear output, a success condition, and a scope boundary. The more you can evaluate the result with a script (or a very short human glance), the more you can safely let the agent cook.&lt;/p&gt;

&lt;p&gt;If you can't write an acceptance test for the task, you're not ready to agent-ify it. You're ready to &lt;em&gt;chat&lt;/em&gt; about it. Different sport.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. A human can interrupt it without a court order
&lt;/h2&gt;

&lt;p&gt;Full autonomy is a great sci-fi premise and a terrible default for production.&lt;/p&gt;

&lt;p&gt;The agents I actually trust in real workflows all have a &lt;strong&gt;human-in-the-loop checkpoint&lt;/strong&gt; at the moments that matter: before spending money, before pushing to main, before emailing a customer, before deleting anything. Everything else can run hot. The irreversible stuff waits for a nod.&lt;/p&gt;

&lt;p&gt;This isn't a failure of the technology. It's product design. Seatbelts didn't make cars less useful.&lt;/p&gt;

&lt;p&gt;The best agent UIs I've used feel like pair programming with a very fast intern: you see the plan, you approve the risky steps, you course-correct in one sentence when it drifts. Autonomy with a steering wheel.&lt;/p&gt;

&lt;h2&gt;
  
  
  Putting it together
&lt;/h2&gt;

&lt;p&gt;A useful AI agent is not "an LLM that uses tools." It's a small system with:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Trait&lt;/th&gt;
&lt;th&gt;Chatbot&lt;/th&gt;
&lt;th&gt;Useful agent&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Default move&lt;/td&gt;
&lt;td&gt;Reply&lt;/td&gt;
&lt;td&gt;Act, then check&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Memory&lt;/td&gt;
&lt;td&gt;This thread&lt;/td&gt;
&lt;td&gt;This thread + your world&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Failure mode&lt;/td&gt;
&lt;td&gt;Apologize&lt;/td&gt;
&lt;td&gt;Retry, fall back, or escalate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Goal shape&lt;/td&gt;
&lt;td&gt;Vibes&lt;/td&gt;
&lt;td&gt;Testable outcome&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Human role&lt;/td&gt;
&lt;td&gt;Conversation partner&lt;/td&gt;
&lt;td&gt;Supervisor at checkpoints&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If you're evaluating an agent framework or building your own, score it on those five. Demos will lie to you. Tuesday-afternoon reliability will not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to start this week
&lt;/h2&gt;

&lt;p&gt;Don't boil the ocean. Pick &lt;strong&gt;one&lt;/strong&gt; repetitive workflow you already do by hand — something with a clear done-state and low blast radius. Wire up tool calls, add a memory scratchpad, put a human approval step before anything irreversible, and run it ten times.&lt;/p&gt;

&lt;p&gt;The tenth run will teach you more about agentic AI than any thinkpiece (including this one).&lt;/p&gt;

&lt;p&gt;And when your agent finally completes a real task without you hovering — that's the moment it stops being cool and starts being useful. That moment is worth chasing.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Building agents, breaking agents, writing about both. If this was useful, a reaction or comment helps more of the right people find it — and tells me which rabbit holes to go down next.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
