# How to avoid disaster when vibe-coding a billing engine — Andrew Garvin, Stripe
<!--
ref: @content/youtube/aie/2026-08-28-how-to-avoid-disaster-when-vibe-coding-a-billing-engine-andr
version: 3
updated_at: 2026-10-31T18:20:44.694Z
-->

Andrew Garvin (AI Engineer, 2026-08-28): Garvin argues that billing is exactly the kind of deep, business-critical system where naive vibe-coding goes badly — but that a coding agent is still the right accelerator if you scope it to a sandbox and give it real guardrails.

*Synthesized from Andrew Garvin on AI Engineer, 2026-08-28.*

Andrew Garvin is a co-founder of Metronome, the usage-billing platform acquired earlier this year in the largest acquisition Stripe has ever made, and he now works on agentic billing primitives inside Stripe.

## Core Thesis
Garvin argues that billing is exactly the kind of deep, business-critical system where naive vibe-coding goes badly — but that a coding agent is still the right accelerator if you scope it to a sandbox and give it real guardrails. Metronome's answer is a set of portable skills files plus deliberately verbose error messages that let the agent self-correct, combined with a hard product stance that the human stays in the loop and nothing the agent builds ships straight to production. He frames the broader shift with a three-role model — agent as your product, agent as buyer, agent as user — each of which pushes a company toward usage-based rather than seat-based pricing.

## Key Insights
- Metronome has metered the API calls of OpenAI and Anthropic since before either had revenue, so its metering service has operated at global scale across very different data profiles.
- Stripe CLI usage has grown exponentially over the past five to six months, alongside an exponential rise in new business formation on Stripe — Garvin reads both as coding agents doing the provisioning.
- Stripe Projects, launched the same week Metronome was acquired, is an orchestrator that provisions a Stripe account plus the backend services you need — Vercel, Postgres, and in this case a Metronome billing agent — entirely through the CLI. Vercel and Hugging Face are among the providers onboarding to make their products discoverable to agents.
- Metronome's guardrail is an extensible set of skills files that carry API context to the implementing agent. They're portable and easy to install, so teams can use the same files in their own environments.
- The second guardrail is developer experience, not model capability: errors are written to be verbose and explicit specifically so the agent can read them and correct itself. Metronome's DX team hunts for more failure cases, concentrated in initialization and setup.
- The explicit product goal is *not* to run the whole billing system without a human. The agent's job is to get you into a test environment fast; the demo runs into a Metronome sandbox, never production.
- A billing sandbox is only useful if it has usage in it. The skills files instruct the agent to flow synthetic usage into Metronome so you can see what a live customer's invoice actually looks like.
- Live demo target: reproduce Lovable's pricing model from a single natural-language prompt — "create a demo billing engine in Metronome mimicking the Lovable pricing model." The agent provisioned a customer with lifetime spend, a first-class credit object drawn down by usage, and a draft invoice split into build credits, plan mode credits, cloud credits, and AI gateway credits.
- The prepaid-credit auto-recharge pattern — credits recharge monthly, overage bills at period end — has dominated self-serve since OpenAI launched it on Metronome a couple of years ago.
- Three agent roles, each with a different pricing consequence: agent *as product* (it runs up a token bill, so you must meter), agent *as buyer* (it procures your service via CLI, so you must be discoverable to it), agent *as user* (it replaces seat-holders, so seat pricing collapses).
- HubSpot is mid-transition from seat-based to credit-based pricing, starting in EMEA with a dramatically lowered seat price plus a credit layer — a hedge against a world where one agent operates the whole system and all value accrues to a single "user."
- At a recent Andreessen demo day Garvin attended, all five demoing companies were sales-led agents built to operate platforms like SAP or invoicing systems — the "headlessness" thesis showing up as a whole cohort.
- Enterprise AI vendors (Cognition, Cursor, OpenAI, Anthropic) are adopting the commit structures cloud providers have used for a decade: prepaid commitments, postpaid commitments, and customer-specific offers.
- Runaway agent spend is now a first-class failure mode; Metronome is building controls like a per-agent wallet that only that agent can draw from.

## Actionable Takeaways
1. Install Metronome's skills files before pointing a coding agent at billing APIs — they're portable and designed to be dropped into your own setup, and they're what keeps the agent off the foot guns.
2. Start with `stripe projects init` from the Stripe CLI: pick your coding agent (Claude in the demo), let it provision the Stripe account and third-party backends — Vercel, Postgres, Metronome — in one natural-language pass instead of wiring accounts by hand.
3. Describe the pricing model you want to clone in plain language rather than specifying objects. "Replicate the Lovable pricing model" was the entire prompt that produced credits, usage draw-down, and a draft invoice.
4. Make the agent seed usage into the sandbox, not just provision objects. A contract and a customer record prove nothing; you need usage flowing to see the invoice and validate the model.
5. Keep the human in the loop and keep the output in test mode. Use the agent to reach a testable environment fast, then tweak and verify before promoting anything to production.
6. Audit your own error messages for agent-readability. Terse errors stall the agent; verbose, explicit ones let it self-correct — and setup/initialization is where the failures cluster.
7. If agents are becoming your product's actual operator, price on usage or credits before headlessness compresses your seat count — HubSpot's EMEA move (cut seat price, add credits) is the working template.

## Notable Quotes
> "Metronome is a very complicated and deep product and there's a lot of different ways to hit foot guns if you're not guided." — Andrew Garvin

> "Our perspective is to have much more verbose and clear errors so that the agent can self-correct." — Andrew Garvin

> "The goal is not to have a customer operate the entire system without a human in the loop." — Andrew Garvin

> "Agents can run away with spend, so we're thinking about how to give more controls to our customers that they can offer to theirs." — Andrew Garvin

> "Paying for seat level access to the product to perform your work is no longer important in some sense." — Andrew Garvin

---

*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).*