<?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: Rijul Rajesh</title>
    <description>The latest articles on DEV Community by Rijul Rajesh (@rijultp).</description>
    <link>https://dev.to/rijultp</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%2F1207862%2F60f14114-548d-4857-87c3-87cd2e09375d.png</url>
      <title>DEV Community: Rijul Rajesh</title>
      <link>https://dev.to/rijultp</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rijultp"/>
    <language>en</language>
    <item>
      <title>Keep Up With AI by Building Your First Vector Database with ChromaDB</title>
      <dc:creator>Rijul Rajesh</dc:creator>
      <pubDate>Wed, 12 Aug 2026 19:59:39 +0000</pubDate>
      <link>https://dev.to/rijultp/keep-up-with-ai-by-building-your-first-vector-database-with-chromadb-2f6b</link>
      <guid>https://dev.to/rijultp/keep-up-with-ai-by-building-your-first-vector-database-with-chromadb-2f6b</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Rijul. I'm building git-lrc, a micro AI code reviewer that runs on every commit. It's free and source-available on GitHub. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star git-lrc&lt;/a&gt; to help more developers discover the project. Do give it a try and share your feedback&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ChromaDB&lt;/strong&gt; is a term you might have heard being mentioned quite often when working with AI applications.&lt;/p&gt;

&lt;p&gt;ChromaDB is a &lt;strong&gt;vector database&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It is the kind of database you will often see being used in AI applications such as chatbots, RAG systems, and other applications that need to search for information based on semantic meaning.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is a Vector Database?
&lt;/h2&gt;

&lt;p&gt;Let's say we have two sentences:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;How can I get my money back?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;What is your refund policy?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The words are different, but the meaning is similar.&lt;/p&gt;

&lt;p&gt;To allow a computer to work with this kind of semantic similarity, we can convert text into numbers called &lt;strong&gt;embeddings&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;An embedding is a numerical representation of the meaning of a piece of text.&lt;/p&gt;

&lt;p&gt;A vector database allows us to store these embeddings and later search for information based on their semantic similarity.&lt;/p&gt;

&lt;p&gt;ChromaDB is one such vector database.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing ChromaDB
&lt;/h2&gt;

&lt;p&gt;Let's start by installing ChromaDB:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;chromadb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once installed, we can import it and create a client:&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;chromadb&lt;/span&gt;

&lt;span class="n"&gt;chroma_client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;chromadb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we can create a collection:&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="n"&gt;collection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;chroma_client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create_collection&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;my_collection&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;You can think of a collection as a place where we store related pieces of data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding Documents
&lt;/h2&gt;

&lt;p&gt;Now let's add some documents to our collection:&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="n"&gt;collection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;ids&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;id1&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;id2&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="n"&gt;documents&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;This is a document about pineapple&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;This is a document about oranges&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We use &lt;code&gt;collection.add()&lt;/code&gt; to add the text to the database.&lt;/p&gt;

&lt;p&gt;One useful thing here is that we don't have to manually generate the embeddings ourselves for this basic example.&lt;/p&gt;

&lt;p&gt;ChromaDB can generate embeddings for the documents for us.&lt;/p&gt;

&lt;p&gt;When you run this for the first time, ChromaDB will download the embedding model it uses to generate these embeddings.&lt;/p&gt;

&lt;p&gt;Once the documents and their embeddings are stored, we can search the collection.&lt;/p&gt;

&lt;h2&gt;
  
  
  Querying the Database
&lt;/h2&gt;

&lt;p&gt;Let's query the database:&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="n"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;collection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;query_texts&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;This is a query document about hawaii&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="n"&gt;n_results&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="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;query_texts&lt;/code&gt; contains the text we want to search for.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;n_results&lt;/code&gt; specifies how many results we want to retrieve.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;ChromaDB will generate an embedding for the query and compare it with the embeddings stored in the collection.&lt;/p&gt;

&lt;p&gt;It then returns the most relevant results.&lt;/p&gt;

&lt;p&gt;The output might look something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    'ids': [['id1', 'id2']],
    'embeddings': None,
    'documents': [
        [
            'This is a document about pineapple',
            'This is a document about oranges'
        ]
    ],
    'uris': None,
    'included': ['metadatas', 'documents', 'distances'],
    'data': None,
    'metadatas': [[None, None]],
    'distances': [[1.0404, 1.2431]]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice the &lt;code&gt;distances&lt;/code&gt; field.&lt;/p&gt;

&lt;p&gt;These values represent how far the results are from the query in the embedding space. The exact interpretation depends on the distance function being used.&lt;/p&gt;

&lt;p&gt;In this example, the pineapple document has a smaller distance than the oranges document, meaning ChromaDB considers it more similar to the query.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting the Embeddings
&lt;/h2&gt;

&lt;p&gt;By default, the embeddings aren't included in the query result.&lt;/p&gt;

&lt;p&gt;If we want to see them, we can explicitly request them:&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="n"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;collection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;query_texts&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;This is a query document about hawaii&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="n"&gt;n_results&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="n"&gt;include&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;distances&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;metadatas&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;embeddings&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;documents&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="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the output will include the actual embedding vectors:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    'ids': [['id1', 'id2']],
    'embeddings': [
        array([
            [-0.0071,  0.0655, -0.0116, ...,  0.0897,  0.0134],
            [-0.0265,  0.0688, -0.0377, ...,  0.0654,  0.0778]
        ])
    ],
    'documents': [
        [
            'This is a document about pineapple',
            'This is a document about oranges'
        ]
    ],
    'uris': None,
    'included': [
        'distances',
        'metadatas',
        'embeddings',
        'documents'
    ],
    'data': None,
    'metadatas': [[None, None]],
    'distances': [[1.0404, 1.2431]]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The actual embedding contains many numbers, so I've shortened the output with &lt;code&gt;...&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The important thing to understand is the flow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Document
    ↓
Embedding
    ↓
Stored in ChromaDB
    ↓
Query
    ↓
Query embedding
    ↓
Similarity search
    ↓
Relevant documents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's the basic idea behind using ChromaDB as a vector database.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;In this article, we looked at the basics of &lt;strong&gt;ChromaDB&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;This is only the basic usage.&lt;/p&gt;

&lt;p&gt;The more interesting part is seeing how we can use ChromaDB in a real application, such as a &lt;strong&gt;RAG system&lt;/strong&gt;, where we can store documents, search for relevant information, and provide those results to an LLM.&lt;/p&gt;

&lt;p&gt;We can explore that in another article.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c6mz17iiajj885fmxgb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c6mz17iiajj885fmxgb.png" alt=" " width="360" height="540"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;git-lrc&lt;/a&gt; fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.&lt;/p&gt;

&lt;p&gt;Give it a ⭐ &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;star on Github&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
    </item>
    <item>
      <title>You've Heard of RAG. But What Does It Actually Do?</title>
      <dc:creator>Rijul Rajesh</dc:creator>
      <pubDate>Mon, 10 Aug 2026 19:56:22 +0000</pubDate>
      <link>https://dev.to/rijultp/youve-heard-of-rag-but-what-does-it-actually-do-5e57</link>
      <guid>https://dev.to/rijultp/youve-heard-of-rag-but-what-does-it-actually-do-5e57</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Rijul. I'm building git-lrc, a micro AI code reviewer that runs on every commit. It's free and source-available on GitHub. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star git-lrc&lt;/a&gt; to help more developers discover the project. Do give it a try and share your feedback&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Have you been scrolling through AI content and constantly seeing the term &lt;strong&gt;RAG&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;Maybe it sounds like some complicated, high-level AI concept that is difficult to understand.&lt;/p&gt;

&lt;p&gt;But RAG is actually fairly simple.&lt;/p&gt;

&lt;p&gt;And if you're trying to build AI systems, it is a concept worth understanding.&lt;/p&gt;

&lt;p&gt;Let's look at some of the different types of AI systems we see today and understand where RAG fits in.&lt;/p&gt;

&lt;h2&gt;
  
  
  Types of AI Systems We See Today
&lt;/h2&gt;

&lt;p&gt;There are many different ways of building AI systems today, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generative AI&lt;/li&gt;
&lt;li&gt;RAG systems&lt;/li&gt;
&lt;li&gt;Agentic systems&lt;/li&gt;
&lt;li&gt;Multi-agent systems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this article, we'll focus on &lt;strong&gt;RAG&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is RAG?
&lt;/h2&gt;

&lt;p&gt;RAG stands for &lt;strong&gt;Retrieval-Augmented Generation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The basic idea is simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Instead of asking an LLM to answer a question using only what it already knows, we retrieve relevant information and give it to the LLM along with the question.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To understand how this works, we need to look at the main components of a RAG pipeline.&lt;/p&gt;

&lt;h1&gt;
  
  
  Understanding the RAG Pipeline
&lt;/h1&gt;

&lt;p&gt;A basic RAG pipeline looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Documents
    ↓
Chunking
    ↓
Embeddings
    ↓
Vector database
    ↓
User question
    ↓
Question embedding
    ↓
Similarity search
    ↓
Relevant chunks
    ↓
Prompt + retrieved chunks
    ↓
LLM
    ↓
Answer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's break down each part.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Chunking?
&lt;/h2&gt;

&lt;p&gt;Suppose I have a file called &lt;code&gt;policies.md&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;It contains 1,000 lines of information.&lt;/p&gt;

&lt;p&gt;I don't want to send the entire document to the LLM every time a user asks a question.&lt;/p&gt;

&lt;p&gt;Instead, we break the document into smaller pieces.&lt;/p&gt;

&lt;p&gt;This process is called &lt;strong&gt;chunking&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Chunking = breaking documents into smaller pieces that can be independently retrieved.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;policies.md
    ↓
Chunk 1
Chunk 2
Chunk 3
...
Chunk 50
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, instead of searching through or sending the entire document, we can retrieve only the chunks that are relevant to the user's question.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Are Embeddings?
&lt;/h2&gt;

&lt;p&gt;An &lt;strong&gt;embedding&lt;/strong&gt; represents the semantic meaning of text as numbers.&lt;/p&gt;

