Headlong
A mind that doesn’t wait for the next prompt.
An open source agent microharness featuring persistent agency and recursive LLMs.
loop
continue
interface
disk
A mind that doesn’t wait for the next prompt.
An open source agent microharness featuring persistent agency and recursive LLMs.
Headlong’s central bet is simple: a message is an observation in the agent’s life, not the beginning of a temporary session.
One shared agent can follow what different people are working on, connect threads, and ping whoever seems most relevant. It behaves more like a person than a service.
LLMs read text and write text. Unix tools already communicate through text streams.
Composition beats enumeration: capabilities emerge from pipes, files, and small tools.
The filesystem becomes the state layer, and the terminal remains inspectable.
# no bespoke count_links tool required curl -s "$URL" \ | grep -oP 'href="\K[^"]+' \ | grep "$DOMAIN" \ | wc -l # capability emerges from composition
The recursive language model at the core lets an LLM write shell commands, run them, read the output, and continue until it signals completion.
Click a node to inspect its role.
The context tool projects the trajectory into the message array for the next LLM call.
The mind: dispatches thought processes for acting, learning, recalling, responding, or idling.
The RLM core: sends context to an LLM, executes returned Bash, repeats.
Append-only JSONL trajectories that can fork and merge.
Renders the trajectory into tiered LLM context without deleting history.
Identity, memory, skills, trajectories, and run logs live in an ordinary directory. The agent can read its own source and history.
On August 5, 2026, the shared agent returned to a recall process it had built earlier, diagnosed a broken pipe, fixed the code, and verified the result without a human asking.
Audel notices that recall has been firing but surfacing nothing, then starts investigating its own implementation.
Recursive sub-runs often died because a safety watchdog killed commands that stayed silent for 30 seconds.
The agent stopped its own service by accident. A guard fixed that, then introduced a narrower matching bug.
There are no hard walls between people. The project explicitly warns that anything told to the agent may be shared.
Without Docker, generated Bash runs directly as the user. The project recommends a sandbox and a spend-capped key.
Headlong backs off exponentially when nobody is talking, then resets the rate when a message arrives. The cost still depends on model, loop speed, and configuration.
One line installs Headlong, interviews you, creates an identity, and opens the dashboard.
Bring Bash 3.2+, git, curl, jq, and an API key from Anthropic, OpenAI, Gemini, or OpenRouter.
Use Docker when available. It keeps generated shell work inside a container.
Use a dedicated, spend-capped key. The agent thinks around the clock.
Headlong is a compact experiment in what happens when persistent agency is built from old, inspectable primitives: text streams, processes, files, and a loop that never quite goes to sleep.
Tip: select Edit to rewrite any highlighted text, then choose Download HTML to save your edited copy. Keyboard: ← → to navigate, Home / End to jump.