ludLLM
portfolio / LudLLM
// an agentic writing engine

LudLLM.

An agentic pipeline that writes a full-length spy novel end to end. You give it a paragraph of premise and a secret spine; it returns a grounded world, a cast with private belief states, a structure, an outline, and roughly forty chapters of prose. A human approves the plan one stage at a time. The models generate.

Alpha V2 book cover

LudLLM takes a premise (a paragraph) and a secret spine (who hides what, and when the reader should learn it versus when the protagonist does) and expands it, stage by stage, into a complete novel. The core trick is keeping two things apart: what is true in the story, and what each character believes. That gap, held steady across a whole book, is the entire engine of suspense in a spy novel.

The book is stored as data first and words second: one validated state object is the single source of truth, and the prose is a generated view of it. Setup runs as a gated chain (world, cast, structure, outline); a critic from a different model family scores each stage; then a chapter loop drafts, critiques, and extracts belief updates as it writes. I have driven four complete books through it. Two are published here as samples.

Models: Claude (Opus) drafts and authors, Claude (Haiku) extracts, Gemini critiques. The critic is always a different family than the author. A full setup costs a few cents to under a dollar; a full book is roughly ten to forty dollars of generation. Public code: github.com/devsandip/ludLLM.

The architecture

The full write-up covers the stage chain, the single-file state, the no-leak machinery, the cross-family critic, the temporal spine, and the interactive story-graph studio, with the tables and screenshots.

How a few sentences become a novel
The stages, the state object, the secret-keeping guardrails, and the story-graph studio. The complete architecture, with diagrams and tables.
Read it
// disclaimer Pure fan fiction. These stories bear no similarity to the yet-to-be-released movie. They borrow known elements from the YRF Spy Universe movies but build on those with their own unique stories. I have no idea what the plot of the upcoming movie is.

The two novels

I ran the same premise through the pipeline twice and kept both results. They share a protagonist (Sita, codename Alpha, a deniable assassin raised by her handler) and a question (what does the truth cost her), and they diverge on one deliberate decision about who the enemy is. Open either to read the full plot and play with its interactive story graph.

Both novels end on earned, unresolved notes. The engine that wrote them is open source.

// palette