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 how I’m building an AI story app using agentic engineering and a multi-product studio mindset.

Justin Tsugranes·May 21, 2026·4 min read
On this page
  1. The Architecture of Narrative State
  2. Moving Beyond the Prompt
  3. The Stack and the Studio Mindset
  4. Lessons Learned the Hard Way
  5. Working in Public

I am shipping today. Specifically, I am shipping the core narrative engine for Inky, an AI-driven storytelling application.

When you start building an ai story app, you quickly realize that the challenge isn't the prompt. Anyone can write a prompt that says, "Write a story about a dragon." The challenge is the system—the architecture that manages state, maintains character consistency, and handles narrative branching without the whole thing collapsing into a hallucinated mess.

I run a multi-product studio where AI is the team. Inky is a product of that environment. It isn't just a wrapper; it is a demonstration of how agentic engineering changes the way we think about software architecture.

The Architecture of Narrative State

The core challenge of building an ai story app is state management. LLMs are stateless by nature. If you ask an LLM to continue a story, it only knows what is in the current context window. As the story grows, the context window fills up. Eventually, the model forgets that the protagonist lost their sword in chapter two.

I learned the hard way that you cannot rely on the model's memory. You have to build an external brain.

In Inky, I use a structured narrative database. Every character, location, and plot point is an object with its own metadata. When a user interacts with the story, the system doesn't just send the last few paragraphs to the LLM. It queries the database, retrieves the relevant state, and injects it into the context. This is the difference between a toy and a product.

Moving Beyond the Prompt

Most people building in this space spend their time on prompt engineering. I spend my time on agentic engineering.

In my studio, I use a custom orchestration layer I built called VERA. For Inky, VERA manages a fleet of specialized agents. One agent is the Architect—it handles the high-level plot structure. Another is the Chronicler—it updates the world state after every turn. A third is the Prose Stylist—it ensures the tone remains consistent.

By decoupling these concerns, the system becomes more predictable. If the prose starts getting repetitive, I don't have to rewrite a 2,000-word prompt. I just tune the Prose Stylist.

The Stack and the Studio Mindset

I am an architect of systems, not an author of one stack. For Inky, the choice of tools was driven by the need for speed and durability.

I use a monorepo structure because I am a solo operator running a studio. I need to move between the frontend, the backend, and the agent orchestration layer without friction. The stack includes:

  • Claude API and Gemini: I use different models for different agents based on their strengths in reasoning versus creative writing.
  • PostgreSQL with pgvector: Essential for storing narrative state and performing semantic searches on past story events.
  • Custom Agent Orchestration: This is the glue that allows the agents to talk to the database and each other.

Building an ai story app in 2026 means recognizing that the code is often the easiest part. The hard part is the feedback loops. I’ve spent more time designing the monitoring systems—watching how agents interact and where they diverge—than I have writing UI components.

Keep reading

Related posts

All posts→
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

Lessons Learned the Hard Way

Shipping Inky has taught me a few things about the current state of AI development.

First, latency is the enemy of immersion. If a user has to wait fifteen seconds for a story beat, the magic dies. I had to architect a streaming pipeline that delivers the first few sentences of prose while the Chronicler agent is still updating the world state in the background.

Second, cost scales faster than you think. Agentic engineering is expensive. Every user interaction triggers multiple calls to high-end models. I had to implement a tiered caching system to ensure that we aren't re-processing the same narrative logic every time a user refreshes their screen.

Third, the "AI as the team" model requires a different kind of debugging. You aren't just looking for syntax errors; you're looking for logic drift. I built a dashboard that visualizes the "narrative health" of a story—flagging when the agents' internal state starts to contradict the generated prose.

Working in Public

I am building an ai story app because I want to see how far we can push the medium of interactive fiction. But more than that, I am building it to refine the operating system of my studio.

Every lesson learned on Inky—every failed agent handoff, every database bottleneck—gets folded back into the studio's playbook. This is how I build. I don't aim for scale first; I aim for craft and durability.

If you are building in this space, stop looking for the perfect prompt. Start looking at your system architecture. The value isn't in the model; it's in the way you orchestrate the work.

I am continuing to ship updates to Inky and the VERA orchestration layer. If you are interested in the specifics of the agentic workflows or the narrative state schema, I am happy to talk.

Full implementation details and the architectural patterns I use are available in The Builder's Playbook — totalventures.io/resources/builders-playbook

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#Engineering#Inky

On this page

  1. The Architecture of Narrative State
  2. Moving Beyond the Prompt
  3. The Stack and the Studio Mindset
  4. Lessons Learned the Hard Way
  5. Working in Public
Building an AI Story App: A Systems Engineering Approach
Jun 4, 2026

Building an AI Story App: A Systems Engineering Approach

Stop building wrappers. Learn the architectural patterns for building an AI story app that maintains continuity and depth using agentic engineering and state management.

AIEngineeringInkySystems Architecture
Building an AI Story App: Architecture and Lessons from Inky
May 27, 2026

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.

AIArchitectureInkyAgentic Engineering