&lt;p&gt;For example, this sentence:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"What is your refund policy?"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;can be converted into an embedding such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[0.021, -0.183, 0.442, ...]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The actual embedding contains many more numbers, but the important idea is that text is converted into a numerical representation.&lt;/p&gt;

&lt;p&gt;This is useful because we can compare these numerical representations to determine how semantically similar two pieces of text are.&lt;/p&gt;

&lt;p&gt;For example, these two questions use different words:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"How can I get my money back?"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"What is your refund policy?"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But they have a similar meaning.&lt;/p&gt;

&lt;p&gt;Their embeddings should therefore be relatively close to each other.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the Vector Database
&lt;/h2&gt;

&lt;p&gt;We can store the chunks and their embeddings in a &lt;strong&gt;vector database&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;We also keep information about where the chunk came from.&lt;/p&gt;

&lt;p&gt;Something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Customers can request a refund within 30 days..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"embedding"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"policies.md"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So the vector database gives us a way to store our knowledge and later search for information based on semantic similarity.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Does Retrieval Mean?
&lt;/h2&gt;

&lt;p&gt;Now let's see how retrieval actually works.&lt;/p&gt;

&lt;p&gt;Suppose the user asks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;What is the refund policy?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;First, we convert the question into an embedding.&lt;/p&gt;

&lt;p&gt;Then we search the vector database using that embedding.&lt;/p&gt;

&lt;p&gt;The database might return something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. policies.md
   "Customers can request a refund within 30 days..."

2. policies.md
   "Subscriptions can be cancelled at any time..."

3. pricing.md
   "The Pro plan costs $29/month..."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first result is highly relevant to the question.&lt;/p&gt;

&lt;p&gt;Finding these relevant pieces of information is called &lt;strong&gt;retrieval&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How RAG Changes the Prompt
&lt;/h2&gt;

&lt;p&gt;Now we have the relevant information.&lt;/p&gt;

&lt;p&gt;We can add it to the prompt that we send to the LLM.&lt;/p&gt;

&lt;h3&gt;
  
  
  Before
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User: What is the refund policy?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The model has to answer using only the information it already has.&lt;/p&gt;

&lt;h3&gt;
  
  
  After
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;System:
Answer using the provided context.

Context:
Customers can request a refund within 30 days...

Question:
What is the refund policy?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the LLM has the relevant information available in its context.&lt;/p&gt;

&lt;p&gt;It can generate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Customers can request a refund within 30 days.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's essentially what &lt;strong&gt;Retrieval-Augmented Generation&lt;/strong&gt; means.&lt;/p&gt;

&lt;h3&gt;
  
  
  Retrieval
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Find relevant information.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Augmentation
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Put that information into the prompt.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Generation
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Ask the LLM to generate an answer using that information.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's RAG.&lt;/p&gt;

&lt;h1&gt;
  
  
  Building Your Own RAG: A Simple Example
&lt;/h1&gt;

&lt;p&gt;Now let's take a simple use case and see this in action.&lt;/p&gt;

&lt;p&gt;I have a &lt;a href="https://github.com/RijulTP/rag-demo" rel="noopener noreferrer"&gt;small repository that you can clone and try yourself&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Suppose I have a chatbot that is supposed to answer questions about a company.&lt;/p&gt;

&lt;p&gt;The project contains a &lt;code&gt;documents&lt;/code&gt; folder with four files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Company&lt;/li&gt;
&lt;li&gt;Policies&lt;/li&gt;
&lt;li&gt;Pricing&lt;/li&gt;
&lt;li&gt;Products&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The chatbot uses Gemini as the underlying LLM.&lt;/p&gt;

&lt;h2&gt;
  
  
  First, Let's See the Problem Without RAG
&lt;/h2&gt;

&lt;p&gt;First, activate the virtual environment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;source&lt;/span&gt; .venv/bin/activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run the chatbot without RAG:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python chat.py &lt;span class="nt"&gt;--no-rag&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now I'll ask:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;What is the company's refund policy?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwftqrkai0xf581hx1arf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwftqrkai0xf581hx1arf.png" alt=" " width="800" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, the response is generic.&lt;/p&gt;

&lt;p&gt;The chatbot doesn't have access to the company's actual information.&lt;/p&gt;

&lt;p&gt;Let's try another question:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Who is the CEO?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F527ed5swun2zytoghpf2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F527ed5swun2zytoghpf2.png" alt=" " width="798" height="136"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Again, we get a generic response.&lt;/p&gt;

&lt;p&gt;The problem is that the LLM doesn't have our company's documents in its context.&lt;/p&gt;

&lt;h2&gt;
  
  
  Now Let's Run the RAG Version
&lt;/h2&gt;

&lt;p&gt;Now let's run the RAG version of the chatbot:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python chat.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We'll ask the same question:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;What is the company's refund policy?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxjc9u0gjlpoo7u2iuq26.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxjc9u0gjlpoo7u2iuq26.png" alt=" " width="800" height="668"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This time, you can see the retrieved chunks.&lt;/p&gt;

&lt;p&gt;The system first searches the documents and finds the pieces of information that are relevant to the question.&lt;/p&gt;

&lt;p&gt;It then provides those chunks to the LLM so it can generate an answer based on the company's actual information.&lt;/p&gt;

&lt;p&gt;Now let's ask something that isn't present in the knowledge base:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Who is the CEO?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwk815sfcgaf9v36c12wd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwk815sfcgaf9v36c12wd.png" alt=" " width="800" height="593"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This time, the chatbot can recognize that the information isn't available in the knowledge base instead of simply making up an answer.&lt;/p&gt;

&lt;p&gt;That's one of the useful properties of RAG.&lt;/p&gt;

&lt;h1&gt;
  
  
  Wrapping Up
&lt;/h1&gt;

&lt;p&gt;We have built and demonstrated a basic RAG system.&lt;/p&gt;

&lt;p&gt;Along the way, we got familiar with concepts such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Chunking&lt;/li&gt;
&lt;li&gt;Embeddings&lt;/li&gt;
&lt;li&gt;Vector databases&lt;/li&gt;
&lt;li&gt;Retrieval&lt;/li&gt;
&lt;li&gt;Knowledge bases&lt;/li&gt;
&lt;li&gt;Retrieval-Augmented Generation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once we break the process down, these concepts are much simpler than they might initially seem.&lt;/p&gt;

&lt;p&gt;Of course, this is only a basic example of RAG.&lt;/p&gt;

&lt;p&gt;There are many deeper topics to explore, such as different chunking strategies, embedding models, retrieval methods, reranking, hybrid search, and evaluation.&lt;/p&gt;

&lt;p&gt;But for now, you have a basic understanding of what RAG actually does and how the pieces fit together.&lt;/p&gt;

&lt;p&gt;See you in the next article.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c6mz17iiajj885fmxgb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c6mz17iiajj885fmxgb.png" alt=" " width="360" height="540"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;git-lrc&lt;/a&gt; fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.&lt;/p&gt;

&lt;p&gt;Give it a ⭐ &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;star on Github&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>rag</category>
    </item>
    <item>
      <title>Stop Making Your AI Agent Rediscover Your Codebase</title>
      <dc:creator>Rijul Rajesh</dc:creator>
      <pubDate>Sun, 09 Aug 2026 19:49:12 +0000</pubDate>
      <link>https://dev.to/rijultp/stop-making-your-ai-agent-rediscover-your-codebase-l05</link>
      <guid>https://dev.to/rijultp/stop-making-your-ai-agent-rediscover-your-codebase-l05</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Rijul. I'm building git-lrc, a micro AI code reviewer that runs on every commit. It's free and source-available on GitHub. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star git-lrc&lt;/a&gt; to help more developers discover the project. Do give it a try and share your feedback&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;As I use AI coding agents to work on my repositories, I often find myself opening new sessions for different tasks.&lt;/p&gt;

&lt;p&gt;The problem is that every new session starts with the same challenge.&lt;/p&gt;

&lt;p&gt;The agent may have to rediscover the codebase.&lt;/p&gt;

&lt;p&gt;It may search for files, follow imports, look through related code, and try to understand the project structure all over again.&lt;/p&gt;

&lt;p&gt;This gets annoying pretty quickly.&lt;/p&gt;

&lt;p&gt;It also means spending additional &lt;strong&gt;time, tokens, and context&lt;/strong&gt; on work that has already been done in previous sessions.&lt;/p&gt;

&lt;p&gt;So I started looking for a way to solve this problem, since I imagine many people using coding agents run into the same issue.&lt;/p&gt;

&lt;p&gt;That's when I came across &lt;strong&gt;codebase-memory-mcp&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is codebase-memory-mcp?
&lt;/h2&gt;

&lt;p&gt;You can find the repository here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/DeusData/codebase-memory-mcp" rel="noopener noreferrer"&gt;https://github.com/DeusData/codebase-memory-mcp&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The basic idea is to create a &lt;strong&gt;persistent knowledge graph of your codebase&lt;/strong&gt; that an AI agent can query.&lt;/p&gt;

&lt;p&gt;Think about a textbook.&lt;/p&gt;

&lt;p&gt;A textbook usually has an index that tells you where to find specific topics instead of requiring you to read the entire book to locate something.&lt;/p&gt;

&lt;p&gt;codebase-memory-mcp applies a similar idea to your codebase.&lt;/p&gt;

&lt;p&gt;Instead of making the agent repeatedly explore files and related code to figure out where something is, it can query the indexed representation of the codebase and use that information to find the relevant parts.&lt;/p&gt;

&lt;p&gt;This gives the agent a better starting point when working on a repository.&lt;/p&gt;

&lt;p&gt;Rather than repeatedly asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Where is this functionality implemented?&lt;/p&gt;

&lt;p&gt;Which files are connected to this component?&lt;/p&gt;

&lt;p&gt;Where is this function used?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The agent can use the codebase index to navigate the repository more efficiently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing codebase-memory-mcp
&lt;/h2&gt;

&lt;p&gt;You can follow the installation instructions in the repository's README.&lt;/p&gt;

&lt;p&gt;For Linux, you can install it with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the installation is complete, you can run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;codebase-memory-mcp &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This configures the MCP server for a number of supported AI coding agents, including OpenCode and Claude Code.&lt;/p&gt;

