Skip to content

recipe: add cost-management - #393

Closed
Brett Wilson (MSBrett) wants to merge 6 commits into
microsoft:mainfrom
msbrettorg:cost-management
Closed

Brett Wilson (MSBrett) wants to merge 6 commits into
microsoft:mainfrom
msbrettorg:cost-management

Conversation

@MSBrett

@MSBrett Brett Wilson (MSBrett) commented Nov 4, 2026 •

Copy link
Copy Markdown

Summary

  • Add a standalone 60-file cost-management recipe using native Azure Cost Management through the Azure Resource Manager MCP server with 14 tools. It has no FinOps Hubs or Azure Data Explorer dependency.
  • Include three subagents (finops-practitioner, azure-capacity-manager, and chief-financial-officer), 13 Python ExtendedAgentTool ARM, Quota, and Resource Graph tools, the azure-cost-management skill with 12 reference guides, the azcapman plugin, 15 knowledge base documents, 17 opt-in scheduled tasks, a Microsoft Teams ConnectorV2, and FinOps custom instructions.
  • Update the Bash and PowerShell assembly, apply, and verification scripts to bundle, deploy, and verify custom instructions; use the ExtendedAgentTool envelope and upload tools before dependent skills and subagents; and propagate ConnectorV2 spec.operations.

Validation

  • Current revision: test-dry-run-cost-management.sh passed 56/56 offline, using temporary copies with fixed output paths redirected. No live Azure calls were made; Bicep compilation was skipped.
  • Current revision: Bash and PowerShell assembly produced the same subagent specs as the previous revision, and both generated configs copied the instruction files.
  • Historical: test-dry-run-cost-management.sh passed 50/50, and test-connector-v2.sh passed.
  • Historical: live verify-agent.sh passed 26/26. The raw output was not located.
  • Historical live UAT covered cost and commitment review with a Teams post, cost-spike investigation with a follow-up Teams post, and AI workload cost and GPU capacity review with a Teams post. The cost and commitment review was manually prompted, not proof of a scheduled trigger. Existing commitment utilization was not established.
  • Historical Application Insights audit events independently recorded starts and ends for the three custom Python tools tested. The quota tool response was truncated or malformed in the capture; a clean complete quota response was not established. Two Resource Graph calls in the spike investigation returned HTTP 400 details despite a successful execution envelope. Cost-table rounding and unverified operational causes are documented as limitations.
  • Live create, update, and clone across Bicep, Terraform, and azd are not verified for this revision. Managed identity and Teams OAuth do not require static connector secrets.

msbrett and others added 2 commits November 2, 2026 10:46
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…red script fixes

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@MSBrett

Copy link
Copy Markdown
Author

Closing while we complete final R&D UAT verification in our fork.

msbrett and others added 2 commits November 11, 2026 12:56
…y scripts

Stage assembled JSON collections via jq --slurpfile in assemble-agent.sh,
stream data-plane payloads via temporary files in apply-extras.sh, and pipe
customInstructions verification JSON on stdin in verify-agent.sh so large
skills and tool collections do not fail with E2BIG ("Argument list too long")
on Linux and WSL.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Python tools now page their output with offset and next_offset to stay under the telemetry size limit. Failed reads are reported as unknown, not zero.
- Scheduled tasks and custom instructions use 90-day cost query and forecast windows that the Cost Management MCP server accepts.
- Budget checks call list_budgets first, then get_budget with an exact returned name.
- README documents Teams OAuth sign-in and channel setup, and the system-assigned and user-assigned managed identity split.
- Custom instructions add tool execution and delivery rules. tool-permissions.json and expected-config.json are updated.
- apply-extras.sh no longer writes a temp file for the settings GET. A new test script, test-cost-management-tools.py, reads AZURE_SUBSCRIPTION_ID.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
msbrett and others added 2 commits November 18, 2026 07:49
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant