Featherweight is a Tcl AI agent harness . It sits somewhere between a demo and a practical AI programming tool. It has been used to develop itself from the beginning, bootstrapping from a human-written core. The development history is on GitHub .
Featherweight is a single-file Tcl/Tk application of approximately 3800 SLOC that allows a large language model (LLM) available over a standard API to develop software. It requires Tcl 8.6 or 9, Tk, Tcllib, and curl version 8 or later for making network requests. SQLite with FTS5 is recommended to allow the model to search the transcript; FTS5 is enabled by default in recent versions of SQLite 3.
The user of Featherweight makes requests to the model through the Tk GUI. In order to fulfill the request, the model manipulates files and executes ephemeral Tcl code using tool calls . (Compare this to a human developer with eltclsh as their shell.)
The default configuration uses models through OpenRouter and requires an OpenRouter key in the environment variable OPENROUTER_API_KEY.
The idea behind the project was to bootstrap an AI harness. At the start of the project, dbohdan wrote a small core. Once the core worked, the harness "developed itself": models built it through its own tools.
Featherweight makes HTTP requests via curl (because of a possible truncation problem with http, tls, and an HTTP proxy). This means you only see completed AI turns, not those that are in progress. The model's reasoning for the turn can be viewed after it's completed.
Featherweight borrows some design ideas and tool descriptions from Strument , a larger AI programming tool by the same developer.
Contents
First, you will need an OpenRouter account with some credits in it or an AI inference subscription compatible with the Chat Completions API.
To use OpenRouter, generate a dedicated key for Featherweight. It is a good idea to limit maximum spend to something like $10. You can increase the limit later or have it reset weekly or monthly.
Put the key in the environment variable OPENROUTER_API_KEY. Start Featherweight where you have code to edit. Add featherweight/ to your .gitignore file or .fossil-settings/ignore-glob.
Warning: An expensive model uses up your funds quickly. Featherweight has been tested with MiMo-V2.6-Flash, which is the recommended model for new users.
No.
You can sandbox Featherweight using Landrun on Linux. Strument by the same developer is security-conscious.
Direct download: featherweight.tcl . For the commit history and a test suite, go to dbohdan/featherweight on GitHub.
(Attempts to paste the thousands of lines of source code were blocked by Cloudflare.)
dbohdan 2026-11-21: Inspired by a Hacker News discussion of agents on legacy systesm, I got Featherweight running on Windows XP SP3. I used my 2016 repack of Magicsplat Tcl/Tk for Windows 8.6.6 for Windows XP and Vista and a 2017 build of curl with certificates .
Featherweight was developed against curl 8 and didn't work with 7.53.1. MiMo-V2.6-Flash, running in the harness on modern Linux with Wine for curl.exe, found that the necessary change was minimal and only touched --write-out:
--- featherweight.tcl
+++ featherweight.tcl
@@ -2794,7 +2794,8 @@
--request POST \
--show-error \
--silent \
- --write-out "\n%{http_code} %{exitcode} %{errormsg}" \
+ --write-out "\n%{http_code} 0" \
[dictScreenshots:
The encoding bug visible in the screenshots has been fixed.