&lt;p&gt;After that, you need to index your project before the agent can query the indexed codebase. The project's README recommends restarting your coding agent and asking it to &lt;strong&gt;"Index this project"&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;When we start using AI agents for software development, there are new limitations that we don't encounter in the same way with traditional development.&lt;/p&gt;

&lt;p&gt;One of them is the amount of time and context an agent can spend &lt;strong&gt;rediscovering a codebase&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Tools like codebase-memory-mcp are interesting because they try to solve that problem by giving agents a persistent representation of the codebase that they can query instead of starting from scratch every time.&lt;/p&gt;

&lt;p&gt;As we adapt to agent-based development, understanding these limitations and finding ways to work around them can make the overall development process much smoother.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c6mz17iiajj885fmxgb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c6mz17iiajj885fmxgb.png" alt=" " width="360" height="540"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;git-lrc&lt;/a&gt; fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.&lt;/p&gt;

&lt;p&gt;Give it a ⭐ &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;star on Github&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
    </item>
    <item>
      <title>I Was Underusing OpenCode. Then I Discovered Its Agents</title>
      <dc:creator>Rijul Rajesh</dc:creator>
      <pubDate>Sat, 08 Aug 2026 20:21:19 +0000</pubDate>
      <link>https://dev.to/rijultp/i-was-underusing-opencode-then-i-discovered-its-agents-3g1l</link>
      <guid>https://dev.to/rijultp/i-was-underusing-opencode-then-i-discovered-its-agents-3g1l</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Rijul. I'm building git-lrc, a micro AI code reviewer that runs on every commit. It's free and source-available on GitHub. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star git-lrc&lt;/a&gt; to help more developers discover the project. Do give it a try and share your feedback&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;OpenCode is one of the popular coding agents available right now.&lt;/p&gt;

&lt;p&gt;I've been using it as my daily driver for a while, and there are still many of its features that I haven't explored yet.&lt;/p&gt;

&lt;p&gt;In this article, we'll take a look at the &lt;strong&gt;agent functionality in OpenCode&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;There are two types of agents in OpenCode:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Primary agents&lt;/li&gt;
&lt;li&gt;Subagents&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Primary Agents
&lt;/h2&gt;

&lt;p&gt;These are the main agents that you interact with directly.&lt;/p&gt;

&lt;p&gt;There are two types of primary agents:&lt;/p&gt;

&lt;h3&gt;
  
  
  Build
&lt;/h3&gt;

&lt;p&gt;This is the primary agent with all the tools enabled.&lt;/p&gt;

&lt;p&gt;This is what you would normally use when you want the agent to actually work on your codebase.&lt;/p&gt;

&lt;h3&gt;
  
  
  Plan
&lt;/h3&gt;

&lt;p&gt;This agent is more restricted.&lt;/p&gt;

&lt;p&gt;If you want to repeatedly plan and think through something before actually going into execution mode, this is the agent you can use.&lt;/p&gt;

&lt;p&gt;The idea is to separate &lt;strong&gt;planning from execution&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Subagents
&lt;/h2&gt;

&lt;p&gt;Subagents are specialized assistants that primary agents can invoke for specific tasks.&lt;/p&gt;

&lt;p&gt;For example, instead of having the primary agent explore an entire codebase itself, it can delegate that task to a specialized subagent.&lt;/p&gt;

&lt;p&gt;You can also invoke these specialized agents directly using &lt;code&gt;@&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;OpenCode comes with three built-in subagents.&lt;/p&gt;

&lt;h3&gt;
  
  
  General
&lt;/h3&gt;

&lt;p&gt;A general-purpose subagent designed for research and multi-step tasks.&lt;/p&gt;

&lt;p&gt;You can use it when you want to delegate a task that requires some investigation or multiple steps.&lt;/p&gt;

&lt;h3&gt;
  
  
  Explore
&lt;/h3&gt;

&lt;p&gt;This is a &lt;strong&gt;read-only agent&lt;/strong&gt; designed for exploring codebases.&lt;/p&gt;

&lt;p&gt;For example, if you want to find files based on patterns or understand how something is implemented across a project, this is the agent you can use.&lt;/p&gt;

&lt;p&gt;Since it is read-only, it can explore the codebase without making changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scout
&lt;/h3&gt;

&lt;p&gt;Scout is another read-only agent.&lt;/p&gt;

&lt;p&gt;It is useful for researching external documentation or comparing external code, such as another repository or upstream implementation.&lt;/p&gt;

&lt;p&gt;So if you need to investigate something outside your current codebase, Scout can be useful.&lt;/p&gt;




&lt;h1&gt;
  
  
  Creating Your Own Agent in OpenCode
&lt;/h1&gt;

&lt;p&gt;You can also create your own agents in OpenCode.&lt;/p&gt;

&lt;p&gt;Agents can be defined using JSON in &lt;code&gt;opencode.json&lt;/code&gt; or using Markdown files.&lt;/p&gt;

&lt;p&gt;For global agents, you can place them under:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/.config/opencode/agents/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For project-specific agents, you can use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.opencode/agents/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example, let's create a &lt;code&gt;copywriter.md&lt;/code&gt; agent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Writes clear, engaging, and audience-focused copy&lt;/span&gt;
&lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;subagent&lt;/span&gt;
&lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;anthropic/claude-sonnet-4-20250514&lt;/span&gt;
&lt;span class="na"&gt;temperature&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.7&lt;/span&gt;
&lt;span class="na"&gt;permission&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;edit&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;deny&lt;/span&gt;
  &lt;span class="na"&gt;bash&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;deny&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

You are in copywriting mode. Focus on:
&lt;span class="p"&gt;
-&lt;/span&gt; Clear and engaging writing
&lt;span class="p"&gt;-&lt;/span&gt; Matching the tone to the target audience
&lt;span class="p"&gt;-&lt;/span&gt; Strong messaging and compelling language
&lt;span class="p"&gt;-&lt;/span&gt; Concise structure and readability
&lt;span class="p"&gt;-&lt;/span&gt; Preserving the intended meaning and voice

Produce polished, ready-to-use copy without making direct changes.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a specialized &lt;strong&gt;copywriting agent&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You can then invoke it using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@copywriter
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The filename becomes the agent name, so &lt;code&gt;copywriter.md&lt;/code&gt; becomes &lt;code&gt;@copywriter&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw1r2saiym0jaoy0a05i7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw1r2saiym0jaoy0a05i7.png" alt=" " width="800" height="206"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is where things start getting interesting.&lt;/p&gt;

&lt;p&gt;Instead of repeatedly explaining to the main agent how you want a particular task to be handled, you can create a specialized agent with its own instructions, model, temperature, and permissions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;So that's it for agents in OpenCode.&lt;/p&gt;

&lt;p&gt;We looked at:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Primary agents&lt;/li&gt;
&lt;li&gt;Build and Plan modes&lt;/li&gt;
&lt;li&gt;Subagents&lt;/li&gt;
&lt;li&gt;The built-in General, Explore, and Scout agents&lt;/li&gt;
&lt;li&gt;Creating your own custom agents&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are several other features in OpenCode that are worth exploring.&lt;/p&gt;

&lt;p&gt;The more we understand these features, the more we can customize OpenCode around our own workflow.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c6mz17iiajj885fmxgb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c6mz17iiajj885fmxgb.png" alt=" " width="360" height="540"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;git-lrc&lt;/a&gt; fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.&lt;/p&gt;

&lt;p&gt;Give it a ⭐ &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;star on Github&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>opencode</category>
    </item>
    <item>
      <title>Common Multi-Agent Architectures Every AI Developer Should Know</title>
      <dc:creator>Rijul Rajesh</dc:creator>
      <pubDate>Thu, 06 Aug 2026 22:39:16 +0000</pubDate>
      <link>https://dev.to/rijultp/common-multi-agent-architectures-every-ai-developer-should-know-54pk</link>
      <guid>https://dev.to/rijultp/common-multi-agent-architectures-every-ai-developer-should-know-54pk</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Rijul. I'm building git-lrc, a micro AI code reviewer that runs on every commit. It's free and source-available on GitHub. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star git-lrc&lt;/a&gt; to help more developers discover the project. Do give it a try and share your feedback&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We often hear terms like &lt;strong&gt;AI agents&lt;/strong&gt; and &lt;strong&gt;Agentic AI&lt;/strong&gt;, but they're usually discussed in the singular, as if one agent is responsible for everything.&lt;/p&gt;

&lt;p&gt;You can think of an AI agent like a person. An individual can accomplish impressive tasks on their own, but a team of people with different skills can solve much larger and more complex problems. The same idea applies to AI agents.&lt;/p&gt;

&lt;p&gt;Instead of relying on a single agent, a &lt;strong&gt;multi-agent system&lt;/strong&gt; brings together multiple specialized agents that collaborate toward a shared goal. One agent might research, another might write code, while another reviews the final output. By dividing responsibilities, the system becomes more capable, scalable, and easier to maintain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Use Multiple Agents?
&lt;/h2&gt;

&lt;p&gt;A single agent has to plan, reason, use tools, and generate the final response. As tasks become more complex, this quickly becomes difficult to manage.&lt;/p&gt;

&lt;p&gt;By splitting work across multiple specialized agents, each one focuses on a specific responsibility. This makes the overall system easier to extend, maintain, and scale.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Architectures
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Manager-Worker
&lt;/h3&gt;

&lt;p&gt;Think of an engineering manager leading a team. The manager doesn't write every line of code. Instead, they understand the requirements, assign work to the right people, and combine the results.&lt;/p&gt;

&lt;p&gt;A manager-worker architecture follows the same idea. A manager agent delegates tasks to specialized worker agents, each responsible for a specific job, before assembling the final response.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sequential Pipeline
&lt;/h3&gt;

&lt;p&gt;Imagine an assembly line in a factory. A product moves along a conveyor belt, with each station adding something before passing it to the next.&lt;/p&gt;

&lt;p&gt;A sequential pipeline works the same way. Each agent performs one step of the workflow and hands its output to the next agent until the task is complete.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Research → Analysis → Writing → Review
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Parallel Workers
&lt;/h3&gt;

