<?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: YQteam</title>
    <description>The latest articles on DEV Community by YQteam (@yqteamdyq).</description>
    <link>https://dev.to/yqteamdyq</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%2F4109553%2F6063d7ea-7520-4225-b869-ac2d91352fa3.png</url>
      <title>DEV Community: YQteam</title>
      <link>https://dev.to/yqteamdyq</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yqteamdyq"/>
    <language>en</language>
    <item>
      <title>I built a local memory layer for AI agents: no vector DB, one SQLite file</title>
      <dc:creator>YQteam</dc:creator>
      <pubDate>Fri, 04 Sep 2026 10:34:48 +0000</pubDate>
      <link>https://dev.to/yqteamdyq/i-built-a-local-memory-layer-for-ai-agents-no-vector-db-one-sqlite-file-27jf</link>
      <guid>https://dev.to/yqteamdyq/i-built-a-local-memory-layer-for-ai-agents-no-vector-db-one-sqlite-file-27jf</guid>
      <description>&lt;p&gt;If you build AI agents, you know the feeling: the model itself has no memory. Every conversation starts from zero. To make an agent remember user preferences, pick up where a task left off, or reuse knowledge across sessions, you have to bolt on a memory system yourself.&lt;/p&gt;

&lt;p&gt;I looked at the existing options, and none of them felt right for me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Vector databases (Pinecone, Qdrant, Weaviate…) are powerful, but standing up a distributed service just for memory is a lot of weight for a small project or a solo dev.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cloud memory services (Mem0 and similar) keep your data on someone else's servers and bill per use.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Rolling my own in-memory store loses everything on restart — and forget semantic search entirely.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What I actually wanted was pretty boring: a local memory layer that runs from one file and one command, works out of the box, and keeps the data fully in my hands. I couldn't find one I liked, so I wrote it. That's how &lt;strong&gt;yq-nova-agent&lt;/strong&gt; started, open sourced on August 3rd: &lt;a href="https://github.com/YQteam-dyq/yq-nova-agent" rel="noopener noreferrer"&gt;github.com/YQteam-dyq/yq-nova-agent&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;In one sentence: a single-file SQLite memory and state layer for agents, built around three operations — &lt;strong&gt;remember&lt;/strong&gt;, &lt;strong&gt;recall&lt;/strong&gt;, &lt;strong&gt;forget&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Things an agent learns persist across conversations and survive restarts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can recall semantically relevant information from past sessions using natural language.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It tracks entities and their relationships, so you get lightweight graph reasoning.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Stale or low-importance memories are cleaned up automatically, so the store doesn't grow forever.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No external service to deploy. The only runtime dependency is one SQLite file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Design decisions worth talking about
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Three operations, one mental model
&lt;/h3&gt;

&lt;p&gt;The API is deliberately small. HTTP, the Rust SDK, and the CLI all expose the same semantics, so there's no conceptual overhead:&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="c"&gt;# Store a fact with tags and an importance score&lt;/span&gt;
yq-nova remember &lt;span class="s2"&gt;"User is a Rust developer who prefers lightweight tools"&lt;/span&gt; &lt;span class="nt"&gt;--tag&lt;/span&gt; user-profile &lt;span class="nt"&gt;--importance&lt;/span&gt; 0.9

&lt;span class="c"&gt;# Recall with natural language&lt;/span&gt;
yq-nova recall &lt;span class="s2"&gt;"user's technical background"&lt;/span&gt; &lt;span class="nt"&gt;--top-k&lt;/span&gt; 5

&lt;span class="c"&gt;# Check what's in the store&lt;/span&gt;
yq-nova stats
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Don't want an HTTP server? The CLI works standalone. Building a Rust app? Pull in &lt;code&gt;yq-nova-core&lt;/code&gt; as a library and call it in-process.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hybrid retrieval, not just vectors
&lt;/h3&gt;

