Shprout: a 23-line self-referential bash coding agent
Shprout is a minimal 23-line bash script that acts as a self-referential LLM coding agent — it reads its own source code as its prompt, then loops by asking an LLM for bash commands, evaluating them, and feeding the output back into context.
Score breakdown
Explore Shprout as a reference for how minimal an agentic coding loop can be — its `eval`-based architecture distills the observe-act-remember cycle to its bare essentials, useful for understanding or prototyping agent scaffolding without framework overhead.
- 01Shprout is a 23-line bash script that functions as a self-referential LLM coding agent.
- 02The script reads its own source code and uses it as the LLM prompt — the script is literally its own prompt.
- 03It operates in a loop: the LLM produces a bash command, the script runs it with `eval`, captures stdout, and feeds the result back into context.
Shprout is a radically minimal LLM coding agent implemented in 23 lines of bash. Rather than relying on a framework or orchestration layer, it bootstraps itself through self-reference: the script reads its own source code and injects it as the prompt sent to the LLM, effectively making the agent's "identity" its own implementation. The loop is straightforward — the model speaks bash, the script evaluates whatever command the model returns using `eval`, captures stdout via `tee /dev/stderr`, and appends both the command and its output back into the growing prompt context before the next iteration.
It carries an MIT license and, at the time of publication, had 5 stars and 1 fork on GitHub.
The project is hosted under the pollinations GitHub organization and lists two contributors, including one named "Claude." It depends only on `curl` and `jq`, and is configured entirely through environment variables (`KEY`, `MODEL`, and `API`). The repository includes a sandbox script and example outputs. It carries an MIT license and, at the time of publication, had 5 stars and 1 fork on GitHub.
Key facts
- 01Shprout is a 23-line bash script that functions as a self-referential LLM coding agent.
- 02The script reads its own source code and uses it as the LLM prompt — the script is literally its own prompt.
- 03It operates in a loop: the LLM produces a bash command, the script runs it with `eval`, captures stdout, and feeds the result back into context.
- 04Requires only `curl` and `jq`; configured via `KEY`, `MODEL`, and `API` environment variables.
- 05Published under the MIT license by the pollinations GitHub organization.
- 06The repository had 5 stars and 1 fork at time of publication.