2026

Self-Improving Content Agent

A production-grade content agent that generates, evaluates, and self-improves short-form social posts. Every LLM and tool step is traced, scored against evals, and written back to a memory it reads from on the next run.

A multi-step agent that runs the content pipeline end to end: recall past lessons, generate the posts, validate, evaluate, render, and (only on approval) schedule and measure. It's built as a harness of small composable tools and discrete LLM calls rather than one mega-prompt, so every stage emits a structured artifact and can be observed, tested, and swapped on its own. The agent writes a schema-validated JSON spec per post, which renders to slides through a design system plus headless Chrome (and ffmpeg for reels), with AI imagery generated via Higgsfield.

The system is built to get better over time. Every LLM and tool step, from generation and image gen to rendering, evals, and analytics, is traced span by span to JSONL (latency, tokens, cost, parent/child structure, inputs and outputs), viewable in a local CLI or exported to LangSmith. Each post is graded by deterministic code checks and an LLM-as-judge on a different model than the generator, then a reflection step distills the results into reusable strategies in a persistent memory store that the next run recalls before it generates. A dashboard pulls live performance from the connected accounts, segmented by format and channel: the real-world signal the loop folds back in.

The focus here is the engineering, not the content: deterministic orchestration, schema-validated outputs, first-class observability, an evaluation harness with a bias-controlled judge, a distilled memory layer, and human approval gated on the one irreversible step, publishing. It's plain, dependency-free Node, so each layer is easy to read, test, and port. These are the same patterns I reach for to ship reliable AI agents in production.

AI AgentsEvalsTracingMemoryNode