Part 3

From Working Demo to Useful Product

Follow the decisions that separate an impressive demo from a dependable product: interaction loops, context budgets, memory, permissions, multi-agent collaboration, and recovery when the model loses the thread.

37 notesOpen reading · no login
Part 337notes

THE QUESTION THIS PAGE ANSWERS

ANSWER FIRST

What will the “From Working Demo to Useful Product” AI learning path help you do?

Follow the decisions that separate an impressive demo from a dependable product: interaction loops, context budgets, memory, permissions, multi-agent collaboration, and recovery when the model loses the thread. The path contains 37 free notes, each centered on one question you can understand and test.

DECISION RULE

Core themes include Opening, AI Image Generation, Agent Loop, Context Management.

TRY NEXT

Begin with “Where This Chapter Comes From: Building the example system,” then choose the next note by the task in front of you.

WATCH FOR

Do not optimize for finishing the list. Explaining one trade-off with your own example matters more than opening more titles.

What this route helps you practice

Open the first note

Each chapter follows a class of real decisions. Follow the sequence, or enter at the problem you are solving today.

37notes
01Where This Chapter Comes From: Building the example systemThis chapter distills the author's experience building the example system, an AI Agent desktop app: ~500,000 lines of code, 132 tools, and 8 modules mapping one-to-one to this chapter's 8 sectionsIntro5 min02Text-to-Image vs Image-to-Image: Two Different ThingsOne starts from text, the other from an image. PMs must know when to use whichConcept3 min03Using AI to Write Prompts for AIUser says "draw a cat at sunset," but the image model needs an entirely different description — the fix is using an LLM as translatorHands-on3 min04Character Consistency: The Hardest Product ProblemThe same IP looks different every time. Why it's hard and how to think about it as a PMCase Study3 min05Models Go Down — Then What?Multi-model fallback chain logic: priorities, allowlists, health checks, graceful degradation when all failHands-on4 min06Image Generation Productization ChecklistWhat's still missing between "API works" and "users can use it" — one checklist to see it allSystem Design3 min07Textbook 3 Steps vs Real-World N StepsReAct isn't just Think-Act-Observe three steps; what else each iteration must do in productionConcept3 min08Why Agents Get StuckTypical failure patterns when loops hang in real scenarios, and what users seeCase Study4 min09Fool-Proofing: Making Loops Stop ThemselvesThree strategy categories — caps, detection, fallback — and where PMs should draw the lineHands-on4 min10Streaming UX: Don't Leave Users WaitingTools run 30 seconds in the background — what should users see? Designing progress perceptionInteractive3 min11The Real Cost Behind One MessageOne user message may trigger 10+ loop iterations and dozens of API messages — building cost awarenessDeep Dive3 min12Longer = More Expensive + Less SmartRising cost + attention decay + limited window — three reasons context must be managedConcept3 min13Compression Is an Art of Trade-offsSome things can be removed, some can't, some cost money to compress — a PM decision frameworkHands-on3 min14Can You Delete What Users Said?The "sacred artifact" problem: AI output can be compressed, but the user's original words are gone once deletedConcept3 min15Local Compression vs LLM CompressionZero-cost fast-but-rough vs paid slow-but-precise — when to use whichDeep Dive4 min16Context ≠ MemoryThe whiteboard (context window) vs the notebook (long-term memory) — why two systems are neededConcept3 min17What's Worth RememberingNot every conversation has value: the gatekeeper mindset and filtering logicHands-on3 min18Memory Conflicts: What If Users Change Their Mind?Four strategies for old-vs-new memory conflicts: add / merge / flag conflict / skipCase Study3 min19The Cost of Memory InjectionStored 1,000 memories — inject all every time, or retrieve on demand? The cost of each approachDeep Dive3 min20System Prompt Isn't a Blob of TextWhy layered management is necessary: identity, environment, and tool instructions — each independent, non-interferingArchitecture4 min21Don't Show AI What It Doesn't Need100 tools all in system? Token explosion. This calls for on-demand loading designHands-on3 min22Skill: Operationalizable Prompt ModulesFiles as config, version-trackable — managing Prompts like codeHands-on4 min23The Subtle Relationship Between Prompts and CachingChange one character in System Prompt and the entire KV Cache is invalidated. Minimizing accidental costDeep Dive3 min24When Do You Need Multiple Agents?Parallel acceleration, role separation, risk isolation — three real-world scenariosConcept4 min25The Price of Concurrency: What Can Run Simultaneously?"Read" can be parallel, "write" must queue — why, and how to decideHands-on3 min26Brainstorming: Making Multiple AIs DebateSame problem, multiple perspectives independently, then aggregate consensus and disagreement — the AI version of collective intelligenceInteractive3 min27Scheduled Tasks: A Cost TrapAgent runs tasks on a schedule — accumulate context or rebuild? One choice, 10× cost differenceAnti-pattern3 min28How Much Freedom Should AI Have?Fully autonomous vs step-by-step approval — five permission modes and their use casesConcept3 min29Too Many Popups Annoy Users, None Is UnsafeThe Human-in-the-loop balance point: a risk-tier approachHands-on3 min30Do You Know What the Agent Did?Event streams and Token tracking. Without logs, you'll never know what went wrongArchitecture3 min31MCP Isn't Just "Calling Tools"Same protocol, two directions: consuming others' tools vs exposing your ownConcept3 min32Lazy Connections: Don't Connect If Not Needed10 MCP services registered — connect them all at startup, or wait until needed?Hands-on3 min33AI Adds Its Own ToolsAn Agent discovers it needs a new tool at runtime and configures MCP connections itself — the self-configuration approachDeep Dive3 min34Practice OverviewImage generation, loops, memory, Prompt, multi-Agent, security, MCP — all connected in one diagramRecap3 min35Chat Wrapper vs Real Agent ProductThe same loop powers N scenarios — the difference isn't in code, it's in product decisionsFinale3 min36Wire Up the First Real ToolA four-step demo of the tool-calling loop; three tasks: pick a tool, write a three-line description, run the loop and deliberately break it onceHands-on6 min37Practice · From Demo to Product · 30 Tough QuestionsEach with intent, framework, and bonus points: demo-to-launch gap / Agent deadlock / context compression / memory design / multi-Agent / MCP / cost accountingQuiz18 min