Skip to main content

Loading…

Skip to main content
HomeProjectsPostsContact
Justin Tsugranes LogoJustin Tsugranes Logo

Justin Tsugranes

HomeProjectsPostsContact

Stay in the loop

Occasional notes on what I'm building, lessons earned, and the studio behind it.

By subscribing, you agree to receive No spam. Unsubscribe in one click anytime. from Justin Tsugranes. No spam. Unsubscribe anytime. Privacy Policy

© 2026 Total Ventures LLC. All rights reserved.

Privacy PolicyTerms of ServiceCookie Policy
Building an AI Story App: Architecture and Lessons Learned | Justin Tsugranes | Justin Tsugranes
Xinf

Building an AI Story App: Architecture and Lessons Learned

A technical deep dive into the systems architecture of Inky. No hype, just the reality of shipping agentic engineering and managing narrative state at scale.

Justin Tsugranes·May 30, 2026·4 min read
On this page
  1. The Architecture of Narrative
  2. Agentic Engineering: The VERA Layer
  3. The Stack and the Monorepo
  4. Latency vs. Quality Tradeoffs
  5. Lessons Learned the Hard Way
  6. Shipping Today

I’ve spent the last few months working in public on Inky. It is a multi-product studio project designed to solve a specific problem: AI-generated long-form fiction usually sucks. Most people think the solution is a better prompt. They are wrong. The solution is a better system.

Building an ai story app isn't about finding a magic string of text to send to Claude. It is about architecting a multi-agent system that can maintain state, character consistency, and narrative arc across 50,000 words without hallucinating. I am building this using agentic engineering—treating AI as the operating layer of the team rather than just a code-completion tool.

The Architecture of Narrative

When you are building an ai story app, you realize quickly that prose is the easy part. LLMs are excellent at generating a single scene. They are terrible at remembering that a character lost their keys in chapter two when they reach the front door in chapter twelve.

To solve this, I moved away from the 'one-shot' generation model. Inky operates on a decoupled architecture. The system is split into three distinct layers: the Planner, the Chronicler, and the Editor.

  1. The Planner: This agent doesn't write a single word of prose. Its only job is to maintain the 'Story Bible'—a structured JSON object containing character traits, plot beats, and world-building constraints.
  2. The Chronicler: This agent receives a specific beat from the Planner and the relevant context from the Story Bible. It generates the raw prose.
  3. The Editor: This agent reviews the output against the Story Bible to ensure no continuity errors were introduced.

By separating these concerns, I’ve reduced narrative drift by roughly 70%. The system no longer 'forgets' who is in the room because the context is injected programmatically, not left to the model's fading memory.

Agentic Engineering: The VERA Layer

I run my studio using a custom agent orchestration layer I call VERA. For Inky, VERA manages the handoffs between the Planner and the Chronicler. This isn't a simple sequential chain. It is a feedback loop.

If the Chronicler decides, in the flow of writing, that a character should make a choice not originally in the outline, it sends a request back to the Planner to update the Story Bible. This allows for 'emergent storytelling' while maintaining a rigid system of record.

The Stack and the Monorepo

I build everything in a monorepo. As a solo operator running a multi-product studio, I don't have time to manage dependencies across ten different repositories. Inky shares a core logic library with my other products, which handles authentication, billing, and my MCP (Model Context Protocol) servers.

I use Claude 3.5 Sonnet for the heavy lifting of narrative generation because of its superior grasp of subtext. However, I use Gemini 1.5 Pro for long-context retrieval. When the Story Bible grows to 200,000 tokens, Gemini’s needle-in-a-haystack performance is the only thing that keeps the system from breaking.

Latency vs. Quality Tradeoffs

I learned the hard way that users will wait for quality, but they won't wait forever. A full chapter generation can take 45 seconds because of the multi-agent verification loop. I had to build a streaming status indicator that shows the user exactly what the agents are doing: 'Planner is updating the character arc,' 'Chronicler is drafting scene 2,' etc.

This transparency isn't just a UI trick; it’s a necessity when you are shipping agentic engineering. It builds trust in the system's 'thinking' process.

Recommended$79

The Builder’s Playbook

How I run a multi-brand studio with AI agents — the systems, not the hype.

  • •The agent-augmented operating model
  • •Real workflows you can copy
  • •From idea to shipped, repeatably
Get the playbook →
If this resonated

The studio is where the rest of it lives.

Total Ventures is the umbrella — the products, the resources, the strategy session.

Studio Notes

How I’m building the studio.

The operator’s log — systems, decisions, and what’s working.

JT

Written by

Justin Tsugranes

Founder, Total Ventures

Solo-founder building a multi-brand product studio with AI agents. Writing about building, operating, and shipping.

ShareXLinkedInFacebook
#ai#architecture#inky#shipping

On this page

  1. The Architecture of Narrative
  2. Agentic Engineering: The VERA Layer
  3. The Stack and the Monorepo
  4. Latency vs. Quality Tradeoffs
  5. Lessons Learned the Hard Way
  6. Shipping Today

Keep reading

Related posts

All posts→
Building an AI Story App: Lessons from Shipping Inky
Jun 7, 2026

Building an AI Story App: Lessons from Shipping Inky

I am building Inky, an AI storytelling app. Here is the architecture, the failures, and the systems required to ship a generative product that actually works.

aiarchitectureinkyshipping

Lessons Learned the Hard Way

Building an ai story app taught me that token management is actually state management. Early on, I was passing the entire story history into every prompt. This was expensive and noisy.

Now, I use a RAG (Retrieval-Augmented Generation) approach for the story's past. The system searches the previous chapters for relevant keywords and only injects the necessary snippets into the current prompt. This shaved 30% off my API costs and significantly improved the focus of the generated prose.

Another lesson: Don't let the AI write the ending first. If the model knows the conclusion, it tends to rush the middle. I now programmatically gate the 'Ending' beat until the 'Climax' beat has been successfully validated by the Editor agent.

Shipping Today

Inky is currently in a closed beta. I am not interested in the hype cycle or 'disrupting' the publishing industry. I am interested in building a tool that works for people who actually write.

If you are building an ai story app, my advice is to stop focusing on the model and start focusing on the data structure. The model is just the engine; the system is the car.

I am happy to talk about the specifics of this architecture or how I use MCP servers to bridge the gap between my local environment and the LLM.

If you want to see the full implementation of how I structure these agentic loops, the Builder's Playbook covers the exact patterns I'm using in Inky.

Full implementation in The Builder's Playbook — totalventures.io/resources/builders-playbook

totalventures.io
  • Resources

    Launch Checklist + the Builder’s Playbook bundle.

  • Strategy session

    A focused hour on your repo, stack, and monetization.

  • The brands

    The portfolio of products I’m building, end to end.

Building an AI Story App: Lessons from the Studio Floor
Jun 6, 2026

Building an AI Story App: Lessons from the Studio Floor

Inside the architecture of Inky. A look at agentic engineering, narrative coherence, and the lessons learned the hard way while building an ai story app.

aiarchitectureagentic-engineeringinky
Building an AI Story App: Systems Over Prompts
Jun 2, 2026

Building an AI Story App: Systems Over Prompts

Stop building wrappers. Here is how I architected Inky, a multi-agent storytelling engine, using agentic engineering and a profit-first mindset.

aiarchitectureagentic-engineeringinky