Problem
Posting consistently on a professional channel eats time and drifts off-voice. Naive “let an LLM write it” output is generic, repeats angles you’ve already used, and posts itself with no one in the loop.
Approach
An autonomous agent built as a state machine: a research node pulls fresh angles from the web, a draft node writes the post, a critique node scores the draft 1–5, and a conditional edge loops back to revise (up to twice) until the score clears the bar — then it stops and hands off to a human to approve or edit before anything publishes. Past posts are persisted so the agent doesn’t repeat itself.
Stack
Python and LangGraph — a StateGraph wiring research → draft → critique → revise → human-review — with Claude for drafting and self-critique, Tavily for web research, LangSmith for tracing, and a pytest suite that mocks the model calls.
What shipped
A working agent with the full critique–revise–interrupt loop and test coverage. The human-in-the-loop gate (LangGraph’s interrupt()) means nothing goes out unreviewed.
What’s next
Generalize beyond a single content domain and add a small scheduler so approved drafts queue instead of needing a live session.