&lt;p&gt;Not every task depends on another. When work is independent, teams often tackle it simultaneously to save time.&lt;/p&gt;

&lt;p&gt;Parallel worker architectures follow the same principle. Multiple agents work on different parts of a problem at the same time, and their outputs are merged once everyone finishes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Debate
&lt;/h3&gt;

&lt;p&gt;Think about an engineering design discussion. Multiple engineers propose different approaches, challenge each other's ideas, and eventually arrive at the best solution.&lt;/p&gt;

&lt;p&gt;A debate architecture works similarly. Multiple agents generate different answers, critique each other's reasoning, and together refine the strongest response before presenting it to the user.&lt;/p&gt;

&lt;h2&gt;
  
  
  Shared Memory
&lt;/h2&gt;

&lt;p&gt;For agents to collaborate effectively, they often need access to the same information.&lt;/p&gt;

&lt;p&gt;Instead of every agent maintaining its own copy of data, they can read from and write to a shared memory.&lt;/p&gt;

&lt;p&gt;This keeps every agent working with the same context and avoids duplicated information.&lt;/p&gt;

&lt;h2&gt;
  
  
  Routing
&lt;/h2&gt;

&lt;p&gt;Not every request needs every agent.&lt;/p&gt;

&lt;p&gt;A router decides which agent is best suited for a task and forwards the request accordingly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User
 │
 ▼
Router
 ├── Math Agent
 ├── Search Agent
 └── Writing Agent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This reduces unnecessary work, lowers cost, and improves response time.&lt;/p&gt;

&lt;h2&gt;
  
  
  When Should You Use Multi-Agent Systems?
&lt;/h2&gt;

&lt;p&gt;Multi-agent systems are a good fit when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A problem can be divided into specialized responsibilities.&lt;/li&gt;
&lt;li&gt;Different agents need access to different tools or data.&lt;/li&gt;
&lt;li&gt;Tasks can run in parallel.&lt;/li&gt;
&lt;li&gt;You want one or more agents to validate or review another agent's work.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For simpler applications, however, a single well-designed agent is often faster, cheaper, and easier to maintain.&lt;/p&gt;

&lt;p&gt;As with any software architecture, the goal isn't to use more agents. It's to use the right number of agents for the problem you're solving.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c6mz17iiajj885fmxgb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c6mz17iiajj885fmxgb.png" alt=" " width="360" height="540"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;git-lrc&lt;/a&gt; fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.&lt;/p&gt;

&lt;p&gt;Give it a ⭐ &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;star on Github&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
    </item>
    <item>
      <title>Before You Build an AI Agent, Know These Three Agentic Frameworks</title>
      <dc:creator>Rijul Rajesh</dc:creator>
      <pubDate>Mon, 03 Aug 2026 21:47:33 +0000</pubDate>
      <link>https://dev.to/rijultp/before-you-build-an-ai-agent-know-these-three-agentic-frameworks-36h0</link>
      <guid>https://dev.to/rijultp/before-you-build-an-ai-agent-know-these-three-agentic-frameworks-36h0</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Rijul. I'm building git-lrc, a micro AI code reviewer that runs on every commit. It's free and source-available on GitHub. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star git-lrc&lt;/a&gt; to help more developers discover the project. Do give it a try and share your feedback&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Back in the day, when someone mentioned the word &lt;strong&gt;framework&lt;/strong&gt;, it usually referred to developer-oriented frameworks like React, Next.js, Angular, or Django.&lt;/p&gt;

&lt;p&gt;Today, that term has expanded.&lt;/p&gt;

&lt;p&gt;When people talk about frameworks in AI, they are often referring to &lt;strong&gt;agentic frameworks&lt;/strong&gt; as well.&lt;/p&gt;

&lt;p&gt;If you're not familiar with agentic frameworks, let's first understand what they are.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is an Agentic Framework?
&lt;/h2&gt;

&lt;p&gt;Just like React is a framework for building web applications, &lt;strong&gt;agentic frameworks&lt;/strong&gt; are software toolkits and libraries that help developers build autonomous AI agents.&lt;/p&gt;

&lt;p&gt;These agents can pursue goals, reason, plan, and perform tasks with minimal human intervention.&lt;/p&gt;

&lt;p&gt;You can think of an agentic framework as the middle layer between an LLM and a production-ready AI system.&lt;/p&gt;

&lt;p&gt;The LLM generates responses.&lt;/p&gt;

&lt;p&gt;The agentic framework turns that model into something that can repeatedly reason, take actions, observe results, and continue until a goal is achieved.&lt;/p&gt;

&lt;p&gt;Traditional generative AI is reactive.&lt;/p&gt;

&lt;p&gt;You give it a prompt, it generates a response, and the interaction ends.&lt;/p&gt;

&lt;p&gt;Agentic AI is goal-driven.&lt;/p&gt;

