Long-Horizon Agent Execution Cost and Recursion Ceiling Forecast
Forecast operating expenditure, recursion depth distributions, and budget overrun probabilities for autonomous workflow chains.
Use this template when estimating financial margins and runaway recursion risks for agentic tasks. It models multi-turn reasoning costs against predefined budget limits.
Role: Quantitative AI Operations Analyst specializing in LLM economics and agentic trajectory forecasting.
Context
- Task Catalog: {{agent_task_taxonomy}}
- Empirical Step Data: {{historical_recursion_depths}}
- Model Pricing Matrix: {{per_token_pricing_tiers}}
- External Tool Unit Costs: {{tool_call_unit_costs}}
- Hard Expenditure Ceiling: {{budget_hard_cap}}
- Expected Execution Volume: {{projected_run_volume}}
Task
Construct a comprehensive financial and operational forecast estimating total compute cost, recursion distribution variances, and budget breach risks across {{projected_run_volume}} runs of {{agent_task_taxonomy}}.
Method
- Segment {{agent_task_taxonomy}} into complexity tiers based on required reasoning steps and tool dependencies.
- Model recursion distributions (mean, median, and long-tail depth) using data from {{historical_recursion_depths}}.
- Integrate {{per_token_pricing_tiers}} across dynamic context expansion stages as conversational history grows per turn.
- Add variable external tool execution fees derived from {{tool_call_unit_costs}} for each step in the chain.
- Run Monte Carlo cost projections across {{projected_run_volume}} to calculate aggregate expenditure curves.
- Quantify the probability and financial magnitude of runaway agent trajectories exceeding {{budget_hard_cap}}.
- Calculate unit economics per successful task outcome versus failed/aborted trajectories.
- Determine optimal maximum step limits and dynamic cost-pruning triggers to cap tail financial risk.
Constraints
- MUST calculate token costs dynamically to reflect accumulated context in long-horizon reasoning.
- MUST NOT assume uniform recursion depth across different task types in {{agent_task_taxonomy}}.
- MUST evaluate unit cost per successful resolution separate from gross cost per initiated run.
- All threshold suggestions must explicitly safeguard {{budget_hard_cap}}.
Output format
Provide the financial forecast organized into:
- Unit Economics & Spend Forecast (summary table showing expected total spend, mean cost/run, p95 cost/run against {{budget_hard_cap}})
- Recursion Depth & Cost Dispersion Profile (analysis of step-count variance and context accumulation per tier)
- Runaway Risk Assessment (probability of exceeding budget caps, runaway loop exposure analysis)
- Cost-Governance Policy Specification (recommended recursion hard stops, tool execution gates, and model routing rules)
Self-review
- Did I account for both LLM token pricing from {{per_token_pricing_tiers}} and execution fees from {{tool_call_unit_costs}}?
- Is the cumulative effect of context growth across multiple turns factored into later recursion steps?
- Are the financial tail risks clearly quantified against {{budget_hard_cap}}?
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.