Projects / Autonomous Substack Editor
NIA
An open-source editorial system that researches topics, writes and checks articles and Notes, publishes through a signed-in browser, and runs a configurable Substack community on schedule.
The source, setup guide and architecture maps are public. Account sessions, API keys, runtime data and the operator's style corpus stay local.
Film chapters1:32
01
An editor, not a text generator
NIA is an autonomous editor for Substack. It discovers material through RSS and Atom feeds, YouTube and web search; keeps a persistent idea bank; researches sources; writes articles and Notes; checks the result; and publishes through a signed-in browser. It can also handle replies, comments, likes, restacks, follows and free subscriptions on a schedule.
The distinction matters. A single generated post is an output. NIA is the system around that output: source selection, editorial judgement, memory, publication, community work, health checks and the cost of every model call.
02
The first version did not work
The first version had 71,598 lines of Python, 2,817 tests, 236 database triggers and 42 schema migrations. It produced two articles. It kept falling over on its own infrastructure — task queues, persistent intents, leases, model qualifications — none of which had anything to do with writing.
The second version began with a budget, not a feature list.
first version
lines of Python71,598
.py files200+
schema migrations42
database triggers236
Result: two articles.
second version
lines of Python6,526
.py files10
schema migrations0
database triggers0
Result: an account that runs every day.
The limits were written down before any code, and were not negotiable while building. Same scope, eleven times less of it.
NIA grew out of that rebuild. It is a larger system today, but it still keeps its runtime state in four SQLite tables.
03
Two pipelines, with different jobs
The daily pipeline runs five times a day. Its blocks are isolated, so a failed comment does not take Notes or replies down with it. The daily volume is drawn from configured ranges and the gaps between actions vary by action type.
The article pipeline runs weekly. It scouts candidates, tests feasibility, discovers and fetches sources, extracts evidence, decides whether there is a real gap worth writing about, drafts the article, reviews it against the evidence and runs deterministic form and fact checks before publication.
Community activity keeps the account alive. Research is what gives it something worth saying.
04
The working path
The architecture has one visible direction and one return path. Every published action passes through the browser layer; everything learned from a run returns to the same local state.
state → next run · memory, budget and measured cost
05
The public machine, measured
main branch ·
- runtime modules
- 24
- prompt files
- 25
- model roles
- 26
- free tests
- 186
- paid tests, excluded from CI
- 9
- SQLite tables
- 4
A dated repository snapshot. NIA is under active development.
The large modules keep their reasoning beside the code. The comments record what was measured and why a limit exists. Generated function and identity maps make the repository inspectable without pretending that a static diagram can stay current by itself.
account ·
- subscribers, from 2 on 7 September
- 17
- followers, from 0
- 12
- successful publications since 7 September
- 491
- sign-ups attributed to Notes, of 19 in 30 days
- 11
- model cost, 7–25 September
- $18.08
- model cost per day, last full week
- $0.49
Read from the server's own log and database. Model calls only: no server cost and no owner's time.
The growth is real and still small in absolute numbers. Of the 19 sign-ups Substack attributes to a source over the last thirty days, 11 came through Notes — and eight of those eleven trace back to five of NIA's restacks with commentary.
06
Autonomy with an owner
The operator chooses the subject, source mix, voice, allowed community actions, model assignments, schedules and spending limits. Configuration lives in one TOML file, while the secrets, signed-in session and runtime database remain on the operator's own machine or Linux server.
A monthly spending ceiling is the hard stop. The control panel is available in English and Polish and exposes schedule, health, budgets and model cost. After configuration the system can run unattended, but the editorial direction remains explicit and replaceable.
07
Built in public, running in public
The code is published under the MIT licence with installation, architecture and troubleshooting documentation. The repository is the reproducible system; the NIA profile on Substack is the visible result of that system operating outside a demo.
Read the source, inspect the maps or run a publication with a different beat: nia-substack-agent on GitHub.
08
Still not solved
The state on 25 September 2026, from the same server log and database as the account snapshot above.
- More activity has not meant more growth. In the last full week NIA made 222 publications — comments, restacks, Notes, replies and one article — and the account gained four subscribers. The data argues for choosing topics and conversations better, not for publishing more.
- Promotion does not carry readers to the articles. Nine Notes promoting articles reached 159 views and produced five clicks.
- The most frequent activity is the least measured. At least half of the comments get a response, but their measurements stopped on 16 September: the measurement queue serves NIA's own posts first and gives comments only what is left of a fixed limit. Until that changes, I cannot tell which comment brought what.