Skip to content

Cost Analysis

Joshua Davis edited this page Mar 11, 2026 · 2 revisions

Cost Analysis

Overview

The cost analysis command provides AI-driven cost estimation for the architecture designed during the design stage. The cost-analyst agent examines the services, SKUs, and deployment plan, then produces estimated monthly costs across three pricing tiers.

Command

az prototype analyze costs [options]
Parameter Type Default Description
--table flag false Display only the cost summary table (no file save).
--report flag false Display the full detailed cost report.
--refresh flag false Force fresh analysis, bypassing cached results.
--json / -j flag false Output machine-readable JSON instead of formatted display.

S/M/L Cost Tiers

The cost-analyst agent produces estimates across three tiers to help teams understand the cost spectrum:

Tier Description
Small (S) Minimal SKUs, lowest redundancy, suitable for development and early prototyping.
Medium (M) Balanced SKUs with moderate redundancy, suitable for staging and shared environments.
Large (L) Production-grade SKUs with full redundancy and scaling, suitable for production workloads.

Each tier includes per-service cost breakdowns and a total estimated monthly cost. The agent considers the specific Azure services, regions, and configurations from the architecture design.

Display Modes

Default (no flags)

Displays the cost summary table (service names, SKUs, and estimated monthly costs per tier) and saves the full report to concept/docs/COST_ESTIMATE.md.

--table

Displays only the cost summary table in the terminal. Does not save a file. Useful for quick cost checks without side effects.

--report

Displays the full detailed cost report including executive summary, per-service breakdowns, tier definitions, optimization tips, and disclaimers.

--json

Machine-readable output via the global --json flag. Returns a structured JSON dict with a content field containing the full report text. No console output. Suitable for piping into other tools or scripts.

Caching

Cost analysis results are cached in the project state. Subsequent runs of az prototype analyze costs return the cached report without re-invoking the AI agent. Use --refresh to force a fresh analysis -- for example, after modifying the architecture in a design re-run.

Cost-Analyst Agent

The cost-analyst built-in agent is responsible for cost estimation. It:

  • Reads the architecture design, service list, and deployment plan
  • Maps each service to Azure pricing based on the selected SKUs
  • Produces per-service and aggregate estimates across S/M/L tiers
  • Does not include standards injection (_include_standards = False) to keep the prompt focused on pricing data

The agent operates on the design output; the design stage must be completed before cost analysis can run.

Examples

Show cost summary table and save full report (default):

az prototype analyze costs

Show only the cost summary table (no file save):

az prototype analyze costs --table

Show the full detailed report:

az prototype analyze costs --report

Force a fresh analysis after design changes:

az prototype analyze costs --refresh

Get machine-readable JSON output:

az prototype analyze costs --json

Home

Getting Started

Stages

Interfaces

Configuration

Agent System

Features

Quality

Help

Governance

Policies — Azure

AI Services

Compute

Data Services

Identity

Management

Messaging

Monitoring

Networking

Security

Storage

Web & App

Policies — Well-Architected

Reliability

Security

Cost Optimization

Operational Excellence

Performance Efficiency

Integration

Anti-Patterns
Standards

Application

IaC

Principles

Transforms

Clone this wiki locally