The Real Fullstack

The Expensive Agent Loop

The task was “find invoice 4411 and email a summary”. Why did one run cost more than a month of the old script?

シニアエンジニア9 分タイムラインシミュレーターパフォーマンスラボ
ai-agentsllmpythonobservability

この課題はまだ日本語に翻訳されていません。英語版を表示しています。

ミッション:Keep a run under $0.10 and make it end usefully — with an answer or an explicit hand-over — instead of looping.背景 · 学習目標 ▾

Larkspur's back-office agent can search documents, read files and send emails. A user typed “invoce 4411”. The search tool returned nothing, and the agent kept retrying the same query until it hit the 40-step limit, resending the growing conversation each time.

ミッション: Keep a run under $0.10 and make it end usefully — with an answer or an explicit hand-over — instead of looping.

学習目標

  • Explain why agent costs grow quadratically with steps.
  • Detect repeated tool calls and force a change of strategy.
  • Use budgets and graceful escalation, not just step caps.
シミュレーションシミュレーション値

シミュレーションを実行すると出力が表示されます。

シミュレーションを実行

シミュレーションを実行すると出力が表示されます。

簡略化

Deterministic agent script; each step costs a base amount plus the accumulated history. 教育用モデルです。数値は挙動を示すためのもので、ベンチマークではありません。

コンセプト

関連する課題

参考資料