我构建了一个免费的、基于 Git 的 AI 代理记忆层——原因与方法

📄 中文摘要

在使用 AI 代理时,用户面临的一个主要问题是每次会话中代理对用户的偏好和项目一无所知。现有的记忆解决方案存在付费 API、数据存储在服务器上以及单一模型锁定等问题,无法满足用户需求。因此,作者开发了 agent-soul,这是一个基于 Git 的记忆框架,具有免费、私密和兼容任何大型语言模型(LLM)的特点。该框架将每个记忆存储为附加的 JSON 事件,保存在私人 GitHub 仓库中,并通过 GitHub Actions 在每次推送时运行 Python 编译器,处理这些事件并输出干净的 Markdown 文件。每次代理会话开始时,代理会读取这些文件以获取用户的记忆信息。

📄 English Summary

I Built a Free, Git-Native Memory Layer for AI Agents — Here's Why and How

The main issue faced by users of AI agents is that each session starts with the agent being unaware of the user's preferences and projects. Existing memory solutions suffer from problems such as paid APIs, data being stored on servers, and single-model lock-in, which do not meet user needs. In response, the author developed agent-soul, a Git-native memory framework that is free, private, and compatible with any large language model (LLM). This framework stores each memory as an append-only JSON event in a private GitHub repository, and a Python compiler runs via GitHub Actions on every push to process these events and output clean markdown files. At the start of each agent session, the agent reads these files to access the user's memory information.

Powered by Cloudflare Workers + Payload CMS + Claude 3.5

数据源: OpenAI, Google AI, DeepMind, AWS ML Blog, HuggingFace 等