Configure a FinOps hub agent in Microsoft Copilot Studio

This article describes how to configure a Microsoft Copilot Studio agent that connects to your FinOps hub Data Explorer database and answers cost questions by executing KQL queries. The agent uses the Kusto Query MCP Server to run queries and knowledge files from the FinOps toolkit to construct accurate KQL.


Prerequisites

Before you start, make sure you have the following:

If you're new to Copilot Studio, see Quickstart: Create and deploy an agent to learn the basics of agent creation before continuing.


Create and configure the agent

Create a blank agent in Copilot Studio, then configure it with the following FinOps hub settings.

Agent details

Set the agent name to FinOps Hub Agent (or your preferred name) and use the following description:

FinOps Hub Agent provides governed, real-time insights from your FinOps Toolkit Hub database. It translates natural language questions into validated KQL queries and delivers structured analysis on cloud spend, commitments, savings plans, anomalies, and optimization opportunities.

Model selection

The agent instructions require a model with deep reasoning capabilities for multistep KQL generation and structured report formatting. General-category models might produce lower-quality results for complex queries.

For available models, regional availability, and data residency considerations, see Select a primary AI model for your agent. If you want to use an external model, your tenant administrator must enable it first; see Choose an external model.

Agent instructions

  1. Download the Copilot Studio instructions for FinOps hubs and extract the contents.

  2. Open agent-instructions.md and update the Environment section with your cluster URI:

    Cluster URI: <your-cluster>.kusto.windows.net
    Database: Hub
    

    Note

    Don't include https:// in the cluster URI. Copilot Studio removes HTTP links from the Instructions field.

  3. Paste the full content of agent-instructions.md into the agent's Instructions field and save.


Add tools

The agent needs the following MCP tools to function. For general steps on adding MCP tools to an agent, see Add tools from an MCP server.

Kusto Query MCP Server (required)

Add Kusto Query MCP Server (by Azure Data Explorer) with these settings:

  • Ask the end user before running: No
  • Credentials to use: End user credentials

This tool lets the agent execute KQL queries against your hub's Data Explorer database. The agent uses end-user credentials so query results respect each user's database permissions.

Microsoft Learn Docs MCP Server (optional)

Add Microsoft Learn Docs MCP Server (by Microsoft Learn Docs MCP) to let the agent look up FinOps concepts, FOCUS specification details, and Azure service documentation when answering questions.

After adding tools, verify that each shows a Connected status in your agent's connection settings. If a connection shows as Not Connected, select Manage to authenticate.


Add knowledge files

The agent instructions reference knowledge files for constructing accurate KQL queries. These files are query-building references, not data sources. For general steps on adding knowledge to an agent, see Add knowledge sources.

Upload each file from the extracted knowledge/ folder and set the Description field for each file as shown:

File Description
schema-reference.md Column reference for Costs_v1_2() including names, data types, usage notes, and edge cases. Use to look up correct column names before writing queries.
query-catalog.md Ready-to-use KQL query templates for cost breakdowns, monthly trends, anomaly detection, forecasting, savings summary, and commitment utilization.
weekly-report-guide.md Step-by-step workflow for producing structured weekly cost anomaly reports with seven KQL queries, post-processing rules, and the final report structure.

The descriptions help the agent decide when to retrieve each file. Wait for all files to show a Ready status before testing.


Test your agent

Test the agent in the Test panel to verify it connects to your hub data correctly. The agent should detect your billing currency and ask you to select an analysis scope. Try these sample prompts:

What are my top 5 subscriptions by cost?
Create a week over week summary
Are there any unusual spikes in cost over the last 3 months?
What was my savings rate last month?

Verify that the agent:

  • Executes KQL queries against your hub database, not just quoting from knowledge files.
  • Presents results as formatted tables.
  • Shows the KQL query in a separate code block. Review the query to verify correct filters, time ranges, and aggregation logic.
  • Includes confidence level, time range, and scope in the response.

Publish your agent

After testing, publish your agent and configure channels to make it available to your team. For details, see Publish your agent.


Give feedback

Let us know how we're doing with a quick review. We use these reviews to improve and expand FinOps tools and resources.

If you're looking for something specific, vote for an existing or create a new idea. Share ideas with others to get more votes. We focus on ideas with the most votes.


Related FinOps hubs articles:

Related Copilot Studio articles: