# "Pi Coding Agent Observability: HTML Specs with Gemini 3.5 Flash and GPT Image 2"
<!--
ref: @content/youtube/indy-dev-dan/pi-coding-agent-observability-html-specs-with-gemini-3-5-flash-and-gpt-image-2
tags: [agent observability, specs, HTML specs, visual specs, Gemini 3.5 Flash, tokenomics, product agents]
version: 2
updated_at: 2026-11-22T13:42:48.514Z
-->

**[Watch on YouTube](https://www.youtube.com/watch?v=o4KZH_KSqYQ)**

# Pi Coding Agent Observability: HTML Specs with Gemini 3.5 Flash and GPT Image 2

*Synthesized from IndyDevDan, 2026-06-01.*

IndyDevDan presents solo, demonstrating a Pi agent observability dashboard and using it to compare markdown, HTML and visual (image-enhanced) specs run through Gemini 3.5 Flash agents.

## Core Thesis
IndyDevDan argues that you cannot improve agents you do not measure, and that the real decision between spec formats is the trade-off among performance, speed and cost. His position is that more useful tokens beat fewer, which is why he now plans with images and sometimes HTML, while using observability as the first step before turning comparisons into evals.

## Key Insights
- The observability design is simple: agents stream every event, turn and tool call to a central server that stores them in a database, and a UI reads them. He ships it as a single Pi extension (Pi Observability) that captures all agents.
- Three planning agents ran the same prompt with a markdown spec, an HTML spec, and an enhanced "V spec" with generated images. Turn counts were 25 (HTML plan), 17 and 29 (markdown), and the markdown agent surprisingly used more tokens and about 170 events versus 100 for HTML. He treats this as possible variance, and says the proper next step is an eval run repeatedly.
- The dashboard has swim-lane, single, and race views, and the start event reveals the full system prompt, loaded tools and skills; he points out that loading many skills bloats the system prompt.
- Demo product agent "Steel Man": given a bull thesis (Apple as an underappreciated AI distribution winner), it builds the bear case with generative UI components and cited research. Its run was 79 events over about a minute with roughly 40 references, and it found Mac Mini under 2% of Apple's revenue. He says default agents are sycophantic, so a counter-positional agent is valuable.
- HTML specs add mocked-up UI components and interactive proofs of concept at the cost of tokens; markdown remains best for preserving tokens and text-focused work. His images cost roughly one to three dollars total, which the observability tool did not capture.
- He defends Gemini 3.5 Flash as near state of the art and thinks in cost per intelligence rather than cost per token; for high-volume product agents he says to use Flash or DeepSeek V4 Pro if the results hold.
- The two constraints of agentic engineering are planning and reviewing; visual specs help the planning side.
- Agentic value chain: use more tokens, generate value from them, then capture revenue ("arbitrage" the tokens).

## Actionable Takeaways
1. Stream agent events to a server and UI before comparing prompts, models or spec formats.
2. Inspect the real system prompt and tool list of each agent, especially after templating or adding skills.
3. Compare spec types (markdown, HTML, HTML plus images) on turns, tokens, cost and speed, then run the comparison as a repeated eval.
4. Instruct the build prompt to read any images embedded in the plan.
5. For high-volume product agents, test whether a cheaper, faster model still calls the right tools.

## Notable Quotes
> "If you don't measure, you won't improve." — IndyDevDan

> "Agents of today are very sycophantic, right? So, they're going to by nature, by default, tell you what you want to hear." — IndyDevDan

---

*Related: `@content/youtube/langchain/how-credit-genie-debugs-thousands-of-agent-traces-with-langsmith` · `@content/youtube/langchain/how-toyota-uses-deep-agents-to-speed-up-r-d-and-manufacturing-research` · `@content/youtube/cole-medin/deepseek-just-built-the-next-generation-of-coding-agents` · `@content/youtube/langchain/inside-toyotas-manufacturing-ai-langchain-langsmith-and-six-figure-roi` · `@content/youtube/langchain/how-madrigal-pharmaceuticals-cut-time-to-production-from-12-weeks-to-2-with-langchain-langsmith`*

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*