Blank white background with no objects or features visible.

تعلن TrueFoundry عن استحواذها على Seldon AI، موسعة بذلك لوحة التحكم الخاصة بها للذكاء الاصطناعي للمؤسسات. البيان الصحفي الكامل →

سلسلة بوابة الوكلاء (الجزء 4 من 7) | FinOps للأنظمة المستقلة

By بويو وانغ

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 دولار.

في نهاية الشهر، تُنشئ البوابة تقريرًا للمدير المالي. هذا يحول الوكلاء من مراكز تكلفة إلى مقدمي خدمات داخلية.

FinOps الخفي: التنبؤ بالتكلفة

قبل أن يبدأ الوكيل عمله، هل يمكننا تخمين التكلفة؟ هنا يأتي دور فين أوبس للذكاء الاصطناعي ليصبح مفيدًا بشكل خاص في التنبؤ بالتكلفة قبل التنفيذ.

تتضمن البوابة نموذج فين أوبس الظلي (Shadow FinOps Model). إنه نموذج انحدار صغير تم تدريبه على عمليات الوكيل التاريخية.

عندما يرسل المستخدم أمرًا (prompt): "لخص التقارير المالية للربع الثالث،" يتنبأ النموذج الظلي بما يلي:

  • الخطوات المتوقعة: 12
  • الرموز المتوقعة: 8,000
  • التكلفة التقديرية: 0.45 دولار

إذا كان الحد الشخصي للمستخدم هو 0.20 دولار، ترفض البوابة الطلب فورًا، قبل إهدار دورة واحدة من وحدة معالجة الرسوميات (GPU). وتخبر المستخدم: "تتطلب هذه المهمة موافقة المدير."

خاتمة

الاستقلالية بلا مساءلة فوضى. الـ اقتصاد A2A توفر الضوابط المالية التي تتيح للمؤسسات نشر الأنظمة الذكية بثقة. من خلال تطبيق الميزانيات، ومنع الإنفاق الجامح، وتمكين استرداد التكاليف العادل، نحول الذكاء الاصطناعي من "صندوق أسود للإنفاق" إلى أصل رأسمالي قابل للقياس والإدارة.

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.
July 4, 2026
|
5 min read

تكاملات منصة التعلم الآلي #1: Weights & Biases

Use Cases
Engineering and Product
July 4, 2026
|
5 min read

تكامل Pillar Security مع TrueFoundry

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

التخزين المؤقت الدلالي لنماذج اللغة الكبيرة (LLMs): تقليل التكلفة وزمن الاستجابة بما يتجاوز التخزين المؤقت للبادئات

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

تكاملات أدوات التعلم الآلي #2 DVC لإدارة إصدارات بياناتك

Engineering and Product
Use Cases
July 4, 2026
|
5 min read

سلسلة بوابة الوكيل (الجزء 1 من 7) | بوابة الوكيل من TrueFoundry

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

سلسلة بوابة الوكيل (الجزء 2 من 7) | سجل الخدمات للعصر الوكيلي

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

سلسلة بوابات الوكلاء (الجزء 3 من 7) | A2A المدعوم من TrueFoundry: توحيد الحوار الداخلي

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