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 from Inky | Justin Tsugranes | Justin Tsugranes
Xinf
Building an AI Story App: Architecture and Lessons from Inky
←Posts

Building & Operating

Building an AI Story App: Architecture and Lessons from Inky

A look inside the architecture of Inky. I'm sharing what I learned the hard way about building an AI story app using agentic engineering and a multi-product studio model.

Justin Tsugranes·May 27, 2026·4 min read
On this page
  1. The System Behind the Story
  2. Agentic Engineering vs. Prompt Wrappers
  3. Lessons Learned the Hard Way
  4. State Management and Generative UI
  5. Cost Control and Context Windows
  6. The Solo Operator’s Stack
  7. Shipping Today

I am currently building Inky, an AI-driven storytelling platform. This isn't a project born from a desire to chase a trend; it is a component of a larger multi-product studio where AI functions as the operating layer. When you are building an ai story app, the challenge isn't getting the model to output text. The challenge is architecting a system that maintains narrative coherence, manages state across long contexts, and remains cost-effective.

I’ve spent the last several months working in public on this, and I’ve learned the hard way that the distance between a prompt and a product is wider than most realize. Here is the architecture and the logic behind the decisions I’m shipping today.

The System Behind the Story

Most people approach building an ai story app as a linear sequence: user inputs a prompt, the LLM generates a story, and the user reads it. This is a wrapper, not a product. Inky is designed as a system of feedback loops.

In my studio, I use a custom agent orchestration layer I call VERA. For Inky, VERA doesn't just call an API; it manages a fleet of specialized agents. One agent handles world-building and lore consistency. Another focuses on character arc progression. A third acts as a critic, reviewing the output for pacing and tone before the user ever sees a word.

By treating the application as a collection of agents rather than a single chat interface, you move from simple generation to agentic engineering. This allows the system to handle complex tasks—like remembering a character's eye color from three chapters ago—without blowing out the context window or the budget.

Agentic Engineering vs. Prompt Wrappers

When you are building an ai story app, you quickly realize that LLMs are prone to 'narrative drift.' They lose the thread. To solve this, I moved away from the 'one big prompt' strategy.

Instead, the architecture relies on a structured data layer that sits between the user and the model. We use a PostgreSQL database to store a 'World State.' Before any story generation occurs, the system queries the current state—characters, locations, inventory, and past events. This context is then injected into the agent's instructions.

This is agentic engineering in practice. The AI isn't just writing; it's interacting with a structured environment. It’s the difference between a writer staring at a blank page and a writer working from a detailed series bible. The latter is how you build a durable product.

Keep reading

Related posts

All posts→
Building an AI Story App: Architecture and Lessons from Inky
May 19, 2026

Building an AI Story App: Architecture and Lessons from Inky

A look inside the architecture of Inky, a multi-agent storytelling system. No hype, just the systems and lessons learned from shipping agentic engineering.

AIArchitectureInkyAgentic Engineering

Lessons Learned the Hard Way

I don’t believe in hiding the friction. Building Inky has been a series of technical trade-offs.

State Management and Generative UI

One of the biggest hurdles was state management. In a traditional CRUD app, state is predictable. In a generative app, the UI needs to react to streaming data that might change the underlying data model in real-time. I learned the hard way that trying to sync the frontend and backend using standard REST patterns leads to a fragmented user experience.

I shifted to a more robust event-driven architecture. When an agent updates the story, it emits an event that the frontend consumes to update the Generative UI. This ensures that the visuals—maps, character cards, and inventory lists—stay in sync with the narrative as it's being streamed.

Cost Control and Context Windows

If you aren't careful, the cost of building an ai story app will kill your margins before you scale. High-end models like Claude 3.5 Sonnet or GPT-4o are excellent for creative writing, but using them for every minor task is a waste of capital.

I implemented a tiered model strategy. I use smaller, faster models for 'utility' tasks—like summarizing a previous chapter or extracting entities—and reserve the heavy-duty models for the actual prose generation. This keeps the latency low and the profit margins healthy. In a studio model, profit comes before vanity metrics.

The Solo Operator’s Stack

I run this studio as a solo operator, which means my architecture must be my force multiplier. I don't have a team of engineers; I have a system.

  • Monorepo Architecture: Everything lives in one place. It allows me to share types between the agent layer and the frontend, reducing the surface area for bugs.
  • AI as the Team: I use Claude Code and custom MCP servers to handle the repetitive parts of the build—infrastructure as code, monitoring setups, and basic component scaffolding.
  • Vercel AI SDK: This has been the backbone for handling the streaming primitives and tool-calling logic. It’s a tool, not a crutch.

Shipping Today

The goal of Inky isn't just to tell stories; it's to prove that a single builder can ship complex, high-fidelity software by leveraging AI as an operating layer. We are moving past the era of 'just a developer' and into the era of the system architect.

Building an ai story app is a lesson in constraints. You have to balance the randomness of creativity with the rigidity of software. If you can bridge that gap, you have something more than a tool—you have an engine.

If you are building your own systems and want to see the specific frameworks I use to manage this studio, the free Studio Launch Checklist covers the foundational pieces I use every day.

Happy to talk.

Justin Tsugranes

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.

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.

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#Agentic Engineering#Shipping

On this page

  1. The System Behind the Story
  2. Agentic Engineering vs. Prompt Wrappers
  3. Lessons Learned the Hard Way
  4. State Management and Generative UI
  5. Cost Control and Context Windows
  6. The Solo Operator’s Stack
  7. Shipping Today
Building an AI Story App: Architecture and Lessons from Inky
Jun 3, 2026

Building an AI Story App: Architecture and Lessons from Inky

A look inside the architecture of Inky. No hype, just the systems and agentic engineering used to ship a multi-modal storytelling platform as a solo operator.

AIArchitectureInkyEngineering
Building an AI Story App: Architecture and Lessons from Inky
May 21, 2026

Building an AI Story App: Architecture and Lessons from Inky

A look inside the architecture of Inky. I’m sharing how I’m building an AI story app using agentic engineering and a multi-product studio mindset.

AIArchitectureEngineeringInky