A minimalistic AI coding agent in 62 lines of bash, curl and jq A developer tutorial published on dev.to and GitHub under the repository antonum/bash-harness shows how to build an AI coding agent harness in 62 lines of bash, curl and jq, working with any OpenAI-compatible endpoint that supports tool calling, including local models. The walkthrough is split into three numbered scripts: 01-LLM-Call.sh makes one raw curl call to a chat completions endpoint, 02-Chat.sh turns call_llm into a function with the conversation held as a JSON array and a read/call/print loop, and 03-Harness.sh adds a bash tool so the model can request commands that the harness runs and feeds back until the model answers. The tutorial warns that 03-Harness.sh executes whatever the model asks with the user's permissions and no confirmation, and notes that tetris.py is the output step 03 produced when asked to "write a tetris game in python, make sure it runs"; the code is MIT licensed and requires an OpenRouter API key or another OpenAI-compatible endpoint with tool calling. A tutorial on building an agentic harness in nothing but bash , curl and jq . Each numbered script adds one idea on top of the previous one. The full walkthrough is in ARTICLE.md https://github.com/antonum/bash-harness/blob/main/ARTICLE.md or on dev.to https://dev.to/antonum/minimalistic-ai-harness-in-62-lines-of-bash-script-170m . Works with any OpenAI-compatible endpoint that supports tool calling, including local models. - A terminal with bash , curl and jq - An OpenRouter https://openrouter.ai API key, or any other OpenAI-compatible endpoint with tool calling Setup: put OPENROUTER API KEY=sk-or-... in .env . | Step | File | Adds | |---|---|---| | 01 | 01-LLM-Call.sh | One raw curl call to a chat completions endpoint. | | 02 | 02-Chat.sh | call llm as a function, the conversation as a JSON array, and a read/call/print loop. | | 03 | 03-Harness.sh | A bash tool: the model asks to run commands, the harness runs them and feeds results back until the model answers. | Run any step with bash 0N-....sh . tetris.py is what step 03 produced when asked to "write a tetris game in python, make sure it runs". Try it with python3 tetris.py . 03-Harness.sh runs whatever the model asks for, with your permissions and no confirmation. It is a tutorial. Read the commands as they scroll by and don't run it in a directory you care about. MIT, see LICENSE https://github.com/antonum/bash-harness/blob/main/LICENSE .