Blank white background with no objects or features visible.

TrueFoundryはSeldon AIの買収を発表し、エンタープライズAI向けコントロールプレーンを拡張します。プレスリリース全文はこちら→

エージェントゲートウェイシリーズ(第4回/全7回) | 自律型システムのためのFinOps

By Boyu Wang

Published: July 4, 2026

In traditional software, an infinite loop is a nuisance. It spikes your CPU usage, maybe slows down a server, and you fix it by restarting the pod. The cost is negligible—electricity is cheap.

In Agentic Software, an infinite loop is a financial disaster.

Imagine two agents getting stuck in a politeness loop: "No, after you!" "I insist, you first!"

If these agents are running on GPT-4 at $30 per million tokens, and they exchange messages once per second, you can burn through thousands of dollars in a single afternoon.

To run agents in production, you cannot just give them API keys and hope for the best. You need an Internal Economy.

The TrueFoundry Agent Gateway acts as the Central Bank for your digital workforce. It mints grants, enforces quotas, issues stop-loss orders, and manages the exchange rates between different departments. For more details: .https://www.truefoundry.com/docs/ai-gateway/budgetlimiting

The Problem: The Hidden Bill of Autonomy

The fundamental risk of agency is unpredictable consumption.

  • API Call: Deterministic. 1 Request = 1 Cost unit.
  • Agent Task: Non-deterministic. You ask an agent to "Research competitors." It might search Google once (Cost: $0.05). Or, it might decide to crawl 500 websites, summarize 50 PDF reports, and spawn 10 sub-agents to analyze the data (Cost: $50.00).

You need a system that governs Consumption Intent, not just request volume.

A Concrete Example: The "Runaway Researcher"

Let’s look at a real-world horror story: The recursive market analysis.

The Setup:

A user asks the Research Agent: "Find me all AI startups in California."

The agent is designed to:

  1. Search Google.
  2. For every result, visit the website.
  3. If the website mentions "AI," save it.

The Failure Mode:

The agent finds a "List of 1,000 Startups" directory. It dutifully decides to visit all 1,000 links.

Each visit requires a browser tool call and a summarization call (GPT-4).

  • Cost per link: $0.10
  • Total Links: 1,000
  • Total Cost: $100.00 for a single query.

The Fix (With A2A Economy):

The best agent gateway implements a Budget Grant.

  1. The User's request is tagged with a Grant: $5.00.
  2. The Agent starts working. It costs $0.10, $0.20, $0.30...
  3. At Link #50, the wallet hits $5.00.
  4. Action: The Gateway rejects the next tool call with 402 Payment Required.
  5. Result: The Agent is forced to stop and report: "I found 50 startups, but I ran out of budget to check the rest."

The system failed gracefully and cheaply, rather than succeeding expensively.

Fig 1: The Flow of the Budget Granting Process

The Token Grant System

We treat computation as a currency. Every request entering the Gateway must carry a Budget Context.

This is not a static monthly quota. It is a Per-Request Micro-Budget.

When a Manager Agent calls a Worker Agent, it must "pay" the Worker from its own wallet. This creates a natural incentive for efficiency. If the Manager wastes money, it fails its own task.

  • Manager Agent Budget: $10.00
  • Sub-Task Cost: $2.00
  • Manager's Decision: "I can afford to hire the 'Premium Coder Agent' ($2.00) or I can try the 'Cheap Coder Agent' ($0.50)."

This enables Economic Reasoning within the agent's logic.

The Volatility Circuit Breaker

Budget caps handle the "Total Cost." But we also need to handle the "Speed of Spend".

A "Runaway Agent" (infinite loop) looks like a spike in financial velocity.

The Gateway monitors the change rate of cost .

  • Normal: Spending $1.00 over 10 minutes.
  • Anomaly: Spending $1.00 in 10 seconds.

If the velocity breaches the threshold, the Circuit Breaker trips. The session is frozen. A human admin is alerted. This protects against code bugs where an agent retries a failed tool call 100 times in a millisecond.

