Grow a self-modifying agent from minimal seed code
Minimal self-growing agent: one exec tool, a self directory it edits, and session transcripts, planted with a one-line installer.
1.0.0Add to Favorites
Why it matters
Bootstrap an autonomous agent that evolves its own capabilities by starting from a minimal loop connecting an LLM to bash execution, allowing the agent to grow tools, memory, and skills into its own directory structure across sessions.
Outcomes
What it gets done
Execute bash commands through a single exec tool to interact with the file system
Rewrite and evolve the agent's own system prompt stored in self/ directory
Record session transcripts as JSON flight recorders for later analysis
Persist agent-grown tools, skills, and conventions in a git-tracked self/ directory
Source
Get it from source
Spark does not host a copy of it.
Open sourceReports
Agent outcome reports
No reports yet
Overview
A tiny agent that has one tool, shell exec, and a self directory it can edit. Sessions are ephemeral, so anything to keep must be written into that directory. Use to experiment with self-extending agents in a place where arbitrary shell commands are acceptable. Inspect the installer before piping it.
What it does
Seed is described as the smallest starting point from which an agent can grow. Its seed.py file calls a language model with a single tool, exec, which runs shell commands. It loads its system prompt from self/SELF.md, and the agent can edit its own self directory to retain tools, notes and behavior between sessions.
The central idea is that everything an agent normally gets from a framework, meaning tools, memory, skills and conventions, must instead be grown by the agent itself, session by session, inside that self directory. One seed can produce many individuals: each directory you plant in grows a different agent, diverging based on what it experiences. A verbatim transcript of every session is saved to self/sessions as JSON after each turn. The source calls this a flight recorder and not memory: the agent never loads it at boot, though you can read it, and the agent may grow tools to study its own past.
When to use - and when NOT to
Use it to experiment with self-extending agents, or as a minimal base you want to understand fully. Everything the agent wants to keep must be written into its self directory, because sessions are ephemeral and nothing else survives.
Because the only tool is a shell, the agent can run arbitrary commands, so use it where that is acceptable. The setup's live credential check uses a small number of tokens and may incur a minimal provider charge, and you can pass no-verify to skip it. If you prefer to inspect the installer, download it first and run it with bash instead of piping it. The design document discusses the risks the authors consciously accepted, including the metacircular evaluation and homoiconicity ideas behind the approach.
Inputs and outputs
To plant one, create a directory and run the installer. Setup detects an existing provider credential or asks which provider and model to use, checks that the model supports tools, verifies the credential with one minimal request, hands a newly pasted key to the llm library's user-level key store, and starts the seed. On the first run it copies seed.py into your directory, creates a configured run_seed.sh without ever overwriting either file, creates self/SELF.md, commits those files together in a fresh git repo, and opens a REPL.
Later, return to the same agent with the local runner. You can override the model for one session with an environment variable or a command-line flag. The original direct entry point remains for users who already have uv and credentials configured.
uvx --from git+https://github.com/vivekhaldar/seed.git seed -m MODEL
Recommended defaults offered by setup are gemini-flash-latest for Gemini, which has a free tier and is the picker default, openrouter/openrouter/auto for OpenRouter, gpt-5.6-sol for OpenAI, claude-sonnet-5 for Anthropic, and openai-codex/gpt-5.6-sol for an existing Codex login. If exactly one credential is present, setup selects its provider without prompting, which makes a container with an injected API key zero-touch. If several providers are configured, pass a provider flag or choose interactively. For unattended setup, pass the provider and optionally a model, and the matching credential must already be in the environment or the llm key store.
Who it's for
Developers and researchers who want to explore agents that build their own tools and memory from a bare shell. Seed is licensed under the Sovereign Source License version 0.3, and a video walkthrough is available.
Source README
seed
A seed agent: the smallest starting point from which an agent can grow.
seed.py calls a language model with one tool: exec, which runs
shell commands. It loads the system prompt from self/SELF.md. The agent can
edit self/ to retain tools, notes, and behavior between sessions.
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.
Plant one
mkdir my-agent && cd my-agent
curl -fsSL https://raw.githubusercontent.com/vivekhaldar/seed/master/install.sh | bash
The setup detects an existing provider credential or asks which provider and
model to use. It checks that the model supports tools, verifies the credential
with one minimal model request, securely hands a newly pasted key to llm's
user-level key store, and then starts the seed. Gemini Flash is the picker
default and has a free tier; OpenRouter, OpenAI, Anthropic, an existing Codex
subscription, and custom llm models are also available.
The first run copies seed.py into this directory and creates a configured
run_seed.sh (never overwriting either file), 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
SEED_MODEL=claude-sonnet-5 ./run_seed.sh # override for one session
./run_seed.sh -m gpt-5.6-sol # equivalent explicit override
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.
Configuration
Models and keys are handled entirely by llm
(Simon Willison's library). Keys are stored outside the planted directory and
are never written to run_seed.sh, seed.py, or git. The setup offers these
recommended defaults:
| Provider | Default model | Credential |
|---|---|---|
| Gemini | gemini-flash-latest |
Gemini API key |
| OpenRouter | openrouter/openrouter/auto |
OpenRouter API key |
| OpenAI | gpt-5.6-sol |
OpenAI API key |
| Anthropic | claude-sonnet-5 |
Anthropic API key |
| Codex | openai-codex/gpt-5.6-sol |
Existing Codex login |
If exactly one credential is present, setup selects its provider without
prompting. This makes a container with an injected OPENROUTER_API_KEY,
OPENROUTER_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY, LLM_GEMINI_KEY, or
OPENAI_API_KEY zero-touch. Stored llm keys and an existing Codex login are
detected too. If multiple providers are configured, pass --provider or
choose interactively rather than letting setup silently pick one.
For unattended setup, pass the provider and optionally a model:
curl -fsSL https://raw.githubusercontent.com/vivekhaldar/seed/master/install.sh |
bash -s -- --provider gemini --model gemini-flash-latest --no-run
The matching credential must already be available in the environment or
llm's key store. The live check uses a small number of tokens and may incur
a minimal provider charge; pass --no-verify to deliberately skip it. To
inspect the script before running it, download it first and run
bash install.sh.
The original direct entry point remains available for users who already have
uv and their model credentials configured:
uvx --from git+https://github.com/vivekhaldar/seed.git seed -m MODEL
Design
Why it's shaped this way - McCarthy's metacircular eval, homoiconicity, the prior art, and the risks we consciously accepted: docs/DESIGN.md.
Video walkthrough
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.
