YouTube2Text

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

by IndyDevDan · 5,139 words · 757 segments · language en · Watch on YouTube

Full transcript

  1. 0:00What's up, engineers? Andy DevDayn here.
  2. 0:02So, you're planning a new feature for
  3. 0:03your product. The first question is,
  4. 0:05what type of spec should you use? You
  5. 0:07remember the viral post on the
  6. 0:09unreasonable effectiveness of HTML put
  7. 0:11out by Anthropic engineers, and you
  8. 0:13remember that OpenAI released a
  9. 0:15benchmark-gapping image model that
  10. 0:18generates near-perfect images. So, what
  11. 0:21should you use? Markdown specs, HTML
  12. 0:23specs, or something else entirely? The
  13. 0:26answer here is the same as it's always
  14. 0:28been. More useful tokens outperform
  15. 0:31fewer useful tokens. The keyword here is
  16. 0:33useful. As you and I build more
  17. 0:36engineering agents and product agents,
  18. 0:38the question isn't just what's better.
  19. 0:41The question is, what's the trade-off
  20. 0:43between performance, speed, and cost of
  21. 0:46this agentic solution? I've got three
  22. 0:49Gemini 3.5 flash Pi coding agents and a
  23. 0:52Pi observability dashboard that can help
  24. 0:55us answer that very question. We're
  25. 0:58going to test three unique specs,
  26. 1:00markdown, HTML, and an enhanced HTML
  27. 1:03version. And here, this is going to
  28. 1:05enable us to measure the trade-off
  29. 1:08triangle of three different spec types
  30. 1:10with the exact same prompt. You can see
  31. 1:13our agents getting to work here. Every
  32. 1:15event, every turn, every tool call is
  33. 1:18coming in with every single agent. Here,
  34. 1:20we can see everything. We can observe
  35. 1:22everything. And that means we can
  36. 1:23improve everything. I've been
  37. 1:25engineering for over 15 years now, and
  38. 1:27some rules of engineering never change.
  39. 1:30This is one of them. If you don't
  40. 1:31measure, you won't improve. In this
  41. 1:34video, we measure the trade-off triangle
  42. 1:36of these three different types of specs
  43. 1:38using Pi agent observability.
  44. 1:46Agent observability is simple, and this
  45. 1:48application is just as simple. You have
  46. 1:50a centralized server that you stream
  47. 1:52events to. You have a UI that reads
  48. 1:54those events, and then you, the
  49. 1:56engineer, the developer, can intake the
  50. 1:58information, creating a closed-loop
  51. 2:00structure where you can then improve not
  52. 2:02just your engineering agents in the
  53. 2:04terminal and in your software factory,
  54. 2:07but also your out-loop products.
  55. 2:10Observability is essential for
  56. 2:12understanding the performance, speed,
  57. 2:14and cost tradeoffs for both your
  58. 2:16engineering work, but especially your
  59. 2:18out-the-loop products, right? Your
  60. 2:20product agents. Our two agents have
  61. 2:22already completed their work, and you
  62. 2:24can see the associated cost with that.
  63. 2:26Surprisingly, our markdown agent has
  64. 2:28used more tokens than our HTML agent.
  65. 2:32And our HTML agent has used a little bit
  66. 2:33more context. This may be variants
  67. 2:35within the model, but it could also be
  68. 2:38how the specs were written themselves.
  69. 2:40Our markdown agent used a total of 29
  70. 2:42turns, so it could just be that the
  71. 2:44markdown agent did a much better job of
  72. 2:46understanding the codebase. This is one
  73. 2:48of those things where if you don't
  74. 2:50actually look at what your agents are
  75. 2:51doing, you'll never know the key
  76. 2:53differences between any prompt that
  77. 2:55you're writing. The plan agent looks
  78. 2:57like it just finished here. This is our
  79. 2:58V plan agent. This is our HTML plan
  80. 3:00agent. Here's our markdown planning
  81. 3:02agent. This agent used 25 turns, HTML
  82. 3:05agent used 17, and this one used 29. So,
  83. 3:08what exactly did our agents just plan
  84. 3:10out? They each created their own spec,
  85. 3:12and so they're working on this
  86. 3:13application called Steel Man. Let's go
  87. 3:15ahead and just open this up. So, this is
  88. 3:17where we dig into our product agent.
  89. 3:19Classic engineering agents where you're
  90. 3:21in the terminal or you're building your
  91. 3:22software factory, your ADW, so on and so
  92. 3:24forth. These are great. You and I as
  93. 3:26engineers, we're going to be using these
  94. 3:27a lot, but the next kind of very
  95. 3:29important agent that you and I are
  96. 3:30building is our product-focused agent.
  97. 3:33We're going to present a bull thesis for
  98. 3:35some company, for some stock. Here,
  99. 3:37we're talking about Apple as an
  100. 3:38underappreciated AI distribution winner,
  101. 3:41and this agent is going to do everything
  102. 3:42it can to counter this, right? It's
  103. 3:44going to give me the bear thesis of
  104. 3:46everything. So, we're going to start the
  105. 3:47Steel Man agent here. It's going to
  106. 3:48generate a bunch of UI that aids its
  107. 3:51bear case argument. The whole idea here
  108. 3:53is to strengthen your thesis as to
  109. 3:55whether you should invest, you shouldn't
  110. 3:57invest. It's really here to poke holes
  111. 3:59in what you think is right or what you
  112. 4:01think is wrong. Agents of today are very
  113. 4:04sycophantic, right? So, they're going to
  114. 4:06by nature, by default, tell you what you
  115. 4:08want to hear. Some of the great
  116. 4:09engineering models are a little better
  117. 4:11at this. By default, these agents want
  118. 4:13you to be happy with the results, so
  119. 4:15they lean into everything that you're
  120. 4:16saying. Here's our executive summary
  121. 4:18coming in here on why we shouldn't bet
  122. 4:20on Apple as a AI distribution leader.
  123. 4:22Great response here. We have generative
  124. 4:24UI components that were generated here
  125. 4:26on the left. Back to our engineering
  126. 4:28agents, what are these actually doing?
  127. 4:30These are going to create three new
  128. 4:32generative AI components for us to use,
  129. 4:34right? So, a quote, a catalyst timeline,
  130. 4:36and a valuation gauge. They're going to
  131. 4:38add that to our existing set. So, this
  132. 4:40is our table, bar chart that our agents
  133. 4:42can populate arbitrarily with any
  134. 4:44information. We have scorecards here,
  135. 4:46and then we have raw HTML. And the whole
  136. 4:49point here, again, is to steel man the
  137. 4:51opposite side of whatever you are
  138. 4:53saying. Our startup prompt here, you
  139. 4:55know, we said Apple is an unappreciated
  140. 4:57AI distribution winner. We asked, you
  141. 4:59know, how valuable was that Mac Mini
  142. 5:01claw trend to Apple? And then it's
  143. 5:03breaking it all down here. You know, we
  144. 5:04can dig into that specific clause here,
  145. 5:06deconstructing the open claw or claw
  146. 5:08trend. This was confirmed, however, the
  147. 5:10financial and strategic value of this to
  148. 5:13Apple must be heavily qualified. Very
  149. 5:15interesting here. Mac Mini represents
  150. 5:17less than 2% of Apple's total corporate
  151. 5:19revenue. Not a huge impact, right? Not
  152. 5:21as big as you might think. There's some
  153. 5:24irony to this, which the agent points
  154. 5:26out. A lot of people miss this in
  155. 5:28betting on Apple. The claw trend proves
  156. 5:30that developers want a decentralized
  157. 5:32local open source AI that operates
  158. 5:34independently from anyone, right? Just
  159. 5:36because Apple's delivering this doesn't
  160. 5:38mean that selling this cheap, low-margin
  161. 5:40silicon box is going to be good for
  162. 5:41Apple over the long term, right? It's a
  163. 5:43one-time purchase. What Apple is looking
  164. 5:45for is like repeat revenue, right? And
  165. 5:46any company is looking for that repeat
  166. 5:48revenue. But anyway, we have a decent
  167. 5:49tool, 40 references, so it didn't just
  168. 5:51make this stuff up out of its ass. It
  169. 5:53really did research via tool calling,
  170. 5:55and then it made references and put
  171. 5:57together a proper bear thesis for us,
  172. 5:59okay? So, I built this just to really
  173. 6:01showcase the idea. Well, first off cuz
  174. 6:03this is actually valuable, but second
  175. 6:05off because I wanted to showcase this
  176. 6:06idea of a product-focused agent. If we
  177. 6:09hop back to our agent observability, we
  178. 6:11can see that our steel man agent has
  179. 6:13executed, okay? So, can see everything
  180. 6:15going on inside of our product-focused
  181. 6:17agent. Right now, we're in the swim lane
  182. 6:19view. We can go ahead and switch to our
  183. 6:21single view, and let me click our steel
  184. 6:23man agent, and we can see a great
  185. 6:24breakdown of everything going on here.
  186. 6:27We got that cracked Gemini 3.5 flash
  187. 6:30tokens per second speed. So, when you're
  188. 6:32looking at selecting the model for your
  189. 6:34product, you're going to want something
  190. 6:36like this. We have a cost breakdown, we
  191. 6:38have tokens per second breakdown, and we
  192. 6:39understand the context of the agent that
  193. 6:42we're running. You can see here very
  194. 6:43clearly, Gemini 3.5 flash running. We
  195. 6:45can see everything that happened, all
  196. 6:47right? So, a bunch of research happening
  197. 6:48here. There's the start, here's the end,
  198. 6:50and you can see all the artifacts
  199. 6:52generated, right? And of course, we can
  200. 6:53click into anything, see the exact tool
  201. 6:56call arguments. We can see everything
  202. 6:57that built our generative UI components,
  203. 6:59assistant message. We can see the
  204. 7:01results and all the thinking, so on and
  205. 7:03so forth. You know, classic agent
  206. 7:04observability. If you don't measure what
  207. 7:07your agents are doing, you cannot
  208. 7:08improve them. This is just a fact. A lot
  209. 7:11of vibes out there, a lot of vibe coding
  210. 7:13going on out there. That will get you to
  211. 7:14a certain level, a very, you know,
  212. 7:16low-level performance, but if you want
  213. 7:17to go all the way, if you want to truly
  214. 7:19agentic engineer systems, especially in
  215. 7:22your products and services, but also for
  216. 7:24engineering work, it's very valuable to
  217. 7:27understand the tradeoffs between the
  218. 7:29tradeoff trifecta, performance, speed,
  219. 7:32and cost. Just a quick note on Gemini
  220. 7:353.5 flash, having a really great time
  221. 7:37using this model. It is I would say near
  222. 7:39state of the art. It really surprised me
  223. 7:41in a lot of cases because specifically
  224. 7:43for that cost, if you're thinking about
  225. 7:45building out product-focused agents, the
  226. 7:47performance, speed, cost trade-off is
  227. 7:50really, really great.
  228. 7:52And I know everyone's complaining about
  229. 7:53the you know, Gemini 3.5 Flash price.
  230. 7:56Came in definitely higher than we were
  231. 7:57expecting. It's not so much a Flash
  232. 7:59model anymore. I think for the
  233. 8:01performance you're getting out of this
  234. 8:02thing, it's pretty fantastic. I'd like
  235. 8:05to think about cost per intelligence
  236. 8:08versus cost per token. What you really
  237. 8:10want is the intelligence and the
  238. 8:11performance. And if it's worth it, I'm
  239. 8:13certainly willing to pay more.
  240. 8:15Obviously, we'd all love every model,
  241. 8:17all the best models to be dirt cheap,
  242. 8:18but that's just not the case. Got to
  243. 8:20play with the cards we're dealt. So,
  244. 8:21this is agent observability. This is the
  245. 8:22core idea. If you stop the video now, I
  246. 8:24think you get the idea. If you don't
  247. 8:26measure, you can't improve. And this is
  248. 8:28especially important once you start
  249. 8:30building products where your agents are
  250. 8:32executing thousands and tens of
  251. 8:34thousands and hundreds of thousands of
  252. 8:36times over the course of some period,
  253. 8:38right? A day, a week, so on and so
  254. 8:39forth. If you can run a 3.5 Flash or a
  255. 8:42DeepSeek V4 Pro, and you can save and
  256. 8:45still get the results and still call all
  257. 8:47the right tools, you should absolutely
  258. 8:50do that. Okay? Like there's just no
  259. 8:51debate there. Like you should absolutely
  260. 8:53understand that and make sure that you
  261. 8:56have that in place in your production
  262. 8:58system. So, that's the idea, right?
  263. 8:59That's the core idea here. You know, the
  264. 9:00architecture is exactly what you would
  265. 9:02think. You stream events to some server.
  266. 9:04The server also stores this in a DB, so
  267. 9:06you know, we can refresh this, get
  268. 9:07everything back. Couple nice things I
  269. 9:09built into the system, you know, I have
  270. 9:10a function mode where we can really get
  271. 9:12things super compressed. And then I have
  272. 9:14a form mode to be more visually
  273. 9:16aesthetically pleasing. We have single
  274. 9:17lane mode here in our observability
  275. 9:19system. Let's go to that steel man
  276. 9:20agent. So, we can really get some more
  277. 9:22detailed results, right? That one run
  278. 9:24took 79 events, total 1-minute duration.
  279. 9:27You can see the cost, so on and so
  280. 9:28forth. And then we have race mode, which
  281. 9:29I think is really interesting. So, this
  282. 9:31is a left-to-right kind of race
  283. 9:33situation where you can see the events
  284. 9:34side by side. You can see every set of
  285. 9:36events chunked by turn, right? And then
  286. 9:38we can dial into these and again, it's
  287. 9:40just about understanding what our agent
  288. 9:42is doing and when it's doing it. And of
  289. 9:44course, we can stack. So, let's say we
  290. 9:46want to erase our planning agent and we
  291. 9:49want to see our HTML and V plan. And
  292. 9:51we'll we'll go ahead and dive into the
  293. 9:52results of these agents in just a second
  294. 9:54here. Again, agent observability is so
  295. 9:56important because in the start event, if
  296. 9:58I click into this, you can see we have
  297. 9:59all the details of this agent on boot
  298. 10:02up. I'll just pull this out. You want to
  299. 10:03know what your agent system prompt is,
  300. 10:06right? And a lot of times, if you're
  301. 10:08building production agents or you're,
  302. 10:09you know, customizing your system
  303. 10:10prompt, you're going to be templating
  304. 10:11strings into your system prompt. So,
  305. 10:13you're going to want to see what the
  306. 10:14real results are. Have you actually seen
  307. 10:16the full system prompt of your agent?
  308. 10:18Like, do you know what it looks like?
  309. 10:19Even the PyCode Agent, which I'm using a
  310. 10:21lot more now, as you know, if you've
  311. 10:23been watching the channel, this is a
  312. 10:24decent-sized prompt. Of course, it has
  313. 10:25all the skills that I'm adding. A decent
  314. 10:27chunk of context is just showing off all
  315. 10:29the skills. You can see your session
  316. 10:30file, session ID. You're going to want
  317. 10:32to know all the tools that your agent
  318. 10:34actually has loaded. You can see our
  319. 10:36communication tools from a previous
  320. 10:37video where we talked about flat Py to
  321. 10:40Py agent communication, not sub-agent
  322. 10:42delegation. But, you can see that I also
  323. 10:43have sub-agent delegation ready via
  324. 10:45another PyCode Agent extension and then
  325. 10:47I have this session digging capability,
  326. 10:49all the classic tools, and then, you
  327. 10:51know, tool snippets, prompt guidelines,
  328. 10:53and then all my skills here. You can
  329. 10:54really see here that by loading a bunch
  330. 10:56of these skills, it's also kind of
  331. 10:58bloating up my system prompt. Just
  332. 11:00important small pieces of information
  333. 11:02like that, you only understand and you
  334. 11:04only know if you're looking and if
  335. 11:06you're inspecting your agent.
  336. 11:13So, PyAgent observability very powerful
  337. 11:15and how you observe and ingest that
  338. 11:17information is also very important.
  339. 11:19Let's see what's going on in turn five
  340. 11:21here for each agent, right? Looks like
  341. 11:22they're roughly on the same track,
  342. 11:24making tool calls, understanding the
  343. 11:26code base to build the spec. We're on
  344. 11:28style.css and we're on the app. Everyone
  345. 11:31understands engineering agents. This is
  346. 11:33like table stakes. This becomes
  347. 11:34exponentially more important when you're
  348. 11:36building out product-focused agents. You
  349. 11:38know, let's do a couple things here.
  350. 11:39Let's run another prompt here and then
  351. 11:40let's understand the differences between
  352. 11:43the spec markdown prompt, right? A
  353. 11:45classic markdown prompt, our HTML plan,
  354. 11:48which is using more tokens to generate
  355. 11:50HTML, which you can understand better,
  356. 11:52your team can understand better, and
  357. 11:54your agents can understand better, and
  358. 11:56then an expanded, what I like to call V
  359. 11:58spec or V plan, where we add visuals.
  360. 12:01So, we'll go ahead and open these up in
  361. 12:02a second, but first let's kick off
  362. 12:04question here for our product. What I
  363. 12:06want to see here, as I'm thinking about
  364. 12:08purchasing Apple and I want to get a
  365. 12:10good bear thesis breakdown, is show me
  366. 12:14Apple's revenue of Mac mini versus all
  367. 12:17their other product lines. I'll just say
  368. 12:19visually, just so it's super clear. Of
  369. 12:21course, we can just dial into this. Let
  370. 12:23me go ahead and show you the live stream
  371. 12:24of this steel man, right? Doing
  372. 12:26research, using tokens inside the
  373. 12:29product, calling the tools that you set
  374. 12:31up for your product. There it is,
  375. 12:33emitting the artifact. Let's go and see
  376. 12:35what that artifact was. There we go, we
  377. 12:37got a nice pie chart and, you know, Mac
  378. 12:39mini sales, basically zero. Was the Mac
  379. 12:42mini
  380. 12:43craze really that crazy?
  381. 12:45No,
  382. 12:46it wasn't. And, you know, really
  383. 12:48interesting, you know, you can hear and
  384. 12:49listen to all the hype, but even with
  385. 12:51viral events like this, it's not that
  386. 12:54important to Apple's total top line
  387. 12:55revenue. Now, of course, things can
  388. 12:57change, these can grow. The Mac mini
  389. 12:59claw craze it certainly is a signal and
  390. 13:01I'm sure Apple is betting on a larger
  391. 13:04trend of AI in some shape or form. They
  392. 13:06they certainly need to act on that a
  393. 13:08little bit more, but just looking at the
  394. 13:09raw numbers, right? We can see our core
  395. 13:12references here, right? Apple's first
  396. 13:13quarter results, right? I mean, we can
  397. 13:15click into this. This is like legitimate
  398. 13:17sourcing, right? January 29th. You know,
  399. 13:19we're getting the latest information
  400. 13:20here thanks to our agents and our tools.
  401. 13:23Having a bear, a counter positional
  402. 13:26agent is super, super powerful for
  403. 13:27getting that opposite perspective.
  404. 13:29Anyway, back to our agents. So, we can
  405. 13:31see again, we're just continuing to
  406. 13:33trail and understand the tokens per
  407. 13:35second, which my god, Gemini Flash is a
  408. 13:37beast here. My tokens per second
  409. 13:39calculation is a little off here. I had
  410. 13:40to do some inference on this cuz the
  411. 13:43Python agent doesn't come with this out
  412. 13:44of the box, at least that I know of.
  413. 13:45Comment down below if I missed
  414. 13:46something. Yeah, just great performance
  415. 13:48here all around. There's another really
  416. 13:50powerful tool that I want to show you in
  417. 13:51addition to the Pi agent observability
  418. 13:54system, and that is GPT image 2.0. The
  419. 13:57Anthropic team put out this great post
  420. 13:58on the unreasonable effectiveness of
  421. 14:00HTML. It's about using HTML with specs,
  422. 14:03right? Give your agents more tokens and
  423. 14:05they'll perform better. That's the top
  424. 14:06line for this, right? More useful
  425. 14:08tokens. I've been using and leveraging
  426. 14:09that idea in a different way,
  427. 14:11specifically with images. Let's go ahead
  428. 14:13and just dive into our plans here. So,
  429. 14:14we have our markdown spec here. We have
  430. 14:16our HTML spec, and we have our HTML V
  431. 14:19spec. And you'll notice something here,
  432. 14:21the V spec contains images. All right,
  433. 14:23so you can see very very quickly where
  434. 14:25this is all going. And so, you know,
  435. 14:26classic markdown spec, tried and true,
  436. 14:29simple, best for preserving tokens, and
  437. 14:32having a text-focused result. Okay, so
  438. 14:35this is my classic spec planning prompt.
  439. 14:37I have templated my engineering into
  440. 14:39these sections, right? Task, objective,
  441. 14:41problem, solution, relevant files, blah
  442. 14:43blah blah. Classic stuff here. We're
  443. 14:44building these three new types of
  444. 14:45generative AI that our Steel Man agent
  445. 14:48can respond with. So, very important
  446. 14:50stuff there. Let's go ahead and see
  447. 14:51another version, okay? So, let's talk
  448. 14:52about HTML, right? What does that HTML
  449. 14:55look like? So, I'm going to get the
  450. 14:56reference of this, and I'm just going to
  451. 14:57fire Chrome on this. Here is my HTML
  452. 15:00version of that, okay? And so,
  453. 15:02relatively bare-bones, you can see I'm
  454. 15:03not using a ton of tokens to use every
  455. 15:06HTML tag under the sun. But, you can see
  456. 15:08here, we're getting a more visual-rich
  457. 15:11portrayal of, very importantly here, our
  458. 15:14UIs. With the HTML spec, my agent is
  459. 15:17starting to dial into what the HTML
  460. 15:19components look like. Here's our quote
  461. 15:21component, it mocked out, here's our
  462. 15:23timeline component, and then here is our
  463. 15:26valuation gauge that it mocked out. And
  464. 15:28then a couple more notes. So, I could be
  465. 15:30doing a lot more here with the HTML
  466. 15:32spec. You can push this really, really
  467. 15:33far and be more prescriptive. Basically,
  468. 15:36I just have my same markdown spec in
  469. 15:38HTML, which gives it a few additional
  470. 15:40capabilities to communicate the
  471. 15:42information in a more accurate way at
  472. 15:44the cost of tokens. Interestingly, if we
  473. 15:47go back to our swim lane and we drop
  474. 15:49Steel Man and we drop V Plan and just
  475. 15:51compare our markdown and HTML spec, now
  476. 15:54we can see very clearly markdown
  477. 15:56actually used uh more tokens this run.
  478. 15:58It used 170 events versus 100 events,
  479. 16:02and it used about the same context.
  480. 16:05Okay, so what happened here?
  481. 16:07Is this just variance? Is this our agent
  482. 16:09being more focused on the actual plan
  483. 16:12and doing more research since it doesn't
  484. 16:13have to think about outputting in
  485. 16:15markdown? It's unclear, but now we can
  486. 16:18see
  487. 16:19right now we can understand that there
  488. 16:21is some difference here, and obviously
  489. 16:23the right thing to do here is to turn
  490. 16:24this into an eval, run it over and over
  491. 16:26and over again to look for the average
  492. 16:28performance results. And, you know, hint
  493. 16:30hint, that's what comes next. After you
  494. 16:31have observability, after you're
  495. 16:33building out your product-focused
  496. 16:34agents, you're then going to want to
  497. 16:36scale your repeat work into evals. But
  498. 16:39step one is just measure, so that's what
  499. 16:40we're doing here. Okay, so we're going
  500. 16:41to do Chrome on our HTML V version, open
  501. 16:44this up. Very similar version, except we
  502. 16:46have images embedded. that powerful GB
  503. 16:50Image 2 model, and per plan now you can
  504. 16:53embed images to enrich your planning
  505. 16:57experience, not just for your agent. Our
  506. 16:59agent is going to read this, it is going
  507. 17:00to execute this. We've updated our build
  508. 17:02prompt to say if there are any images
  509. 17:05inside the plan, you must read them.
  510. 17:06Image tokens are very useful for your
  511. 17:08agent, especially very powerful
  512. 17:10multimodal models like Gemini 3.5 Flash.
  513. 17:14If we jump down to MMLU and all these
  514. 17:16multimodal benchmarks, this model is
  515. 17:18going to be really, really great with
  516. 17:19these V specs, these visual specs, these
  517. 17:22HTML specs, these image specs. Gemini
  518. 17:25wins on multimodal. We know for a fact
  519. 17:27that not only will this improve your
  520. 17:29agents, but the more I plan with V
  521. 17:31specs, visual specs, it's so helpful to
  522. 17:34see interfaces to spec with, and images
  523. 17:37to spec with, right? I can clearly see
  524. 17:39exactly what my model's thinking in a
  525. 17:41visual way. And this is all possible, I
  526. 17:43think it was nearly impossible before
  527. 17:45the GPT image 2 model. Now this is a
  528. 17:47reality. Let me just make this super
  529. 17:48clear. All my plans now are V specs,
  530. 17:51they're visual specs. Now HTML is an
  531. 17:53enhancement to that. Sometimes I use
  532. 17:55HTML, sometimes I just use markdown that
  533. 17:57reference images, but I'm always
  534. 17:59planning with images now. And of course,
  535. 18:01this is more expensive, you know,
  536. 18:02something that our observability tool
  537. 18:04did completely miss is that it's not
  538. 18:06capturing the costs of generating each
  539. 18:08image. I mean, this actually costs one
  540. 18:10or two dollars or three dollars total to
  541. 18:13generate all the images, but you can see
  542. 18:15here that this experience of agentic
  543. 18:18engineering with this type of plan is
  544. 18:20superior. I mean, it's just better. I'm
  545. 18:22quickly understanding the plan. Okay,
  546. 18:24nice. So, thanks to the HTML spec
  547. 18:26portion of this, we also have a freeform
  548. 18:29breakdown part of this plan where we're
  549. 18:31actually writing out what these
  550. 18:32components will look like. So, same
  551. 18:34deal, right? We're creating steel man
  552. 18:36generative AI components. Here's a
  553. 18:38quote, here's a timeline component, and
  554. 18:40here's a valuation marker. So, it didn't
  555. 18:42get a perfect, but you can see here it's
  556. 18:43even a little bit dynamic. We can play
  557. 18:45with this a little bit, and this is
  558. 18:46where HTML specs really shine is that
  559. 18:48you can get some like demo proof of
  560. 18:51concepts for specific parts of your
  561. 18:53work, even if you're doing back end
  562. 18:55work, devops work, product work, and of
  563. 18:57course, UI work. It's nice to have HTML
  564. 18:59prototypes rendered into your plan. I'm
  565. 19:02using visual prompts a lot more, and I'm
  566. 19:05throwing in some HTML where it makes
  567. 19:06sense, right? Especially for front end
  568. 19:08work, HTML specs very powerful, but a
  569. 19:10lot of the times text is enough. In
  570. 19:12agentic engineering, if you're doing it
  571. 19:14right, you're probably stuck in one of
  572. 19:16two places, right? There are two
  573. 19:17constraints of agentic engineering. It's
  574. 19:19planning and reviewing. These types of
  575. 19:21visual specs, these HTML specs, they
  576. 19:24really, really help with the planning
  577. 19:26side of things. And it just comes down
  578. 19:28to the fact of do you know the
  579. 19:30performance, speed, cost tradeoff of
  580. 19:32using each one of these different plan
  581. 19:34types with each different prompt you're
  582. 19:37comparing against, and skills, and
  583. 19:39agentic workflows and software
  584. 19:40factories, and so on and so forth. It
  585. 19:42all comes back to your ability to truly
  586. 19:44understand the internals and the uh
  587. 19:47trace of how your agent got to the
  588. 19:49result and what it cost them to get that
  589. 19:51result. Agent observability is at the
  590. 19:53center of this. I myself need this for
  591. 19:57engineering, but specifically for
  592. 19:58product work that I have upcoming that
  593. 20:00I'm working on. I'm getting into that
  594. 20:02really important phase where I need to
  595. 20:04compare the performance of different
  596. 20:05models, not just on can they do the job,
  597. 20:08but how quickly and how much does it
  598. 20:10cost. This is the tradeoff trifecta. You
  599. 20:12need to understand the tradeoffs, right?
  600. 20:14Engineering is all about making the
  601. 20:16right tradeoffs for your work, for your
  602. 20:17products, for your customers, for your
  603. 20:19users, for your company. Again, just one
  604. 20:21more time, you know,
  605. 20:22there's a million observability tools.
  606. 20:24I'm not trying to sell you on mine. I'm
  607. 20:26just trying to communicate the
  608. 20:27importance and the idea here. If you
  609. 20:29don't measure it, you cannot improve it.
  610. 20:31Uh if you like this video, if you like
  611. 20:32this idea, like, subscribe, join the
  612. 20:34journey with a single PyCoding Agent
  613. 20:36extension that we can pull up right
  614. 20:39here, extension Py Observability, and
  615. 20:42with a single user interface, I'm able
  616. 20:45to now capture all the events of every
  617. 20:47one of my agents that executes. And
  618. 20:49again, you know, refocusing on the
  619. 20:50PyCoding Agent, this tool allows us to
  620. 20:52build and use extensible software. It
  621. 20:56allows us to build our own custom agent
  622. 20:58harnesses and customize them just like
  623. 21:00we need to. This really helps us get at
  624. 21:03that idea of understanding the uh
  625. 21:06tokenomics of the work we're doing. In
  626. 21:08our previous video, we talked about the
  627. 21:10single most important thing for senior
  628. 21:11engineers to be focused on, and this was
  629. 21:13one of the key ideas. The first step
  630. 21:14here is to use more tokens. The next
  631. 21:17step is to generate value from the
  632. 21:18tokens you've created, and then the
  633. 21:20final step is to actually arbitrage your
  634. 21:23tokens. It's to capture the revenue,
  635. 21:25right? Capture the value that you're
  636. 21:26generating, usually in the form of of
  637. 21:28cash, right? Revenue from your product.
  638. 21:29This is the agentic value chain, right?
  639. 21:31This is tokenomics, right? You want to
  640. 21:33move up this chain. You don't want to
  641. 21:34just be stuck at the bottom here token
  642. 21:36maxing. You want to move upwards, and
  643. 21:38the only way to do this, right? We
  644. 21:40talked about this last week, and we're
  645. 21:41doubling down on this idea. Everything
  646. 21:42is connected here. This channel is a
  647. 21:44chain of steps to become the greatest
  648. 21:47agentic engineer possible. We need agent
  649. 21:49observability to help us get to this
  650. 21:51place where we can arbitrage our tokens.
  651. 21:54It's not enough to be able to just run a
  652. 21:56bunch of agents, right? That's cool,
  653. 21:57great place to start, terrible place to
  654. 21:58end. We need valuable agents, and then
  655. 22:01we need to capture the value of the
  656. 22:02agents. Step one, use the tokens. Step
  657. 22:04two, generate value from the tokens.
  658. 22:06Step three, capture the revenue of the
  659. 22:08value generated from your tokens. I have
  660. 22:11this on now in every single agent by
  661. 22:13just plugging in this extension where
  662. 22:15we're building slices of composable
  663. 22:17customization, thanks to the Pi agent
  664. 22:19harness. I'm stacking up these
  665. 22:20extensions as I mentioned, yeah, and
  666. 22:22this is true.
  667. 22:23And maybe you can tell from watching,
  668. 22:25you know, videos week after week, I'm
  669. 22:26building a new agent harness every
  670. 22:28single week. I'm building a new slice of
  671. 22:30composability that I'm adding some are
  672. 22:32hitters, some are losers, right? If I
  673. 22:34show you my terminal here, right? I've
  674. 22:35got my Pi communications network here
  675. 22:39that has been super super valuable,
  676. 22:40right? Paying agents via com system. Say
  677. 22:43hi. This has been ultra valuable. Any
  678. 22:45agent can coordinate with any other
  679. 22:47agent, and this is just on all the time,
  680. 22:49right? so you can see there are my
  681. 22:50agents talking to each other. This is a
  682. 22:51flat agent communication. I'll link this
  683. 22:53video. You can see the responses came
  684. 22:55back, and this is just, you know, one
  685. 22:57additional advantage I'm stacking up for
  686. 23:00my agents, and I want to share it all
  687. 23:01here with you on the channel. So, links
  688. 23:03to the Pi observability code base is
  689. 23:05going to be in the description for you.
  690. 23:06We didn't go into too much of the prompt
  691. 23:08details because it's here for you. If
  692. 23:10you look at the cloud skills, you'll see
  693. 23:12HTML spec, you'll see HTML V spec,
  694. 23:14visual spec, and I have my markdown V
  695. 23:17spec prompt that I use to generate
  696. 23:19markdown prompts with images. So, still
  697. 23:22generating useful, valuable tokens
  698. 23:24inside of the plan. Inside this code
  699. 23:26base, we'll have the extension here and
  700. 23:27of course you'll also have access to the
  701. 23:28steel man web UI. So, you can just test
  702. 23:31this out. Um you know, it's a starting
  703. 23:32place. I highly recommend you think of
  704. 23:34every piece of code you see, every open
  705. 23:36source project, everything you're
  706. 23:37intaking as an option. With the option,
  707. 23:40you can take it, you can adapt it with
  708. 23:41your agents, take it, make it your own,
  709. 23:43improve it, do your thing with it. I'm
  710. 23:44going to do the exact same thing. I'm
  711. 23:45going to specialize the Pi observability
  712. 23:48UI and agents and push them uh to really
  713. 23:51serve the exact use cases I need solved.
  714. 23:53If we look at the future of where this
  715. 23:56is going, I think a lot of things are
  716. 23:58just going to be the same but a little
  717. 23:59better and a little better and a little
  718. 24:00better. Specifically when we talk about
  719. 24:02specs, it's clear that multimodal specs
  720. 24:04give your agents text, image, audio,
  721. 24:07video as part of your plans is going to
  722. 24:09be more and more valuable and the leader
  723. 24:11here is going to be the Gemini models,
  724. 24:14right? They just have the advantage on
  725. 24:16multimodal. I mean, they have YouTube to
  726. 24:18train on for God's sake, right? The
  727. 24:20advantage is going to remain there. It
  728. 24:22is pretty clear that uh these models are
  729. 24:24starting to specialize and really start
  730. 24:27carving out their own areas of
  731. 24:28expertise. You know, Gemini 3.5 flash
  732. 24:31topped your model. Pretty impressive
  733. 24:33that Open AI is doing a GPT 5.5, you
  734. 24:36know, pretty cracked engineering model
  735. 24:37and they're still putting out insane
  736. 24:39image models. Of course, Gemini put out
  737. 24:42that new Omni model. So, you know, lots
  738. 24:44going on, lots more to see. This is our
  739. 24:46bread and butter here, guys. We ingest
  740. 24:48every model, we ingest every agentic
  741. 24:51engineering idea on this channel and
  742. 24:53then we synthesize to make it useful and
  743. 24:55valuable. None of this stuff matters if
  744. 24:57you can't build it into your work for
  745. 24:59you, your team, your company, and
  746. 25:01ultimately your customers. If you want
  747. 25:03to win, you got to measure this stuff,
  748. 25:05especially if you want to get your
  749. 25:06agents into products. You want to
  750. 25:08balance the trade-off trifecta,
  751. 25:10performance, speed, and cost. You don't
  752. 25:12just want to spend tokens. You want to
  753. 25:14spend tokens
  754. 25:15that are valuable and then arbitrage
  755. 25:17that value. All right? You know where to
  756. 25:19find me every single Monday. Stay
  757. 25:21focused and keep building.

About this transcript

This page contains the full transcript of Pi Coding Agent Observability: HTML Specs with Gemini 3.5 Flash and GPT Image 2 by IndyDevDan, generated from the public captions YouTube serves with the video. The transcript has 5,139 words across 757 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.