Fig 2: Handling the "Speed of Spend"

Inter-Departmental Chargebacks: East-West Billing

In a large enterprise, agents are shared services.

  • Marketing Department: Owns the Copywriter Agent.
  • 技術部門: データベースエージェントを所有しています。

マーケティングのエージェントが技術部門のエージェントにデータを要求した場合、OpenAIの費用は誰が支払うのでしょうか?

技術部門が支払う場合、コスト削減のためにマーケティング部門をブロックするでしょう。これによりサイロ化が進みます。

マーケティング部門が支払う場合、どのように追跡すればよいでしょうか?

エージェントゲートウェイは以下を実装します 東西チャージバック

  1. 識別: リクエストはプリンシパル:マーケティングから発信されます。
  2. 実行: データベースエージェントが実行されます(コスト:$0.05)。
  3. 台帳: ゲートウェイは取引を記録します:マーケティングから$0.05を借方記入、技術部門へ$0.05を貸方記入。

月末に、ゲートウェイはCFO向けにレポートを生成します。これにより、エージェントはコストセンターから 内部サービスプロバイダーへと変わります。

シャドウFinOps:コスト予測

エージェントが稼働する前に、費用を予測できるでしょうか?ここで AI向けFinOps は、実行前にコストを予測する上で特に役立ちます。

ゲートウェイにはシャドウFinOpsモデルが組み込まれています。これは、過去のエージェントの実行履歴に基づいて学習された、小さな回帰モデルです。

ユーザーがプロンプトを送信すると、 「第3四半期の財務報告書を要約してください」 シャドウモデルは次のように予測します。

  • 予想ステップ数: 12
  • 予想トークン数: 8,000
  • 推定費用: $0.45

ユーザーの個人制限が$0.20の場合、ゲートウェイはそのリクエストを拒否します 即座に、1回のGPUサイクルも無駄にすることなく。そしてユーザーには次のように伝えます。 「このタスクにはマネージャーの承認が必要です。」

結論

説明責任のない自律性は無秩序です。その A2Aエコノミー 企業が安心してエージェントを導入できるよう、財務的な安全策を提供します。予算を厳守させ、無限ループを防ぎ、公正な費用配分を可能にすることで、AIを「支出のブラックボックス」から、測定可能で管理しやすい資本資産へと変革します。

The fastest way to build, govern and scale your AI

Sign Up
Table of Contents

One Gateway for Every LLM, Agent and MCP Server

Book a 30-min with our AI expert

Book a Demo

The fastest way to build, govern and scale your AI

Book Demo
Summarize with
ChatGPT logo by OpenAI
Perplexity AI logo
Blurry red snowflake on white background, symmetrical frosty design with soft edges and abstract shape.

Discover More

No items found.
OpenRouter vs AI Gateway
July 4, 2026
|
5 min read

OpenRouter 対 AIゲートウェイ:どちらがあなたに最適ですか?

comparison
July 4, 2026
|
5 min read

プロンプトエンジニアリング:LLMとの対話方法を学ぶ

Thought Leadership
LLMs & GenAI
July 4, 2026
|
5 min read

True ML Talks #12 - Llama-Index共同創設者

True ML Talks
July 4, 2026
|
5 min read

AIワークロードがクラウド料金を膨らませていませんか?

Thought Leadership
July 4, 2026
|
5 min read

エージェントゲートウェイシリーズ(第1部/全7部) | TrueFoundry エージェントゲートウェイ

No items found.
July 4, 2026
|
5 min read

Agent Gateway Series (Part 2 of 7) | Service Registry for the Agentic Era

No items found.
July 4, 2026
|
5 min read

Agent Gateway Series (Part 3 of 7) | TrueFoundry Powered A2A: Standardizing the Internal Monologue

No items found.

Recent Blogs

Black left pointing arrow symbol on white background, directional indicator.
Black left pointing arrow symbol on white background, directional indicator.
Take a quick product tour
Start Product Tour
Product Tour