显示HN:Agent Kernel – 三个Markdown文件让任何AI代理具有状态。
Show HN: Agent Kernel – Three Markdown files that make any AI agent stateful

原始链接: https://github.com/oguzbilgic/agent-kernel

## 代理内核:简单、有状态的 AI 代理 代理内核提供了一种非常简单的方式来构建持久的 AI 代理,只需三个 markdown 文件和一个 Git 仓库,无需复杂的框架或数据库。它适用于流行的 AI 编码代理,如 OpenCode、Claude 和 Codex。 流程很简单:克隆仓库,选择你的代理(例如 `opencode`),并定义其身份。然后,代理通过两个关键目录管理其自身的记忆:`knowledge/` 用于当前事实(状态),`notes/` 用于会话日志(叙述)。 该系统利用现有的代理指令文件(如 `AGENTS.md`)来教导代理*如何*记忆,从而在会话之间创建有状态的体验。每个代理都生活在自己的仓库中,允许存在多个独立的代理——一个“家庭实验室代理”、一个“投资代理”等——所有都在相同的核心系统上运行。该项目是开源的(MIT 许可证),并且可在 GitHub 上轻松获取。

Hacker News 新闻 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 Show HN: Agent Kernel – 三个 Markdown 文件让任何 AI 代理具有状态 (github.com/oguzbilgic) 8 分,来自 obilgic 2 小时前 | 隐藏 | 过去 | 收藏 | 1 条评论 帮助 aiboost 56 分钟前 | 下一个 [–] 文本文件 + Git > 向量数据库。不错的工作。 我很想知道这如何扩展。随着 notes/ 目录在几周或几个月内增长,读取过去的每日日志会消耗上下文窗口。回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

The easiest way to create an AI agent. Clone, start, talk.

Your agent remembers between sessions, takes notes, and builds on past work. No framework, no database — just three markdown files and a git repo.

Works with any AI coding agent: OpenCode, Claude Code, Codex, Cursor, Windsurf, etc.

git clone https://github.com/oguzbilgic/agent-kernel.git my-agent
cd my-agent

Start your agent:

opencode     # or claude, codex, cursor, etc.

That's it. The agent reads the kernel, realizes it's new, asks who you want it to be. You tell it. It remembers.

AGENTS.md          ← kernel (generic, don't edit)
IDENTITY.md        ← who this agent is (agent maintains)
KNOWLEDGE.md       ← index of knowledge files (agent maintains)
knowledge/         ← facts about the world (mutable)
notes/             ← daily session logs (append-only)

Two kinds of memory:

  • knowledge/ — State. Facts about how things are right now. The agent updates these when reality changes.
  • notes/ — Narrative. What happened each session — decisions, actions, open items. Append-only. Never modified after the day ends.

AI agents already read AGENTS.md (or CLAUDE.md, .cursorrules, etc.) as project instructions. This kernel uses that mechanism to teach the agent how to remember.

The agent doesn't need a database, a vector store, or a custom framework. It just needs:

  • A file that says "you are stateful, here's how"
  • A git repo to store memory in
  • Plain markdown files

Each agent is its own repo. To create another:

git clone https://github.com/oguzbilgic/agent-kernel.git another-agent
cd another-agent
opencode     # or claude, codex, etc.

Same kernel, different identity, different knowledge. You can have a homelab agent, an investing agent, a health agent — all running the same OS.

MIT

联系我们 contact @ memedata.com