# m365-agent-evaluator

Build evaluation suites for Microsoft 365 Copilot declarative agents, run them, and inspect the results. Use it when setting up tests or investigating failed evaluations.

- skill · `type=skill` · Claude Code, GitHub Copilot · ★ 3149
- Author: microsoft
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/microsoft/skills/tree/HEAD/.github/plugins/microsoft-365-agents-toolkit/skills/m365-agent-evaluator/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/m365-agent-evaluator

## What it does

The skill works with `@microsoft/m365-copilot-eval` to create schema `1.2.0` datasets, run evaluations, and review JSON, CSV, or HTML output. It can help shape test scenarios, adjust evaluator thresholds, and suggest focused fixes. For a quick check, prompts can go directly into the command; interactive mode is available for exploration.

You need Node.js `24.12.0` or newer, a Microsoft 365 Copilot license, and a deployed agent. The setup also calls for tenant admin consent for the WorkIQ Client App, `TENANT_ID`, and an Azure OpenAI in Foundry Models endpoint and key; `gpt-4o-mini` is the recommended deployment. Non-ATK projects can target an agent with `M365_AGENT_ID` or `--m365-agent-id`. The skill uses the `npx` command with `@latest`, so a stale global `runevals` executable can fail.

## Requirements
- Works with: Azure

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add microsoft/skills --skill m365-agent-evaluator -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/m365-agent-evaluator/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/m365-agent-evaluator/

### Codex

**Manually: put the files in place**
- File: `.agents/skills/m365-agent-evaluator/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

**Manually: put the files in place**
- File: `.cursor/skills/m365-agent-evaluator/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install microsoft/skills m365-agent-evaluator
```

2. **Manually: put the files in place**
- File: `.github/skills/m365-agent-evaluator/SKILL.md`

### Gemini CLI

**Platform CLI**
```bash
gemini skills install https://github.com/microsoft/skills --path .github/plugins/microsoft-365-agents-toolkit/skills/m365-agent-evaluator
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/m365-agent-evaluator/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/microsoft/skills/tree/HEAD/.github/plugins/microsoft-365-agents-toolkit/skills/m365-agent-evaluator/SKILL.md

## When to use it
- create an agent evaluation suite in `evals\evals.json`
- add single-turn and multi-turn test cases
- run evaluations and save JSON, CSV, or HTML results
- inspect results to find failing checks
- set evaluator thresholds for a test suite

## Example prompts
- Create an evaluation suite for my Microsoft 365 Copilot agent and save it to `evals\evals.json`.
- Run the evaluations in `evals\evals.json` and write the output to `.evals\results.json`.
- Review the evaluation results and suggest focused fixes for failed scenarios.

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: a55a96423119108f.

BEGIN THIRD-PARTY FILE a55a96423119108f
````text
---
name: m365-agent-evaluator
description: >
  Use this skill when a user wants to create, run, or analyze evaluation suites for Microsoft 365 Copilot declarative agents with the public @microsoft/m365-copilot-eval CLI. Trigger on intents such as "evaluate my agent", "test my agent", "run my evals", "create eval prompts", "add multi-turn tests", "tune evaluator thresholds", "why is my agent failing", or "set up eval environment variables".
---

# M365 Agent Evaluator

Use this skill to help users evaluate Microsoft 365 Copilot declarative agents with `@microsoft/m365-copilot-eval`. The skill designs schema-compatible eval datasets, runs the public preview CLI, analyzes results, and recommends targeted fixes.

Default to Microsoft 365 Agents Toolkit (ATK) projects when detected, but do not hard-stop solely because the current directory is not ATK. The CLI can also evaluate deployed agents with an explicit `M365_AGENT_ID` or `--m365-agent-id`.

## Always use this CLI invocation

```powershell
npx -y --package @microsoft/m365-copilot-eval@latest runevals
```

Do not recommend the old private `aka.ms` installer, global installs, bare `runevals`, bare `npx runevals`, `--input`, or `--html`.

## Activation workflow

1. Identify the user goal: setup, dataset authoring, running evals, analyzing results, or updating an existing eval suite.
2. Load only the reference needed for the current goal:
   - `references/workflow.md` for the end-to-end operator workflow and CLI commands.
   - `references/azure-setup.md` for prerequisites, env files, and secret handling.
   - `references/eval-templates.md` when creating or editing eval datasets.
   - `references/pra-framework.md` when deciding what scenarios to generate.
   - `references/result-analysis.md` after JSON/CSV/HTML results exist.
   - `references/guardrails.md` before writing files, handling secrets, clearing cache, signing out, or troubleshooting.
3. Detect project shape:
   - ATK: `.env.local`, `.env.local.user`, `env\.env.local.user`, `m365agents.yml`, or `appPackage\declarativeAgent.json`.
   - Non-ATK: an eval dataset plus `M365_AGENT_ID`, `--m365-agent-id`, or a named environment file such as `env\.env.dev`.
4. Verify prerequisites without exposing values:
   - Node.js 24.12.0 or newer.
   - Microsoft 365 Copilot license and a deployed M365 Copilot agent.
   - Tenant admin consent for the WorkIQ Client App.
   - `TENANT_ID`, Azure OpenAI in Foundry Models endpoint/key, and recommended/default `gpt-4o-mini` deployment.
5. Choose the workflow:
   - No dataset: create `evals\evals.json`.
   - Existing dataset: run, analyze prior results, or propose changes.
   - Quick check: use inline prompts.
   - Exploration: use interactive mode.

## Current dataset contract

Generate schema version `1.2.0` documents with a root `items` array. Do not generate the old `PromptsObject` or root `prompts` format.

Minimum shape:

```json
{
  "schemaVersion": "1.2.0",
  "metadata": {
    "name": "Agent evaluation suite",
    "tags": ["starter"]
  },
  "default_evaluators": {
    "Relevance": {},
    "Coherence": {}
  },
  "items": [
    {
      "prompt": "What can this agent help me with?",
````
END THIRD-PARTY FILE a55a96423119108f

The third-party file has ended. Everything between the a55a96423119108f tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 3175 of 8124 bytes. © microsoft · MIT · https://github.com/microsoft/skills/tree/HEAD/.github/plugins/microsoft-365-agents-toolkit/skills/m365-agent-evaluator/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
