{
  "schema_version": "1.0",
  "surface_type": "guide_answer",
  "guide_id": "coding-agent-cost-per-task",
  "question": "How do I calculate coding agent cost per accepted task?",
  "canonical_url": "https://www.unitcostai.com/guides/coding-agent-cost-per-task",
  "related_tool_url": "https://www.unitcostai.com/tools/coding-agent-cost-per-task",
  "formula": "accepted_tasks_monthly = active_workers * accepted_tasks_per_worker_month; task_attempts_monthly = accepted_tasks_monthly / acceptance_rate; cost_per_accepted_task = (subscription + api_model + local_fallback + infra) / accepted_tasks_monthly",
  "assumptions": [
    "Accepted tasks are outputs that survive review, tests, or human acceptance",
    "API lane cost comes from model requests, input tokens, and output tokens under one pricing snapshot",
    "Local fallback is runtime cost per task attempt",
    "Subscription spend stays as an explicit worker-month budget"
  ],
  "example": "If 140 tasks are accepted from 194 attempts and total monthly agent cost is 827, cost per accepted task is about 5.91."
}
