种子:最小化、自修改的智能体框架
Seed: Minimal, self-modifying agent harness

原始链接: https://github.com/vivekhaldar/seed

“种子智能体”(seed agent)是一种极简主义的AI开发方法,它摒弃了传统的框架,转而采用一种有机的进化模型。它不提供预构建的环境,仅提供一个 `seed.py` 文件——一个将大语言模型(LLM)连接到 Bash 执行工具的简单循环。 初始化时,智能体会创建一个专用目录(`self/`),作为其记忆、技能和工具的基础。由于会话是短暂的,智能体必须通过向该目录写入文件来主动“生长”其能力,该目录充当了持久化的个人历史记录。每一次交互都会被记录为脚本,使智能体有可能开发出用于分析自身过去的工具。 通过将智能体的存在视为一个由 Git 跟踪的进程,每个“种子”都会根据其特定的经历和用户交互演变成一个独特的个体。该智能体基于 Simon Willison 的 `llm` 库构建,支持多种模型(OpenAI、Anthropic、Gemini、OpenRouter),其设计理念植根于元循环评估和简洁性。你无需继承预定义的框架,而是从零开始,白手起家地培养一个智能体。

Hacker News 最新 | 往日 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 Seed: 极简的、自修改的智能体(Agent)框架 (github.com/vivekhaldar) 5 分 | 由 gandalfgeek 发布于 2 小时前 | 隐藏 | 往日 | 收藏 | 讨论 | 帮助 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

A seed agent: the smallest starting point from which an agent can grow.

There is no framework here. The entire frozen layer is seed.py — a small loop that connects a language model to exactly one tool (exec, which runs bash) and loads its system prompt from a file the agent itself owns and may rewrite. Everything an agent normally gets from a framework — tools, memory, skills, conventions — must instead be grown by the agent, session by session, into its self/ directory.

mkdir my-agent && cd my-agent
uvx --from git+https://github.com/vivekhaldar/seed.git seed

First run copies seed.py and run_seed.sh into this directory (never overwriting a file that already exists), germinates self/SELF.md, and commits those files together in a fresh git repo here — the loop is part of this individual's history, not only self/. Then it drops you into a REPL. Start talking. Everything the agent wants to keep must be written into self/ — sessions are ephemeral and nothing else survives.

Come back to the same agent with the local runner — no need to uvx again:

./run_seed.sh
./run_seed.sh -m gemini-2.5-pro

A verbatim transcript of every session is recorded to self/sessions/*.json (updated after each turn). This is a flight recorder, not memory: the agent never loads it at boot, but you can read it — and the agent may grow tools to study its own past.

One seed, many individuals: each directory you plant in grows a different agent, diverging based on what it experiences.

Models and keys are handled entirely by llm (Simon Willison's library). The default model is openai-codex/gpt-5.6-sol, which uses the ChatGPT login from the Codex CLI:

codex login                      # one-time, per machine
./run_seed.sh                    # uses openai-codex/gpt-5.6-sol
./run_seed.sh -m gemini-2.5-pro  # or override it for one session

Bundled providers: OpenAI via a Codex subscription or API key, Anthropic, Gemini, and OpenRouter (one OpenRouter key unlocks hundreds of models).

Why it's shaped this way — McCarthy's metacircular eval, homoiconicity, the prior art, and the risks we consciously accepted: docs/DESIGN.md.

联系我们 contact @ memedata.com