大多数 AI 代理会遗忘。它们处理请求后给出答案,然后丢掉上下文。Google Cloud 的生成式 AI 仓库现在提供了一个直接解决这一问题的示例。它就是 Always-On Memory Agent:https://github.com/GoogleCloudPlatform/generative-ai/tree/main/gemini/agents/always-on-memory-agent,一个将记忆视为持续运行进程的参考实现。
需要与我们合作推广你的 GitHub 仓库或 Hugging Face 页面或产品发布或网络研讨会等?请联系:https://forms.gle/wbash1wF6efRj8G58
Michal Sutter 是一名数据科学专业人士,拥有帕多瓦大学数据科学硕士学位。凭借在统计分析、机器学习和数据工程方面的坚实基础,Michal 擅长将复杂数据集转化为可执行的见解。
构建一个代理式活动场地运营商 [完整代码]:https://pxllnk.co/twdn5
谢谢!我们的团队会很快联系你
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.
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.
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.
Beyond text, the IngestAgent accepts 27 file types across five categories. Simply drop any supported file into the ./inbox folder for automatic pickup.
To clarify the difference, it frames three common memory approaches. Each solves part of the problem, yet leaves a gap.
Unlike RAG, this agent processes memory actively, not only on retrieval.
Practically, the pattern fits any workload needing durable, evolving context. Consider three examples.
With the design clear, setup stays minimal for early-level engineers. Install dependencies, set your key, then start the process.
Once running, the agent watches ./inbox , consolidates every 30 minutes, and serves an HTTP API on port 8888. Therefore, you can also feed it over HTTP.
Additionally, the API exposes /status , /memories , /consolidate , /delete , and /clear . An optional Streamlit dashboard adds ingest, query, browse, and delete controls. CLI flags change the watch folder, port, and consolidation interval.
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
Michal 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.
Build an Agentic Event Venue Operator [Full Codes]:https://pxllnk.co/twdn5