An AI agent that starts empty and writes its own tools. Three files, two dependencies, one shell.
You talk to it. It builds what it needs - tools, memory, new behaviors - by editing its own source code and system prompt. Everything reloads every turn. No restart, no plugins, no config files.
export ANTHROPIC_API_KEY=sk-...
bun install
bun grow
On first run you'll pick a model. Config saves to .spore/config.json - delete it to reconfigure.
| Command | Description |
|---|---|
bun grow |
Start spore (dangerous commands require approval) |
bun wild |
Start spore with no approval prompts |
bun rollback |
Restore source files from last snapshot |
bun reset |
Wipe all local state and start over |
Spore ships with a system prompt that says "you are spore, you evolve" and a single shell tool. That's it.
Every turn, it re-reads its own prompt and tools from disk. So when it edits those files - which it can, through the shell - the changes take effect immediately. It can:
- Rewrite its personality - edit
.spore/prompt.md(live) - Create new tools - drop
.tsfiles in.spore/tools/(live) - Modify its own runtime - edit
src/(takes effect on restart) - Remember across sessions - memories are saved automatically on exit
Tools are .ts files in .spore/tools/ that export a SporeTool:
import { z } from "zod";
import type { SporeTool } from "../../src/types";
export default {
name: "my_tool",
description: "what it does",
schema: z.object({ arg: z.string() }),
execute: async ({ arg }) => { return "result"; }
} satisfies SporeTool;Spore can create these itself. Ask it to.
Spore is a self-modifying agent with a real shell. There is no sandbox. It can do anything your user account can do.
Best-effort guardrails (not a security boundary):
- Destructive-looking commands (
rm,sudo,curl | sh, package installs, etc.) prompt for approval - Commands referencing paths outside the project root prompt for approval
bun wildskips all prompts - use in disposable environments- Environment variables matching common secret patterns are stripped from the shell
- Source files are snapshotted on startup -
bun rollbackto restore
Run this in an environment you're comfortable losing.
Beyond the conversation itself, spore makes 1-2 small API calls on exit to extract and prune memories. These use Haiku regardless of your conversation model.
Model creation lives in src/brain.ts via createClient(). Swap it for any Anthropic SDK-compatible client.
MIT