&lt;p&gt;An early version that only did vector similarity missed too much: exact keyword matches and graph relationships between entities don't show up in pure semantic search. So recall fuses three signals with RRF (Reciprocal Rank Fusion):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Semantic search (embedding similarity)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Keyword search (SQLite FTS5 full-text index)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Graph signals (entity-relation relatedness)&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Hybrid mode with graph enhancement&lt;/span&gt;
yq-nova recall &lt;span class="s2"&gt;"storage solutions related to SQLite"&lt;/span&gt; &lt;span class="nt"&gt;--mode&lt;/span&gt; hybrid &lt;span class="nt"&gt;--graph&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Embeddings are pluggable: OpenAI-compatible endpoints by default, plus a built-in mock provider so you can develop and test fully offline.&lt;/p&gt;

&lt;h3&gt;
  
  
  Entities and relations: memory with context
&lt;/h3&gt;

&lt;p&gt;Isolated memory entries aren't enough — pieces of information relate to each other. The project keeps an entity-relation graph with recursive BFS traversal. Store "React is a UI library" and "Vue is a UI library", and a recall can walk the graph to find neighboring concepts. That's context pure vector search can't give you.&lt;/p&gt;

&lt;h3&gt;
  
  
  SQLite is underrated
&lt;/h3&gt;

&lt;p&gt;A lot of people write SQLite off as a toy, but with WAL mode, composite indexes, and FTS5 it's genuinely enough for a single-node memory layer — and the operational cost is close to zero. Persistence, transactions, and schema migrations are all solved problems, so I didn't have to reinvent any of them. This is also what makes the "zero external dependencies" promise hold up.&lt;/p&gt;

&lt;h2&gt;
  
  
  What v0.2.0 added
&lt;/h2&gt;

&lt;p&gt;v0.2.0 shipped on August 6th, and it closed most of the gap between "works on my machine" and "usable in production":&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Embedded SDK mode (&lt;code&gt;EmbeddedNova&lt;/code&gt;) — use it in-process without spinning up an HTTP server&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Local ONNX inference via FastEmbed, so you don't need an OpenAI API key to get vectors&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;API token auth middleware on the HTTP server&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SQLite vector index backed by sqlite-vec's HNSW&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Integration tests plus Criterion benchmarks (KNN, graph traversal, embedding)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Docker image and docker-compose for one-command startup&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A small Python client (&lt;code&gt;yq_nova&lt;/code&gt;)&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Run the server in Docker, persisting data to /data&lt;/span&gt;
docker run &lt;span class="nt"&gt;-p&lt;/span&gt; 7999:7999 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-v&lt;/span&gt; yq-nova-data:/data &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;YQ_NOVA_EMBEDDING__DEFAULT_PROVIDER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;mock &lt;span class="se"&gt;\&lt;/span&gt;
  yq-nova serve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Auth, OpenTelemetry tracing, and benchmarks are the "invisible" features — but they're exactly what you need before trusting something in production, so I prioritized them in v0.2.&lt;/p&gt;

&lt;h2&gt;
  
  
  The honest part
&lt;/h2&gt;

&lt;p&gt;The project is new. It's been open source since August 3rd, and today it has zero stars and an issue tracker that only I talk to. I'm the only maintainer, and there are 18 commits so far. I'm not writing this to claim I built something impressive — I'm writing it because I hit a real problem (agent memory) that I think the "lightweight + local + single file" approach genuinely solves, and I want more people who feel the same pain to find it.&lt;/p&gt;

&lt;p&gt;If you're building agents and have opinions about memory, or you try it and think something is designed wrong, please open an issue. What I'd most like to know:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do you handle agent memory today, and what hurts the most about it?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Your answers will directly shape what I build next — v0.3 is in active development, and I'd rather prioritize based on real scenarios than my own guesses.&lt;/p&gt;

&lt;p&gt;If the project is useful to you, or the direction sounds interesting, a star is the easiest way to help.&lt;/p&gt;




&lt;p&gt;Repo: &lt;a href="https://github.com/YQteam-dyq/yq-nova-agent" rel="noopener noreferrer"&gt;github.com/YQteam-dyq/yq-nova-agent&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm YQteam-dyq on GitHub — happy to chat about agent memory, Rust, or anything in between.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>rust</category>
      <category>sqlite</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
