{"slug": "google-clouds-always-on-memory-agent-replaces-rag-and-embeddings-with-continuous", "title": "Google Cloud’s Always-On Memory Agent Replaces RAG and Embeddings With Continuous LLM Consolidation on Gemini 3.1 Flash-Lite", "summary": "Google Cloud released an Always-On Memory Agent sample that replaces RAG and embeddings with continuous LLM consolidation using Gemini 3.1 Flash-Lite and SQLite. The agent runs as a background process, ingesting files, consolidating memories every 30 minutes, and answering queries with cited sources. It aims to provide durable, evolving context for research assistants, personal knowledge bases, and support agents.", "body_md": "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](https://github.com/GoogleCloudPlatform/generative-ai/tree/main/gemini/agents/always-on-memory-agent), a reference implementation that treats memory as a running process.\n\n**Always-On Memory Agent**\n\nFundamentally, 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.\n\n**How It Works: Ingest, Consolidate, Query**\n\nArchitecturally, 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.\n\nFirst, 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`\n\ntable.\n\nNext, 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.\n\nFinally, 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.\n\n**Supported Inputs**\n\nBeyond text, the IngestAgent accepts 27 file types across five categories. Simply drop any supported file into the `./inbox`\n\nfolder for automatic pickup.\n\n| Category | Extensions |\n|---|---|\n| Text | `.txt` , `.md` , `.json` , `.csv` , `.log` , `.xml` , `.yaml` , `.yml` |\n| Images | `.png` , `.jpg` , `.jpeg` , `.gif` , `.webp` , `.bmp` , `.svg` |\n| Audio | `.mp3` , `.wav` , `.ogg` , `.flac` , `.m4a` , `.aac` |\n| Video | `.mp4` , `.webm` , `.mov` , `.avi` , `.mkv` |\n| Documents | `.pdf` |\n\n**How It Compares to RAG, Summaries, and Knowledge Graphs**\n\nTo clarify the difference, it frames three common memory approaches. Each solves part of the problem, yet leaves a gap.\n\n| Approach | How it stores | Active processing | Main limitation |\n|---|---|---|---|\n| Vector DB + RAG | Embeddings in a vector store | None | Passive; embeds once, retrieves later |\n| Conversation summary | Compressed text | None | Loses detail; no cross-reference |\n| Knowledge graphs | Nodes and edges | Manual upkeep | Expensive to build and maintain |\n| Always-On Memory Agent | Structured rows in SQLite | Continuous consolidation | Query reads up to 50 recent memories |\n\nUnlike RAG, this agent processes memory actively, not only on retrieval.\n\n**Use Cases With Examples**\n\nPractically, the pattern fits any workload needing durable, evolving context. **Consider three examples.**\n\n- A\n**research assistant** ingests PDFs, meeting audio, and screenshots all week. Later, it links a cost target to a reliability problem on its own. - A\n**personal knowledge base** absorbs notes, articles, and images continuously. Over time, consolidation surfaces themes you never explicitly connected. - A\n**support agent** stores past tickets as structured memories. Then it answers new questions with cited references to earlier cases.\n\n**Getting Started**\n\nWith the design clear, setup stays minimal for early-level engineers. Install dependencies, set your key, then start the process.\n\n```\npip install -r requirements.txt\nexport GOOGLE_API_KEY=\"your-gemini-api-key\"\npython agent.py\n```\n\nOnce running, the agent watches `./inbox`\n\n, consolidates every 30 minutes, and serves an HTTP API on port 8888. Therefore, you can also feed it over HTTP.\n\n```\n# Ingest text\ncurl -X POST http://localhost:8888/ingest \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"text\": \"AI agents are the future\", \"source\": \"article\"}'\n\n# Ask a question\ncurl \"http://localhost:8888/query?q=what+do+you+know\"\n```\n\nAdditionally, the API exposes `/status`\n\n, `/memories`\n\n, `/consolidate`\n\n, `/delete`\n\n, and `/clear`\n\n. An optional Streamlit dashboard adds ingest, query, browse, and delete controls. CLI flags change the watch folder, port, and consolidation interval.\n\n```\npython agent.py --watch ./docs --port 9000 --consolidate-every 15\n```\n\n**Key Takeaways**\n\n**No vector DB, no embeddings**— an LLM reads, thinks, and writes structured memory into SQLite.** Runs 24/7**on Google ADK + Gemini 3.1 Flash-Lite as a lightweight background process.** Three sub-agents**under one orchestrator: Ingest, Consolidate, and Query.** Consolidates every 30 minutes**— links related memories and writes new insights while idle.** Ingests 27 file types**across text, images, audio, video, and PDFs, dropped into`./inbox`\n\n.\n\nCheck out the ** FULL CODES here. **Also, feel free to follow us on\n\n**and don’t forget to join our**[Twitter](https://x.com/intent/follow?screen_name=marktechpost)\n\n**and Subscribe to**\n\n[150k+ML SubReddit](https://www.reddit.com/r/machinelearningnews/)**. Wait! are you on telegram?**\n\n[our Newsletter](https://www.aidevsignals.com/)\n\n[now you can join us on telegram as well.](https://t.me/machinelearningresearchnews)Need to partner with us for promoting your GitHub Repo OR Hugging Face Page OR Product Release OR Webinar etc.? [Connect with us](https://forms.gle/wbash1wF6efRj8G58)\n\nMichal Sutter is a data science professional with a Master of Science in Data Science from the University of Padova. With a solid foundation in statistical analysis, machine learning, and data engineering, Michal excels at transforming complex datasets into actionable insights.", "url": "https://wpnews.pro/news/google-clouds-always-on-memory-agent-replaces-rag-and-embeddings-with-continuous", "canonical_source": "https://www.marktechpost.com/2026/07/18/google-clouds-always-on-memory-agent-replaces-rag-and-embeddings-with-continuous-llm-consolidation-on-gemini-3-1-flash-lite/", "published_at": "2026-07-18 07:57:51+00:00", "updated_at": "2026-07-18 08:03:11.780736+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "ai-products", "ai-tools", "ai-infrastructure"], "entities": ["Google Cloud", "Gemini 3.1 Flash-Lite", "Google ADK", "SQLite"], "alternates": {"html": "https://wpnews.pro/news/google-clouds-always-on-memory-agent-replaces-rag-and-embeddings-with-continuous", "markdown": "https://wpnews.pro/news/google-clouds-always-on-memory-agent-replaces-rag-and-embeddings-with-continuous.md", "text": "https://wpnews.pro/news/google-clouds-always-on-memory-agent-replaces-rag-and-embeddings-with-continuous.txt", "jsonld": "https://wpnews.pro/news/google-clouds-always-on-memory-agent-replaces-rag-and-embeddings-with-continuous.jsonld"}}