&lt;p&gt;An agent can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Receive a high-level goal (for example, &lt;em&gt;"Research this topic and write a report"&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;Break it into smaller tasks&lt;/li&gt;
&lt;li&gt;Decide which tools or APIs to call&lt;/li&gt;
&lt;li&gt;Observe the results&lt;/li&gt;
&lt;li&gt;Adjust its plan if necessary&lt;/li&gt;
&lt;li&gt;Continue until the goal is completed&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Common Capabilities of Agentic Frameworks
&lt;/h2&gt;

&lt;p&gt;Most agentic frameworks provide these capabilities out of the box.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Capability&lt;/th&gt;
&lt;th&gt;Why it matters&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Orchestration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Controls the flow of reasoning and actions, turning one-shot prompts into multi-step workflows.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tool Integration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Lets agents call APIs, databases, browsers, code interpreters, and more.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Memory / State&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Maintains short-term context and long-term memory across tasks.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Planning &amp;amp; Reflection&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Helps agents break down tasks, recover from errors, and improve reliability.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Multi-Agent Support&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Allows multiple specialized agents to collaborate on complex tasks.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Human-in-the-Loop&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Lets humans review or approve actions before they are executed.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Observability&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Provides logging, tracing, evaluation, and debugging for production systems.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Now that you have an idea of what agentic frameworks are, let's look at some of the major players.&lt;/p&gt;

&lt;h2&gt;
  
  
  Major Agentic Frameworks
&lt;/h2&gt;

&lt;p&gt;Some of the most popular agentic frameworks today are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;LangChain + LangGraph&lt;/li&gt;
&lt;li&gt;OpenAI Agents SDK&lt;/li&gt;
&lt;li&gt;Google ADK&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  LangChain + LangGraph
&lt;/h2&gt;

&lt;p&gt;LangChain is a broad framework for building LLM-powered applications.&lt;/p&gt;

&lt;p&gt;LangGraph is the modern layer that extends LangChain into a production-grade agentic framework.&lt;/p&gt;

&lt;h3&gt;
  
  
  Core Model
&lt;/h3&gt;

&lt;p&gt;You model your agent as a graph.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Nodes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Nodes represent units of work, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;LLM calls&lt;/li&gt;
&lt;li&gt;Tool execution&lt;/li&gt;
&lt;li&gt;Custom functions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Edges&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Edges define the control flow between nodes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;State&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A shared state object flows through the graph, allowing different nodes to exchange information.&lt;/p&gt;




&lt;h2&gt;
  
  
  OpenAI Agents SDK
&lt;/h2&gt;

&lt;p&gt;The OpenAI Agents SDK is a lightweight, production-oriented SDK from OpenAI, available in both Python and TypeScript.&lt;/p&gt;

&lt;p&gt;It is the successor to OpenAI's earlier experimental Swarm project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Core Model
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;An &lt;strong&gt;Agent&lt;/strong&gt; is an LLM configured with instructions, tools, and optional guardrails.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Handoffs&lt;/strong&gt; allow one agent to transfer control to another specialized agent.&lt;/li&gt;
&lt;li&gt;A built-in agent loop continues until the task is completed.&lt;/li&gt;
&lt;li&gt;Support for sandboxed agents.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Google ADK (Agent Development Kit)
&lt;/h2&gt;

&lt;p&gt;Google ADK is Google's open-source, code-first framework for building production AI agents.&lt;/p&gt;

&lt;p&gt;It is model-agnostic and deployment-agnostic, but is optimized for Gemini models and the Google Cloud ecosystem.&lt;/p&gt;

&lt;h3&gt;
  
  
  Core Model
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;LLM agents for reasoning and dynamic decision-making.&lt;/li&gt;
&lt;li&gt;Workflow agents for deterministic execution.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Workflow agents include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SequentialAgent&lt;/li&gt;
&lt;li&gt;ParallelAgent&lt;/li&gt;
&lt;li&gt;LoopAgent&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;These are some of the major agentic frameworks available today.&lt;/p&gt;

&lt;p&gt;As a simple guideline:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Need maximum control, long-running agents, or complex graphs?&lt;/strong&gt; → LangGraph&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Want a clean developer experience, especially with OpenAI models?&lt;/strong&gt; → OpenAI Agents SDK&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Building on Google Cloud or working with Gemini models?&lt;/strong&gt; → Google ADK&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each framework has its own strengths, so the right choice depends on the kind of AI agent you're building.&lt;/p&gt;

&lt;p&gt;That's it for this article, see you on the next one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c6mz17iiajj885fmxgb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c6mz17iiajj885fmxgb.png" alt=" " width="360" height="540"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;git-lrc&lt;/a&gt; fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.&lt;/p&gt;

&lt;p&gt;Give it a ⭐ &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;star on Github&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
    </item>
    <item>
      <title>AI Agents Are Not Magic. They Are Just Good Feedback Loops</title>
      <dc:creator>Rijul Rajesh</dc:creator>
      <pubDate>Tue, 28 Jul 2026 18:35:54 +0000</pubDate>
      <link>https://dev.to/rijultp/ai-agents-are-not-magic-they-are-just-good-feedback-loops-lhm</link>
      <guid>https://dev.to/rijultp/ai-agents-are-not-magic-they-are-just-good-feedback-loops-lhm</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Rijul. I'm building git-lrc, a micro AI code reviewer that runs on every commit. It's free and source-available on GitHub. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star git-lrc&lt;/a&gt; to help more developers discover the project. Do give it a try and share your feedback&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Past few years, when things like GPT came out, we were mainly learning how to use them.&lt;/p&gt;

&lt;p&gt;Which basically meant using better prompts.&lt;/p&gt;

&lt;p&gt;So we were continuously refining prompts and trying to get better outputs.&lt;/p&gt;

&lt;p&gt;And that is fine.&lt;/p&gt;

&lt;p&gt;This was basically an exchange back and forth between us and the bot.&lt;/p&gt;

&lt;p&gt;We ask something.&lt;/p&gt;

&lt;p&gt;The AI responds.&lt;/p&gt;

&lt;p&gt;We refine our prompt.&lt;/p&gt;

&lt;p&gt;The AI responds again.&lt;/p&gt;

&lt;p&gt;This loop continues.&lt;/p&gt;

&lt;h2&gt;
  
  
  Agents coming into the picture
&lt;/h2&gt;

&lt;p&gt;But now we are seeing the rise of AI agents.&lt;/p&gt;

&lt;p&gt;We see them everywhere, in every LinkedIn post, every YouTube video.&lt;/p&gt;

&lt;p&gt;The main idea behind agents is to hand over our work to them, and they will handle the remaining tasks with less constant back and forth compared to traditional chatbots.&lt;/p&gt;

&lt;p&gt;Here, agents are expected to work in loops.&lt;/p&gt;

&lt;p&gt;They do one thing.&lt;/p&gt;

&lt;p&gt;Then they review the result, identify additional things that need to be done, take action again, and repeat.&lt;/p&gt;

&lt;p&gt;The main input we give is usually a goal or a prompt.&lt;/p&gt;

&lt;p&gt;But this alone will not give us better control over how the agent works.&lt;/p&gt;

&lt;p&gt;Reliable agents also need things like success criteria, access to the right tools, feedback mechanisms, and rules for when to stop or ask for human input.&lt;/p&gt;

&lt;p&gt;The agent works in loops.&lt;/p&gt;

&lt;p&gt;So we need a better way to design and control these loops.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introducing Loop Engineering
&lt;/h2&gt;

&lt;p&gt;Agents perform tasks through loops.&lt;/p&gt;

&lt;p&gt;So instead of only focusing on prompt engineering, we also need to engineer the loop in which the agent operates.&lt;/p&gt;

&lt;p&gt;This is where Loop Engineering comes in.&lt;/p&gt;

&lt;p&gt;The term has recently gained attention as people started exploring better ways to build reliable workflows around AI agents.&lt;/p&gt;

&lt;p&gt;The idea is simple:&lt;/p&gt;

&lt;p&gt;Instead of only telling an agent what to do, we design the process that helps the agent complete the task reliably.&lt;/p&gt;

&lt;p&gt;Prompting is still an important part of this process.&lt;/p&gt;

&lt;p&gt;But it becomes one layer in a bigger system that includes actions, feedback, memory, verification, and stopping conditions.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 3 pillars of Loop Engineering
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl1ur6wx8rjcp8xvp2ac4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl1ur6wx8rjcp8xvp2ac4.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are many ways to think about designing agent loops.&lt;/p&gt;

&lt;p&gt;A simple way to understand them is through three important parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Actions&lt;/li&gt;
&lt;li&gt;Feedback&lt;/li&gt;
&lt;li&gt;Stop conditions&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Actions
&lt;/h3&gt;

&lt;p&gt;Actions are anything that an agent needs to perform.&lt;/p&gt;

&lt;p&gt;Take us humans as an example.&lt;/p&gt;

&lt;p&gt;When we build software, we write code, read code, interact with files, create new files, run commands, and test our changes.&lt;/p&gt;

&lt;p&gt;These are actions.&lt;/p&gt;

&lt;p&gt;Similarly, for an agent, actions are the things it can perform using its available tools.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reading files&lt;/li&gt;
&lt;li&gt;Writing code&lt;/li&gt;
&lt;li&gt;Running tests&lt;/li&gt;
&lt;li&gt;Calling APIs&lt;/li&gt;
&lt;li&gt;Searching information&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without actions, an agent has limited ability to interact with the world and becomes closer to a traditional chatbot.&lt;/p&gt;

&lt;h2&gt;
  
  
  Feedback
&lt;/h2&gt;

&lt;p&gt;Just performing actions is not enough.&lt;/p&gt;

&lt;p&gt;As humans, we don't just complete a task and assume it is correct.&lt;/p&gt;

&lt;p&gt;We verify our work and look for feedback.&lt;/p&gt;

&lt;p&gt;The same applies to agents.&lt;/p&gt;

&lt;p&gt;Feedback helps the agent understand whether the task is completed or whether more iterations are required.&lt;/p&gt;

&lt;p&gt;For example, a coding agent might:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make a code change&lt;/li&gt;
&lt;li&gt;Run tests&lt;/li&gt;
&lt;li&gt;Check if the issue is fixed&lt;/li&gt;
&lt;li&gt;Continue improving if something fails&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The feedback helps decide what happens next in the loop.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stop conditions
&lt;/h2&gt;

&lt;p&gt;As developers, we stop working on a task once the feedback shows that everything is correct.&lt;/p&gt;

&lt;p&gt;The same stopping mechanism is required for agents.&lt;/p&gt;

&lt;p&gt;Without stop conditions, an agent can keep performing actions without knowing when the task is actually complete.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tests are passing&lt;/li&gt;
&lt;li&gt;The expected output is achieved&lt;/li&gt;
&lt;li&gt;Performance goals are reached&lt;/li&gt;
&lt;li&gt;Human approval is received&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A good loop knows when to continue and when to stop.&lt;/p&gt;

&lt;p&gt;There are also other important parts of production-level agent loops, such as memory, state management, tool permissions, recovery strategies, and verification systems.&lt;/p&gt;

&lt;p&gt;The exact design depends on the type of task the agent is solving.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prompt Engineering vs Loop Engineering
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Prompt Engineering&lt;/th&gt;
&lt;th&gt;Loop Engineering&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Focuses on improving instructions&lt;/td&gt;
&lt;td&gt;Focuses on improving the entire workflow&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;One prompt gives one response&lt;/td&gt;
&lt;td&gt;A goal creates multiple iterations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Human provides continuous feedback&lt;/td&gt;
&lt;td&gt;Agent uses feedback from the environment&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Controls what the AI says&lt;/td&gt;
&lt;td&gt;Controls how the AI works&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Example: Coding Agent
&lt;/h2&gt;

&lt;p&gt;Suppose we are creating a coding agent.&lt;/p&gt;

&lt;p&gt;If we simply tell it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Fix this bug
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It will look at the code, try to fix it, and probably say that the task is complete.&lt;/p&gt;

&lt;p&gt;But what do we do as developers?&lt;/p&gt;

&lt;p&gt;We don't just write code and stop.&lt;/p&gt;

&lt;p&gt;We verify it.&lt;/p&gt;

&lt;p&gt;We run tests.&lt;/p&gt;

&lt;p&gt;We check if the issue is actually fixed.&lt;/p&gt;

&lt;p&gt;We look for side effects.&lt;/p&gt;

&lt;p&gt;So just prompting an agent is not enough.&lt;/p&gt;

&lt;p&gt;We need to define the loop.&lt;/p&gt;

&lt;p&gt;A normal prompt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Fix this bug
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A loop-based approach:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Find the bug
 ↓
Understand the code
 ↓
Create a fix
 ↓
Run tests
 ↓
Analyze failures
 ↓
Improve solution
 ↓
Repeat until tests pass
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The difference is not just the prompt.&lt;/p&gt;

&lt;p&gt;The difference is the process around the AI.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;As we see this AI space constantly evolving, we have only recently started seeing terms like Loop Engineering become popular.&lt;/p&gt;

&lt;p&gt;But the important thing is understanding where the industry is moving.&lt;/p&gt;

&lt;p&gt;AI is moving from simple chat-based interactions to systems that can take actions and complete tasks with less human intervention.&lt;/p&gt;

&lt;p&gt;The next challenge is not only creating smarter models.&lt;/p&gt;

&lt;p&gt;It is creating better systems around those models, where prompts, tools, memory, verification, and feedback loops work together.&lt;/p&gt;

&lt;p&gt;And that is where concepts like Loop Engineering become important.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c6mz17iiajj885fmxgb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c6mz17iiajj885fmxgb.png" alt=" " width="360" height="540"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;git-lrc&lt;/a&gt; fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.&lt;/p&gt;

&lt;p&gt;Give it a ⭐ &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;star on Github&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
    </item>
    <item>
      <title>Build Your Own Personal AI Agent That Works for You With Hermes</title>
      <dc:creator>Rijul Rajesh</dc:creator>
      <pubDate>Sun, 26 Jul 2026 19:32:48 +0000</pubDate>
      <link>https://dev.to/rijultp/build-your-own-personal-ai-agent-that-works-for-you-with-hermes-ln7</link>
      <guid>https://dev.to/rijultp/build-your-own-personal-ai-agent-that-works-for-you-with-hermes-ln7</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Rijul. I'm building git-lrc, a micro AI code reviewer that runs on every commit. It's free and source-available on GitHub. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star git-lrc&lt;/a&gt; to help more developers discover the project. Do give it a try and share your feedback&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;AI assistants can remember things about you now.&lt;/p&gt;

&lt;p&gt;But what if you wanted to run your &lt;strong&gt;own personal AI agent&lt;/strong&gt; that acts as your assistant across different parts of your life?&lt;/p&gt;

&lt;p&gt;One that can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Access your environment&lt;/li&gt;
&lt;li&gt;Use tools&lt;/li&gt;
&lt;li&gt;Remember the things you want it to remember&lt;/li&gt;
&lt;li&gt;Continue working beyond a single chat window&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For that, I want to introduce you to &lt;strong&gt;Hermes Agent&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Hermes Agent?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Hermes Agent&lt;/strong&gt; is an open-source personal AI agent developed by Nous Research.&lt;/p&gt;

&lt;p&gt;At its core, it is a program that connects a language model to an environment where it can actually perform tasks.&lt;/p&gt;

&lt;p&gt;You give Hermes a task.&lt;/p&gt;

&lt;p&gt;Hermes sends that task to an AI model, receives the model's decisions, and then gives the model access to tools that can perform actions in the real world.&lt;/p&gt;

&lt;p&gt;This makes it more than just a chatbot.&lt;/p&gt;

&lt;p&gt;It is also different from traditional coding agents.&lt;/p&gt;

&lt;p&gt;Coding agents are primarily designed to work on software projects.&lt;/p&gt;

&lt;p&gt;Hermes is designed to act more like a &lt;strong&gt;personal AI assistant&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You can use it for tasks such as:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Research this topic.&lt;/p&gt;

&lt;p&gt;Check my server.&lt;/p&gt;

&lt;p&gt;Fix this code.&lt;/p&gt;

&lt;p&gt;Search my previous conversations.&lt;/p&gt;

&lt;p&gt;Run this workflow every morning.&lt;/p&gt;

&lt;p&gt;Message me on Telegram when it's done.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The idea is to have an AI agent that can work across different areas instead of being limited to a single coding environment.&lt;/p&gt;

&lt;p&gt;Now let's see how quickly we can set it up.&lt;/p&gt;




&lt;h2&gt;
  
  
  Setting Up Hermes Agent
&lt;/h2&gt;

&lt;p&gt;You can find the repository here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/nousresearch/hermes-agent" rel="noopener noreferrer"&gt;https://github.com/nousresearch/hermes-agent&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The installation instructions are available in the README.&lt;/p&gt;

&lt;p&gt;For this article, I'll demonstrate the Linux installation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://hermes-agent.nousresearch.com/install.sh | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the installation is complete the setup wizard is launched, where you can configure the agent.&lt;/p&gt;

&lt;p&gt;Once the setup is complete, we can start Hermes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;hermes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Hermes Agent in Action
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxhbepszfzvnt6xn5f5e6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxhbepszfzvnt6xn5f5e6.png" alt=" " width="799" height="444"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now let's try a simple example.&lt;/p&gt;

&lt;p&gt;I'll give Hermes a workflow that I regularly follow when publishing technical articles.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I regularly publish technical articles.

When I finish an article, my usual workflow is:

1. Check the article structure
2. Create a thumbnail
3. Create a short LinkedIn post

Remember this workflow.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0pygkgopo7jn4qpd3b1p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0pygkgopo7jn4qpd3b1p.png" alt=" " width="798" height="143"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this point, Hermes has been told about my workflow.&lt;/p&gt;

&lt;p&gt;Now I'll close Hermes.&lt;/p&gt;

&lt;p&gt;Later, I start it again and ask:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I just finished an article.

What should I do next?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4u2dnbpkmudcvqhqbe7x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4u2dnbpkmudcvqhqbe7x.png" alt=" " width="799" height="235"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hermes is able to retrieve the workflow I previously told it about and suggest the next steps.&lt;/p&gt;

&lt;p&gt;It even offers to help me with those steps.&lt;/p&gt;

&lt;p&gt;This is the interesting part.&lt;/p&gt;

&lt;p&gt;The memory belongs to an agent that I can run myself.&lt;/p&gt;

&lt;p&gt;It is not limited to a single chat session.&lt;/p&gt;

&lt;p&gt;I can run the agent, give it information, close it, and return later.&lt;/p&gt;

&lt;p&gt;The agent can then use the information I previously asked it to remember.&lt;/p&gt;

&lt;p&gt;That starts to feel much more like a personal assistant than a traditional chatbot.&lt;/p&gt;

&lt;h2&gt;
  
  
  More Than Just Memory
&lt;/h2&gt;

&lt;p&gt;Memory is only one part of Hermes Agent.&lt;/p&gt;

&lt;p&gt;It also supports various connectors and tools that allow the agent to interact with different systems.&lt;/p&gt;

&lt;p&gt;This means you can potentially build workflows around things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your local environment&lt;/li&gt;
&lt;li&gt;Servers&lt;/li&gt;
&lt;li&gt;Messaging platforms&lt;/li&gt;
&lt;li&gt;Research&lt;/li&gt;
&lt;li&gt;Scheduled tasks&lt;/li&gt;
&lt;li&gt;Other external services&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'll cover some of those connectors in a separate article.&lt;/p&gt;

&lt;p&gt;For now, the main idea is simple:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You can run your own personal AI agent, give it access to tools, teach it your workflows, and allow it to remember information across sessions.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's it for this introduction to Hermes Agent.&lt;/p&gt;

&lt;p&gt;Thanks for reading. I'd love to hear your thoughts in the comments.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c6mz17iiajj885fmxgb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c6mz17iiajj885fmxgb.png" alt=" " width="360" height="540"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;git-lrc&lt;/a&gt; fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.&lt;/p&gt;

&lt;p&gt;Give it a ⭐ &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;star on Github&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
    </item>
    <item>
      <title>Your AI Agent Has a Backpack. It's Called Retrieval Memory.</title>
      <dc:creator>Rijul Rajesh</dc:creator>
      <pubDate>Sat, 25 Jul 2026 20:40:54 +0000</pubDate>
      <link>https://dev.to/rijultp/your-ai-agent-has-a-backpack-its-called-retrieval-memory-1d95</link>
      <guid>https://dev.to/rijultp/your-ai-agent-has-a-backpack-its-called-retrieval-memory-1d95</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Rijul. I'm building git-lrc, a micro AI code reviewer that runs on every commit. It's free and source-available on GitHub. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star git-lrc&lt;/a&gt; to help more developers discover the project. Do give it a try and share your feedback&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Imagine your AI agent has a backpack.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhf2if7kw35cwddhumogm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhf2if7kw35cwddhumogm.png" alt=" " width="644" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It stores your preferences, project details, past experiences, and procedures.&lt;/p&gt;

&lt;p&gt;But it doesn't carry everything in that backpack into every conversation. When something becomes relevant, it reaches in and retrieves what it needs.&lt;/p&gt;

&lt;p&gt;This is the basic idea behind retrieval memory.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Context Problem
&lt;/h2&gt;

&lt;p&gt;When you interact with an AI agent, it has a limited context window.&lt;/p&gt;

&lt;p&gt;As the conversation continues, more information gets added to that context.&lt;/p&gt;

&lt;p&gt;Eventually, the context can become full.&lt;/p&gt;

&lt;p&gt;At that point, the system may need to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start a new session&lt;/li&gt;
&lt;li&gt;Compress the existing context&lt;/li&gt;
&lt;li&gt;Remove information that is no longer relevant&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But there is another way to prevent the context from becoming unnecessarily large.&lt;/p&gt;

&lt;p&gt;Instead of keeping every piece of information inside the active context, the system can store information externally and retrieve it only when it is needed.&lt;/p&gt;

&lt;p&gt;This is the basic idea behind &lt;strong&gt;retrieval memory&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Retrieval Memory?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Retrieval memory&lt;/strong&gt; is a way for an AI system to remember information by storing it externally and retrieving the relevant parts when needed.&lt;/p&gt;

&lt;p&gt;The basic flow looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User asks something
       ↓
Search stored memory
       ↓
Retrieve relevant information
       ↓
Add it to the AI's context
       ↓
Generate a response
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important idea is that the information does not need to remain inside the active context all the time.&lt;/p&gt;

&lt;p&gt;It can be stored somewhere else and brought back when it becomes relevant.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Simple Example
&lt;/h2&gt;

&lt;p&gt;Suppose I tell an AI assistant:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;My favourite programming language is Rust.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The system might store this as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User preference:
Favourite programming language = Rust
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Later, I ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Suggest a programming language for my next project.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The system can then:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Search its stored memories.&lt;/li&gt;
&lt;li&gt;Retrieve the fact that I prefer Rust.&lt;/li&gt;
&lt;li&gt;Add that information to the current context.&lt;/li&gt;
&lt;li&gt;Use it when generating the response.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The AI might then suggest Rust, or at least consider it as one of the options.&lt;/p&gt;

&lt;p&gt;The important point is that the preference did not need to remain in the active context between the two conversations.&lt;/p&gt;

&lt;p&gt;It was stored externally and retrieved when relevant.&lt;/p&gt;

&lt;p&gt;That is retrieval memory.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The memory is not directly inside the model. It is retrieved into the context when relevant.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How Is This Different From RAG?
&lt;/h2&gt;

&lt;p&gt;Retrieval memory is similar to &lt;strong&gt;RAG&lt;/strong&gt;, or Retrieval-Augmented Generation.&lt;/p&gt;

&lt;p&gt;The basic process is similar:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Query
  ↓
Retrieve relevant information
  ↓
Add it to the context
  ↓
Generate a response
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The main difference is usually the source of the information.&lt;/p&gt;

&lt;p&gt;With traditional RAG, the system might retrieve information from:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Documentation&lt;/li&gt;
&lt;li&gt;PDFs&lt;/li&gt;
&lt;li&gt;Websites&lt;/li&gt;
&lt;li&gt;Knowledge bases&lt;/li&gt;
&lt;li&gt;Company documents&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With retrieval memory, the system usually retrieves information specific to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A particular user&lt;/li&gt;
&lt;li&gt;A particular agent&lt;/li&gt;
&lt;li&gt;A previous interaction&lt;/li&gt;
&lt;li&gt;A project&lt;/li&gt;
&lt;li&gt;A specific workflow&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the source is often &lt;strong&gt;personal or agent-specific memory&lt;/strong&gt;, rather than a general document collection.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Kind of Information Can Be Retrieved?
&lt;/h2&gt;

&lt;p&gt;Retrieval memory can contain many different types of information.&lt;/p&gt;

&lt;h3&gt;
  
  
  User Preferences
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The user prefers the Fetch API over Axios.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Facts
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The user is working on Project X.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Past Experiences
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;This approach failed previously because the API rate limit was exceeded.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Procedures
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;When deploying this project, run these commands in this order.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Conversation Summaries
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The previous discussion concluded that the system should use PostgreSQL instead of SQLite.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The system can then retrieve the relevant information when it becomes useful.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Big Idea
&lt;/h2&gt;

&lt;p&gt;Retrieval memory allows an AI agent to separate &lt;strong&gt;storage&lt;/strong&gt; from &lt;strong&gt;active context&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of keeping every piece of information in the context window all the time:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Store information externally
            ↓
User asks a question
            ↓
Search stored memory
            ↓
Retrieve what is relevant
            ↓
Add it to the current context
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This helps the agent access information from previous interactions without carrying the entire history into every new conversation.&lt;/p&gt;

&lt;p&gt;So when you see terms like &lt;strong&gt;semantic memory&lt;/strong&gt;, &lt;strong&gt;episodic memory&lt;/strong&gt;, or &lt;strong&gt;retrieval memory&lt;/strong&gt;, they are describing different ways an AI system can store and use information.&lt;/p&gt;

&lt;p&gt;Understanding these concepts makes it easier to understand how modern AI agents build memory systems that go beyond simply keeping a giant conversation history.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c6mz17iiajj885fmxgb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c6mz17iiajj885fmxgb.png" alt=" " width="360" height="540"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;git-lrc&lt;/a&gt; fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.&lt;/p&gt;

&lt;p&gt;Give it a ⭐ &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;star on Github&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>agents</category>
    </item>
    <item>
      <title>Context Compression: Making AI Agents Forget Without Losing the Plot</title>
      <dc:creator>Rijul Rajesh</dc:creator>
      <pubDate>Fri, 24 Jul 2026 20:09:52 +0000</pubDate>
      <link>https://dev.to/rijultp/context-compression-making-ai-agents-forget-without-losing-the-plot-5g7a</link>
      <guid>https://dev.to/rijultp/context-compression-making-ai-agents-forget-without-losing-the-plot-5g7a</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Rijul. I'm building git-lrc, a micro AI code reviewer that runs on every commit. It's free and source-available on GitHub. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star git-lrc&lt;/a&gt; to help more developers discover the project. Do give it a try and share your feedback&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Suppose you are working with an AI agent to fix an API.&lt;/p&gt;

&lt;p&gt;You give it a simple instruction:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Fix the API 500 error.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The agent might go through a workflow like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent:
→ Reads the logs
→ Searches the codebase
→ Checks the database
→ Checks recent commits
→ Runs tests
→ Tries a fix
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After 30 tool calls, the agent's context can become huge.&lt;/p&gt;

&lt;p&gt;But most of that information may no longer be useful.&lt;/p&gt;

&lt;p&gt;The agent does not need to keep every detail of the investigation forever.&lt;/p&gt;

&lt;p&gt;It does not need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every line from every log&lt;/li&gt;
&lt;li&gt;Every failed search&lt;/li&gt;
&lt;li&gt;Repeated information&lt;/li&gt;
&lt;li&gt;Old tool outputs&lt;/li&gt;
&lt;li&gt;Intermediate steps that are no longer relevant&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What it really needs is the &lt;strong&gt;current state of the investigation&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Context Problem
&lt;/h2&gt;

&lt;p&gt;Imagine the agent has accumulated &lt;strong&gt;40,000 tokens of context&lt;/strong&gt; during the investigation.&lt;/p&gt;

&lt;p&gt;That context takes up valuable space.&lt;/p&gt;

&lt;p&gt;As the agent continues working, the context window gradually fills up.&lt;/p&gt;

&lt;p&gt;Eventually, the agent may have less room for new information, which can lead to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Higher costs&lt;/li&gt;
&lt;li&gt;Slower processing&lt;/li&gt;
&lt;li&gt;Less room for future tool calls&lt;/li&gt;
&lt;li&gt;Important information being pushed out of context&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So instead of carrying the entire history forward, we can compress it.&lt;/p&gt;

&lt;p&gt;The original 40,000 tokens might become:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Goal:
Fix the API 500 error.

Found:
The error started after deployment v1.4.
The database is healthy.
The payment service is missing PAYMENT_API_KEY.

Tried:
Restarting the service. No effect.

Next:
Fix the environment configuration and retest.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is &lt;strong&gt;context compression&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Context Compression?
&lt;/h2&gt;

&lt;p&gt;Context compression is not simply about making the context shorter.&lt;/p&gt;

&lt;p&gt;The goal is to:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Remove the information that is no longer useful while preserving what the agent needs to continue working.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The agent does not need to remember every step it took.&lt;/p&gt;

&lt;p&gt;It needs to remember the important conclusions from those steps.&lt;/p&gt;




&lt;h1&gt;
  
  
  Three Basic Context Compression Techniques
&lt;/h1&gt;

&lt;h2&gt;
  
  
  1. Pruning
&lt;/h2&gt;

&lt;p&gt;The simplest technique is &lt;strong&gt;pruning&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You remove information that is no longer useful.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent:
→ Searched for config.yaml
→ Found nothing

Agent:
→ Searched for settings.yaml
→ Found nothing

Agent:
→ Searched environment variables
→ Found PAYMENT_API_KEY is missing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the agent has found the actual cause, the failed searches may no longer be useful.&lt;/p&gt;

&lt;p&gt;They can be removed from the active context.&lt;/p&gt;

&lt;p&gt;The important information is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PAYMENT_API_KEY is missing.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pruning is essentially:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Remove what the agent no longer needs.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  2. Distillation
&lt;/h2&gt;

&lt;p&gt;Instead of keeping the entire conversation, we can convert it into a structured summary.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Goal:
Fix the API 500 error.

Facts:
- The database is healthy.
- The error started after deployment v1.4.
- PAYMENT_API_KEY is missing.

Decisions:
- Do not modify the database.
- Fix the environment configuration.

Completed:
- Checked the logs.
- Verified database connectivity.
- Inspected environment variables.

Next Action:
- Add PAYMENT_API_KEY.
- Restart the service.
- Retest the API.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The original investigation may have taken thousands of tokens.&lt;/p&gt;

&lt;p&gt;But the distilled state contains the information the agent needs to continue.&lt;/p&gt;

&lt;p&gt;A useful structure might be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Goal
Facts
Decisions
Completed Work
Next Action
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Distillation is essentially:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Turn a long history into a structured state.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  3. Generalisation
&lt;/h2&gt;

&lt;p&gt;Sometimes an investigation contains knowledge that can be reused in future situations.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Specific experience:

Missing API key caused the payment API to fail.
              ↓
Reusable knowledge:

Check environment variables when an API integration fails.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent is no longer just remembering what happened in one specific incident.&lt;/p&gt;

&lt;p&gt;It is extracting a general rule from that experience.&lt;/p&gt;

&lt;p&gt;This can be useful for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Future investigations&lt;/li&gt;
&lt;li&gt;Runbooks&lt;/li&gt;
&lt;li&gt;Agent skills&lt;/li&gt;
&lt;li&gt;Long-term memory&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Generalisation is essentially:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Turn a specific experience into reusable knowledge.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  The Big Idea
&lt;/h1&gt;

&lt;p&gt;An AI agent does not need to carry its entire history forever.&lt;/p&gt;

&lt;p&gt;It needs to preserve the parts of that history that are still useful.&lt;/p&gt;

&lt;p&gt;A long investigation might look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;40,000 tokens of raw history
              ↓
       Context compression
              ↓
      Goal + Facts + Decisions
              ↓
          Next Action
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent can then continue working with a much smaller context while retaining the information that actually matters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Context compression is not about forgetting everything.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It is about forgetting the right things.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c6mz17iiajj885fmxgb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c6mz17iiajj885fmxgb.png" alt=" " width="360" height="540"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;git-lrc&lt;/a&gt; fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.&lt;/p&gt;

&lt;p&gt;Give it a ⭐ &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;star on Github&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>AI Runbooks Explained: How to Give AI Agents Procedures to Follow</title>
      <dc:creator>Rijul Rajesh</dc:creator>
      <pubDate>Tue, 21 Jul 2026 19:59:48 +0000</pubDate>
      <link>https://dev.to/rijultp/ai-runbooks-explained-how-to-give-ai-agents-procedures-to-follow-52e</link>
      <guid>https://dev.to/rijultp/ai-runbooks-explained-how-to-give-ai-agents-procedures-to-follow-52e</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Rijul. I'm building git-lrc, a micro AI code reviewer that runs on every commit. It's free and source-available on GitHub. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star git-lrc&lt;/a&gt; to help more developers discover the project. Do give it a try and share your feedback&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you have read about AI agents, you may have come across the term &lt;strong&gt;AI runbook&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You may also have seen people confidently talk about agents handling routine tasks, running commands, investigating issues, and performing actions much like a human engineer would.&lt;/p&gt;

&lt;p&gt;But there is an important distinction here:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Just because an agent can use tools does not mean it knows what to do or what procedure to follow.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think about the difference between an experienced engineer and a new employee joining a team.&lt;/p&gt;

&lt;p&gt;An experienced engineer may already know the team's standard procedures.&lt;/p&gt;

&lt;p&gt;A new employee might have the technical ability to do the work, but still needs to learn:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What to check first&lt;/li&gt;
&lt;li&gt;Which tools to use&lt;/li&gt;
&lt;li&gt;What actions to avoid&lt;/li&gt;
&lt;li&gt;How the team normally handles a particular situation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AI agents are similar.&lt;/p&gt;

&lt;p&gt;Suppose you tell an agent:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The API is broken. Fix it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The agent might start investigating broadly.&lt;/p&gt;

&lt;p&gt;It could check different files, inspect various configurations, run multiple commands, and try several approaches before figuring out what is actually wrong.&lt;/p&gt;

&lt;p&gt;This can lead to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Wasted time&lt;/li&gt;
&lt;li&gt;Wasted tokens&lt;/li&gt;
&lt;li&gt;Unnecessary tool calls&lt;/li&gt;
&lt;li&gt;More iterations than necessary&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But what if we already had a standard procedure for handling this particular problem?&lt;/p&gt;

&lt;p&gt;The agent could follow that procedure and focus its investigation.&lt;/p&gt;

&lt;p&gt;That is where &lt;strong&gt;AI runbooks&lt;/strong&gt; come in.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is an AI Runbook?
&lt;/h2&gt;

&lt;p&gt;A runbook is simply a documented procedure for handling a specific situation.&lt;/p&gt;

&lt;p&gt;For example, suppose an API starts returning HTTP 500 errors.&lt;/p&gt;

&lt;p&gt;A runbook might say:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The API is returning 500 errors.

1. Check if the API is running.
2. Inspect the logs.
3. Check the database configuration.
4. Verify that the database is accessible.
5. Make the smallest necessary fix.
6. Verify that the API is working again.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This gives the agent a procedure to follow.&lt;/p&gt;

&lt;p&gt;The agent still has to perform the investigation and use its tools.&lt;/p&gt;

&lt;p&gt;The runbook simply provides a structure for that investigation.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Small AI Runbook Demo
&lt;/h2&gt;

&lt;p&gt;To demonstrate this, I created a small task management API using &lt;strong&gt;FastAPI&lt;/strong&gt; and &lt;strong&gt;SQLite&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You can also try the demo yourself through &lt;a href="https://github.com/RijulTP/ai-runbook-demo" rel="noopener noreferrer"&gt;my repository&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The project contains a runbook for handling API failures:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;runbooks/
└── api-500-error.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now let's look at the scenario.&lt;/p&gt;

&lt;p&gt;First, I start the server.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzmm1900x82i7t7candx2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzmm1900x82i7t7candx2.png" alt=" " width="800" height="485"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The API is working correctly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbs8ldmgkay07muc62lsp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbs8ldmgkay07muc62lsp.png" alt=" " width="800" height="41"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, I intentionally break the application by changing the database path from:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./data/app.db
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./data1/app.db
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F34o2goen851ytwf6dsod.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F34o2goen851ytwf6dsod.png" alt=" " width="534" height="156"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, when I call the health endpoint, the API returns an error.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhu862al0861761g7o5je.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhu862al0861761g7o5je.png" alt=" " width="800" height="45"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this point, I ask my AI agent to investigate the issue.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The API is returning HTTP 500 errors.

Please check whether there is a relevant runbook in the runbooks/ directory and follow it.

Diagnose the root cause, make the smallest safe fix, and verify that the API is working again.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwws8wthp441n8da9qgp5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwws8wthp441n8da9qgp5.png" alt=" " width="800" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Instead of immediately changing application code, the agent can follow the procedure defined in the runbook:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Find the relevant runbook.&lt;/li&gt;
&lt;li&gt;Check the API.&lt;/li&gt;
&lt;li&gt;Inspect the logs.&lt;/li&gt;
&lt;li&gt;Check the database configuration.&lt;/li&gt;
&lt;li&gt;Identify the incorrect database path.&lt;/li&gt;
&lt;li&gt;Fix the configuration.&lt;/li&gt;
&lt;li&gt;Verify that the API is healthy again.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The agent still performs the investigation.&lt;/p&gt;

&lt;p&gt;The runbook simply gives that investigation a structure.&lt;/p&gt;

&lt;p&gt;In this case, the agent finds the root cause and applies the fix.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fza68u9evfe1zbcy9ttvf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fza68u9evfe1zbcy9ttvf.png" alt=" " width="799" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Prompt vs Runbook
&lt;/h2&gt;

&lt;p&gt;Compare these two instructions.&lt;/p&gt;

&lt;p&gt;A simple prompt might say:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Fix the API.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A runbook provides something more specific:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;When the API returns a 500 error, check these things in this order.

Avoid making unnecessary changes.

After applying a fix, verify that the API is working again.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The difference is important.&lt;/p&gt;

&lt;p&gt;With a simple prompt, the agent has to figure out the entire process by itself.&lt;/p&gt;

&lt;p&gt;With a runbook, the agent gets &lt;strong&gt;procedural knowledge&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It knows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What to check&lt;/li&gt;
&lt;li&gt;In what order to check it&lt;/li&gt;
&lt;li&gt;What actions to take&lt;/li&gt;
&lt;li&gt;What actions to avoid&lt;/li&gt;
&lt;li&gt;How to verify the result&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This makes the agent's behavior more predictable.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Big Idea
&lt;/h2&gt;

&lt;p&gt;AI agents already have the ability to use tools.&lt;/p&gt;

&lt;p&gt;They can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Read files&lt;/li&gt;
&lt;li&gt;Run commands&lt;/li&gt;
&lt;li&gt;Inspect logs&lt;/li&gt;
&lt;li&gt;Modify code&lt;/li&gt;
&lt;li&gt;Call APIs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But tools only provide &lt;strong&gt;capabilities&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A runbook provides a &lt;strong&gt;procedure&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That is the key idea behind AI runbooks.&lt;/p&gt;

&lt;p&gt;You are not just telling the agent:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Here are some tools. Figure it out.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You are giving it:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Here is how this team normally handles this situation. Follow these steps, use your judgment where necessary, and verify the result when you are done.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is how you give an AI agent procedural knowledge.&lt;/p&gt;

&lt;p&gt;And in many cases, that can lead to a much more predictable outcome than simply giving an agent a vague instruction and hoping it figures out the best approach.&lt;/p&gt;

&lt;p&gt;That's it for this introduction to AI runbooks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c6mz17iiajj885fmxgb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c6mz17iiajj885fmxgb.png" alt=" " width="360" height="540"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;git-lrc&lt;/a&gt; fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.&lt;/p&gt;

&lt;p&gt;Give it a ⭐ &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;star on Github&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>agents</category>
    </item>
    <item>
      <title>Semantic Memory: How AI Builds Knowledge About You</title>
      <dc:creator>Rijul Rajesh</dc:creator>
      <pubDate>Mon, 20 Jul 2026 20:40:07 +0000</pubDate>
      <link>https://dev.to/rijultp/semantic-memory-how-ai-builds-knowledge-about-you-cdj</link>
      <guid>https://dev.to/rijultp/semantic-memory-how-ai-builds-knowledge-about-you-cdj</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Rijul. I'm building git-lrc, a micro AI code reviewer that runs on every commit. It's free and source-available on GitHub. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star git-lrc&lt;/a&gt; to help more developers discover the project. Do give it a try and share your feedback&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When building personal AI systems, one of the most important types of memory to understand is &lt;strong&gt;semantic memory&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In simple terms, semantic memory is a structured store of knowledge such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Facts&lt;/li&gt;
&lt;li&gt;Concepts&lt;/li&gt;
&lt;li&gt;Preferences&lt;/li&gt;
&lt;li&gt;Relationships&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is the part of an AI memory system that helps answer:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"What do I know about this person, project, company, or concept?"&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Episodic Memory vs Semantic Memory
&lt;/h2&gt;

&lt;p&gt;Let's say the following conversation happens:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User: I usually use React and TypeScript for frontend projects.

AI: Got it.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This single conversation can be stored in two very different ways.&lt;/p&gt;




&lt;h2&gt;
  
  
  Episodic Memory
&lt;/h2&gt;

&lt;p&gt;Episodic memory stores the event itself.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;On July 21, 2026, the user said:

"I usually use React and TypeScript for frontend projects."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The system remembers:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happened, when it happened, and what was said.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is similar to remembering an experience.&lt;/p&gt;




&lt;h2&gt;
  
  
  Semantic Memory
&lt;/h2&gt;

&lt;p&gt;Semantic memory extracts the knowledge from that conversation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User
├── frontend_framework → React
└── primary_language → TypeScript
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The system no longer needs to remember the original conversation to understand the underlying information.&lt;/p&gt;

&lt;p&gt;It has converted the conversation into structured knowledge.&lt;/p&gt;

&lt;p&gt;This is the key difference:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Episodic memory remembers the event.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Semantic memory remembers what was learned from the event.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Semantic Memory as a Knowledge Layer
&lt;/h2&gt;

&lt;p&gt;You can think of semantic memory as a &lt;strong&gt;knowledge layer&lt;/strong&gt; for an AI system.&lt;/p&gt;

&lt;p&gt;For example, an AI assistant might maintain a structured representation of a user like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User
├── prefers → React
├── uses → TypeScript
├── prefers → Linux
├── works_on → E-commerce platform
├── interested_in → AI agents
└── prefers → concise technical explanations
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is semantic memory.&lt;/p&gt;

&lt;p&gt;The information is no longer stored as a conversation.&lt;/p&gt;

&lt;p&gt;Instead, it is stored as knowledge about entities and the relationships between them.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Are Entities?
&lt;/h2&gt;

&lt;p&gt;An entity is something that the AI system knows about.&lt;/p&gt;

&lt;p&gt;Examples include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User&lt;/li&gt;
&lt;li&gt;Customer&lt;/li&gt;
&lt;li&gt;Company&lt;/li&gt;
&lt;li&gt;Product&lt;/li&gt;
&lt;li&gt;Project&lt;/li&gt;
&lt;li&gt;Document&lt;/li&gt;
&lt;li&gt;Location&lt;/li&gt;
&lt;li&gt;Organization&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User ──works_on──&amp;gt; E-commerce platform
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;User&lt;/strong&gt; is an entity&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;E-commerce platform&lt;/strong&gt; is an entity&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;works_on&lt;/strong&gt; is the relationship between them&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This structure allows an AI system to reason about information instead of simply searching through old conversations.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Does This Matter?
&lt;/h2&gt;

&lt;p&gt;Imagine an AI assistant that has stored hundreds of conversations with you.&lt;/p&gt;

&lt;p&gt;If it only has episodic memory, it may need to search through those conversations every time it wants to answer a question about your preferences or projects.&lt;/p&gt;

&lt;p&gt;With semantic memory, it can directly access structured knowledge such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User
├── uses → React
├── uses → TypeScript
├── works_on → E-commerce platform
└── interested_in → AI agents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The assistant does not need to reread every conversation to discover these facts.&lt;/p&gt;

&lt;p&gt;The knowledge has already been extracted and organized.&lt;/p&gt;

&lt;p&gt;That is what makes semantic memory such an important part of personal AI systems.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c6mz17iiajj885fmxgb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c6mz17iiajj885fmxgb.png" alt=" " width="360" height="540"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;git-lrc&lt;/a&gt; fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.&lt;/p&gt;

&lt;p&gt;Give it a ⭐ &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;star on Github&lt;/a&gt;&lt;/p&gt;

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