Google Cloud 发布 Always-On Memory Agent,用持续 LLM 替代 RAG 和嵌入
Google Cloud’s Always-On Memory Agent Replaces RAG and Embeddings With Continuous LLM Consolidation on Gemini 3.1 Flash-Lite
Most AI agents forget. They process a request, answer it, then drop the context. Google Cloud’s generative-ai repository now ships a sample that tackles this directly. It is the Always-On Memory Agent, a reference implementation that treats memory as a running process. Always-On Memory Agent Fundamentally, the project is a lightweight background agent that never stops. It runs 24/7 as a continuous process, not a one-shot call. It is built with Google ADK (Agent Development Kit) and Gemini 3.1 Flash-Lite. Notably, it uses no vector database and no embeddings. Instead, an LLM reads, thinks, and writes structured memory into SQLite. The model choice targets low latency and low cost for continuous background work. How It Works: Ingest, Consolidate, Query Architecturally, an orchestrator routes every request to one of three specialist sub-agents. Each sub-agent owns its own tools for reading or writing the memory store. First, the IngestAgent handles incoming content. It uses Gemini’s multimodal capabilities to extract a summary, entities, topics, and an importance score. That structured record then lands in the memories table. Next, the ConsolidateAgent runs on a timer, every 30 minutes by default. Like sleep cycles, it reviews unconsolidated memories and finds connections between them. Then it writes a synthesized summary, one key insight, and those connections to the database. Consequently, the agent builds new understanding while idle, with no prompt. Finally, the QueryAgent answers questions. It reads all memories and consolidation insights, then synthesizes a response. Importantly, it cites the memory IDs it used as sources. ", src:"report.pdf", sm:"Anthropic reports 62% of Claude usage is code-related.", ent:["Anthropic","Claude","AI agents"], tp:["AI","code generation"], imp:0.8}, {icon:"<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f5bc.png" alt="🖼" class="wp-smiley" style="height: 1em; max-height: 1em;" />", src:"roadmap.png", sm:"Q1 priority: reduce inference costs by 40%.", ent:["Q1","inference"], tp:["cost","planning"], imp:0.7}, {icon:"<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f399.png" alt="🎙" class="wp-smiley" style="height: 1em; max-height: 1em;" />", src:"standup.mp3", sm:"AI agents grow fast, but reliability is still a challenge.", ent:["AI agents","reliability"], tp:["agents","reliability"], imp:0.75}, {icon:"<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4dd.png" alt="📝" class="wp-smiley" style="height: 1em; max-height: 1em;" />", src:"idea.txt", sm:"Smart inbox idea: persistent AI memory for email.", ent:["smart inbox","email"], tp:["product","memory"], imp:0.6} ]; var CONS = { links:[[1,3],[2,1],[3,4]], insight:"The bottleneck for next-gen AI tools is the transition from static RAG to dynamic memory systems." }; var Q = "What should I focus on?"; var A = 'Based on your memories, prioritize: ship the cost-reduction plan <span class="ref">[Memory 2]</span>, ' + 'then close the agent reliability gap <span class="ref">[Memory 3]</span>. ' + 'The smart inbox concept <span class="ref">[Memory 4]</span> validates demand for persistent AI memory.'; var i=0, consolidated=false; var $=function(id){return document.getElementById(id)}; var store=$("store"), pkt=$("pkt"), logEl=$("log"); function post(){ try{ parent.postMessage({type:"aoma-resize",height:document.body.offsetHeight+40},"*"); }catch(e){} } function log(html){ logEl.innerHTML=html; post(); } function activate(el,cls){ [ "sIngest","sCons","sQuery" ].forEach(function(id){ $(id).classList.remove("active","cons","query"); }); if(el){ el.classList.add("active"); if(cls) el.classList.add(cls); } } function packet(color){ pkt.style.background=color; pkt.style.opacity="1"; pkt.style.left="0"; setTimeout(function(){ pkt.style.left="calc(100% - 10px)"; },30); setTimeout(function(){ pkt.style.opacity="0"; },950); } function ingest(){ if(i>=SAMPLES.length){ log("<b>Inbox empty.</b> All 4 sample files ingested — now consolidate or query."); return; } var s=SAMPLES[i]; var id=i+1; activate($("sIngest")); packet("#4285F4"); log('<b>IngestAgent</b> reads <b>'+s.icon+' '+s.src+'</b> → extracting summary, entities, topics, importance…'); var c=document.createElement("div"); c.className="card"; c.id="card"+id; c.innerHTML='<span class="cid">#'+id+'</span><div class="sm">'+s.sm+'</div>'+ '<div class="chips">'+s.ent.map(function(e){return '<span class="chip">'+e+'</span>'}).join("")+'</div>'+ '<div class="chips">'+s.tp.map(function(t){return '<span class="chip tp">'+t+'</span>'}).join("")+'</div>'+ '<div class="imp">importance <b>'+s.imp+'</b></div>'; store.appendChild(c); post(); setTimeout(function(){ c.classList.add("show"); post(); log('<b>Stored memory #'+id+'</b> in SQLite. '+(SAMPLES.length-id)+' file(s) left in inbox.'); },500); i++; if(i>=2){ $("bCons").disabled=false; $("bQuery").disabled=false; } } function consolidate(){ if(i<2){ log("Ingest at least 2 memories first."); return; } activate($("sCons"),"cons"); packet("#FBBC04"); $("tmr").classList.add("run"); log("<b>ConsolidateAgent</b> woke on its 30-min timer — reviewing unconsolidated memories…"); var svg=$("wires"); svg.innerHTML=""; for(var k=1;k<=Math.min(i,4);k++){ var el=$("card"+k); if(el) el.classList.add("hl"); } setTimeout(function(){ CONS.links.forEach(function(pair){ drawWire(pair[0],pair[1]); }); log("<b>Found connections</b> across memories — writing one cross-cutting insight…"); },500); setTimeout(function(){ var ins=$("insight"); ins.innerHTML='<b>Insight:</b> '+CONS.insight; ins.classList.add("show"); $("tmr").classList.remove("run"); consolidated=true; log("<b>Consolidation done.</b> New insight written back to the store — no prompt needed."); post(); },1200); } function drawWire(a,b){ var svg=$("wires"), ca=$("card"+a), cb=$("card"+b); if(!ca||!cb) return; var box=svg.getBoundingClientRect(), ra=ca.getBoundingClientRect(), rb=cb.getBoundingClientRect(); var x1=ra.left-box.left+ra.width/2, y1=ra.top-box.top+ra.height/2; var x2=rb.left-box.left+rb.width/2, y2=rb.top-box.top+rb.height/2; var ln=document.createElementNS("http://www.w3.org/2000/svg","line"); ln.setAttribute("x1",x1);ln.setAttribute("y1",y1);ln.setAttribute("x2",x1);ln.setAttribute("y2",y1); ln.setAttribute("stroke","#FBBC04");ln.setAttribute("stroke-width","2");ln.setAttribute("stroke-dasharray","4 3"); svg.appendChild(ln); requestAnimationFrame(function(){ ln.style.transition="all .5s"; ln.setAttribute("x2",x2); ln.setAttribute("y2",y2); }); } function query(){ if(i<1){ log("Ingest something first."); return; } activate($("sQuery"),"query"); packet("#34A853"); $("qbox").classList.add("show"); $("qask").t
原文超出正文长度上限,此处截断——上游还有内容,完整版见上方「原文 ↗」。
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力