halyard
Customers

Case study · Vantra

Vantra gives every AI agent its own key and a spend cap it cannot talk its way past

An agent platform issuing 180,000 live keys uses per-key limits to stop runaway loops before they reach a customer's card.

live agent keys
180k
keys created a day
6,000
added latency at p99
3.1 ms
to launch metered pricing
3 weeks

Agents need credentials of their own

Vantra lets companies deploy agents that do real work across their tools: triaging support tickets, updating CRM records, reconciling invoices. Each agent calls a mix of internal APIs, third-party services and model providers on its owner's behalf.

At first every workspace had one API key, shared by all of its agents. One busy agent could exhaust the quota for the whole workspace, and nobody could tell from the logs which agent had made which call.

The weekend that set the requirements

An agent built to retry failed ticket updates hit a malformed record and retried it, again and again, for two days. It made 2.3 million calls before anyone noticed. The model bill came to $41,000, and Vantra paid it rather than pass it to the customer.

The lesson was that a limit inside the agent is a suggestion. An agent that is wrong about the world is also wrong about how much it has spent. The cap had to live outside the agent, at the gateway, attached to a credential the agent cannot change.

One agent stuck in a retry loopmodel spend, hours 0 to 48
0h12h24h36h48hWithout a cap: $41,000Per-key cap: $500429 spend_cap_reachedpaused, owner notified

A key and a cap for every agent

Now every agent gets its own Halyard key the moment it is deployed, created through the API and scoped to the tools its owner granted. Each key carries a request limit and a spend cap. When an agent reaches either one, Halyard returns a 429 with a machine-readable reason, the Vantra runtime pauses the agent and the owner gets a notification with the last hundred calls attached.

Keys expire automatically when an agent is deleted, which matters at Vantra's scale: 6,000 keys are created on a typical day, and 180,000 are live at any time. Verification adds 3.1 ms at the 99th percentile, which is lost in the noise next to a model call.

Agents don't get tired and they don't get embarrassed. The cap has to sit outside the agent, at the gateway, or it isn't really a cap.

Metered pricing in three weeks

Because every call is already counted per key, Vantra could roll agent usage up to the workspace and bill on it. The team launched a usage-based plan three weeks after the migration, using Halyard's usage export as the source for invoices.

No looping agent has reached a customer's bill since. The caps have tripped a few hundred times, and each one is a paused agent and a notification instead of an incident.

Next story

All customers
−88%billing disputesTidewell replaced four vendors with one gateway and stopped arguing with customers about invoicesRead the story

Ship your next API on Halyard

Free for your first million requests each month. After that you pay per million, with no gateway to run yourself. See pricing