██ ██ █████ ████ █████ ██ ████ ██ ██ ████ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██ ██ ██ ██
██▀▀██ ████ ██████ ██ ██ ██ ██ ██ ██▀███ ██ ███ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ▀██ ██ ██ ██ ██
██ ██ █████ ██ ██ █████ █████ ████ ██ ██ █████ ██
Headlong is an open source agent microharness, a complete agent harness with a core of about 10K lines of Bash. Headlong's defining feature is persistent agency. Your agent keeps thinking between external interactions in a self-guided loop inspired by human inner monologue. A message from a human doesn't start a session. It lands in the agent's thought stream as one more observation, and the agent decides if and when to respond. You give your agent a name and a personality, and it sets its own interests and priorities, starts its own projects, and pings you when it has something to say.
A Headlong agent is also built to be shared. A whole team can talk to one agent over Slack, Telegram, and a chat app, and every conversation lands in the agent's single stream of thoughts. The agent follows what different people are working on, connects them, and pings whoever seems most relevant. Sharing one agent is fun, because it behaves more like a person than a service.
At the heart of Headlong is shellm, a Bash implementation of a
recursive language model (RLM).
The agent thinks by writing shell commands, running them, and reading the
output. No tool system besides Bash is needed.
Get started
One line installs everything, interviews you to bring a Headlong agent to life, and opens a dashboard where you can watch its mind run:
curl -fsSL https://headlong.ai/install.sh | bash
You'll need bash 3.2+, git, curl, jq, and an LLM API key (Anthropic, OpenAI, Gemini, or OpenRouter); the dashboard also needs uv and bun or node, and the installer offers to fetch those.
Headlong is alpha research software. Use a dedicated, spend-capped key, because your agent runs real shell commands and thinks around the clock. With Docker running, the installer offers to keep the whole agent in a container, or to install on your machine with the agent's commands sandboxed in a container (an unsandboxed host install exists too, behind an explicit yes, and is not recommended). Without Docker the commands would run directly on your machine as you, so the installer stops and asks for an explicit yes before setting that up. How much the background thinking costs depends on how quickly the agent loops and which model backs it. The rate of thinking backs off exponentially when nobody is talking to the agent and resets the moment a message arrives. At the settings we run our agent with, it comes to $1 to $2 an hour.
The agent's name becomes a command:
ada hello # one message, wait for the reply
ada # chat
ada stop / ada start # pause / resume its mind
ada dash # open the dashboard
ada bugreport # bundle logs + trajectory (keys scrubbed) for a bug report
headlong-killall stops every Headlong process on the machine if you need a
panic button. curl -fsSL https://headlong.ai/status.sh | bash shows what is
installed and running; curl -fsSL https://headlong.ai/uninstall.sh | bash
removes it all (details in
docs/install.md).
The container flow the installer offers is this, and you can also run it yourself:
docker run -it --name headlong --restart unless-stopped -p 8080:8080 buildpack-deps:curl \
bash -c 'curl -fsSL https://headlong.ai/install.sh | bash; exec bash'
Details, no