Requirement-driven evaluation harness for AI agents and LLM applications. Generate behavior-specific test cases, run them against any target (hosted models, callable wrappers, OTel-traced agents), and inspect local-first artifacts.
See the code
Adaptive Spec-driven Scoring for Evaluation and Regression Testing
Local-first. Framework-agnostic. Trace-aware.
π Get started | π Visit project website | π View supported targets | π CLI Reference | π§ͺ Examples | π Behavior Library
Most AI systems start with a specification: product requirements, policies, system prompts, or launch criteria describing what the system should and should not do.
But evaluation often starts elsewhere: generic scorers, predefined benchmarks, or manual test cases that drift from the original intent.
ASSERT closes that gap. It turns your specified behaviors in natural language into structured, executable evaluations that can be reviewed, run, scored, and improved over time.
From the natural language specification, the ASSERT pipeline derives behavior categories, generates single-turn and multi-turn test cases, inferences them against your target, and uses an LLM judge to score each conversation against your policies.
assert_ai/library/behaviors/) spanning safety, bias/fairness, and agentic failure modes β the single source of truth for common behaviors, so you often don't have to write one from scratch. Pair with the scenario library for ready-made application context.from assert_ai import auto_trace; auto_trace.enable() β or emit your own spans with the OTel SDK) so the judge can cite tool calls, routing, model calls, and latency as evidence β not just the final response.ASSERT has two front doors:
run-assert-eval skill (recommended) β describe your agent in chat. Your coding assistant starts from the risks you bring, or discovers them with you, then writes the eval configs, runs the pipeline, reports the failures, and can then generate a policy to fix them and prove the fix worked. No YAML by hand.eval_config.yaml yourself and run it.run-assert-eval skillThe skill turns "I think my agent might do something bad" into measured evidence, and then into a deployable control. It chains three pieces β where the risks come from is a choice you make, not a step you have to clear:
| Clarity | discovery β optional, recommended | An interviewing agent that walks you through what your system is for and where it could fail, and writes the risks down. Use it when you want risks surfaced for you; skip it entirely and name your own when you already know what to measure. |
| ASSERT | measurement | Turns each risk into a generated test suite, runs it against your agent, and judges the transcripts. |
| ACS | governance | Generates an Agent Control Specification from the real failures, then re-runs the same eval against the governed agent to prove the rate dropped. |
Every eval starts from a risk, and you choose where it comes from. Clarity is recommended β it surfaces failure modes you haven't thought of, plus severity and causal chains β but it is never required. If you already know what you want measured, tell the skill directly, in your own words or by pointing it at a PRD, design doc, threat model, or incident report. Either way the skill holds the eval to the same bar: one atomic behavior per config, an explicit permissible boundary, and an explicit sample size.
ASSERT needs Python 3.11+. If you want Clarity's discovery step, you also need Python 3.12+ and an IDE with MCP support β VS Code + Copilot agent mode, Claude Code, or Cursor β because Clarity runs as an MCP server and can't be driven from a bare terminal.
pip install -e ".[phoenix]" # install ASSERT + local Phoenix trace collection
pip install -r examples/travel_planner_langgraph/requirements.txt
cp .env.example .env # add your provider key
assert-ai --help # verify
That is enough to run the skill with risks you describe yourself. To add Clarity's discovery front end:
pip install -e ".[mcp]" # from your clarity-agent checkout
clarity embed . # wires Clarity into this workspace
clarity doctor # verify an LLM provider is configured
Then reload MCP servers in your IDE and confirm the run_clarity tool is callable. clarity embed . generates .vscode/mcp.json and the .clarity-protocol/ scaffold β .vscode/mcp.json contains an absolute path to your checkout, so it is gitignored and never committed.
Full checklist, including end-to-end verification: SETUP-CHECKLIST.md.
Six worked domains under examples/ show the complete
agent, one-behavior-per-YAML configs, setup, and results flow:
| Domain | Target shape |
|---|---|
billing_support_agent | Python callable with tools β the best one to read first |
travel_planner_langgraph | LangGraph graph |
travel_planner_neurosan | Multi-agent network |
azure_doc_qa | Retrieval-grounded Q&A |
change_control_agent | Approval-workflow agent |
science_research_agent | Research agent |
The separate prompt_agents directory is a compact
target-shape gallery, not another worked domain. Worked examples keep only the
runtime files, atomic eval configs, and README needed to understand and run
them; generated discovery and result artifacts stay uncommitted.
Describe your agent in chat β what it does, what it can touch, and what it must never do:
Help me evaluate my billing support agent. Authenticated customers use it to check invoices, update payment methods, change plans, and request refunds up to $200. It can look up account/PII, issue refunds within policy, and escalate to a human. It must refuse legal/tax/financial advice, must not expose another customer's data, and must verify identity before high-risk actions (plan changes, cancellations, refunds).
That description is the shipped billing_support_agent example. The more precisely you state the boundaries, the sharper the risks β whether Clarity discovers them or you name them yourself.
If you already know the risk, name it in the same breath and that is your answer β the skill takes it and goes to triage, with no discovery step in between:
Help me evaluate my billing support agent for cross-customer data exposure β it must never reveal another customer's invoices or PII, even when the user insists the account is theirs.
Both openings start the same workflow. A PRD, design doc, threat model, incident report, or test plan works in place of the sentence.
The skill then, with you in the loop:
.clarity-protocol/ is offered as the default, never selected for you.Results are reported as two separate headline metrics, and it matters that they stay separate:
A change that only moves the first one is a win; a change that drops the first by pushing up the second has mostly moved the problem. Every stage writes local artifacts under artifacts/results/<suite>/<run>/, so nothing is locked in a dashboard.
For anything visual β forest plots, comparing two runs, or stepping through a transcript with the judge's citations highlighted β use the bundled viewer:
cd viewer && npm install && npm run dev # http://localhost:5174
When a run surfaces real failures, ask the skill to fix and verify them. Rather than tweaking the prompt and hoping, it generates a deployable ACS policy from the actual findings and re-runs the same eval against the governed agent, so the improvement is measured rather than asserted:
assert-ai acs generate ... # policy from the baseline findings
assert-ai acs validate ... # check it against known-bad cases
The delta between the baseline and governed runs is the evidence. This requires a callable target whose risky tools can be wrapped β a hosted-model prompt agent has nothing to wrap. See Securing agents with ACS.
The same skill ships for three assistants, plus the workflows it follows:
| Path | Purpose |
|---|---|
.claude/skills/run-assert-eval/ | Claude Code β SKILL.md is the canonical definition |
.github/prompts/run-assert-eval.prompt.md | GitHub Copilot |
.cursor/rules/assert.mdc | Cursor |
workflows/measure-clarity-failures.md | Risk source (Clarity or your own) β measurement loop |
workflows/govern-and-remeasure.md | ACS generation β governed re-run β delta |
workflows/diagnose-acs-delta.md | What to do when the delta comes out wrong |
python -m pip install --upgrade pip # requires pip >= 24.1
pip install -e ".[phoenix]" # install ASSERT + local Phoenix tracing
pip install -r examples/travel_planner_langgraph/requirements.txt
cp .env.example .env # add your provider key
assert-ai run --config examples/travel_planner_langgraph/evals/budget_overrun/eval_config.yaml
The pip upgrade is required on fresh devcontainers/base images: older pip
(< 24.1) crashes with InvalidVersion: 'hosting' while resolving one of the
Azure transitive dependencies' PEP 508 markers.
Use responsibleai/assert-ai-action to run ASSERT as a PR regression gate β it fails the build when a change makes agent behavior significantly worse.
Install the skills into your coding agent (Cursor, Claude Code, Copilot, and 40+ others). Two commands, because the bundle spans two repos on purpose β the evaluation skill is owned here in ASSERT and installed from here, so it never goes stale:
npx skills add responsibleai/ASSERT --skill run-assert-eval --yes
npx skills add responsibleai/assert-ai-action --skill wire-assert-ci --yes
Run them separately. skills add takes one package per invocation and silently ignores extras while still exiting 0, so a combined command looks like it worked and leaves you with half the bundle.
Then ask it to wire the gate:
Use the
wire-assert-ciskill to add an ASSERT safety gate to this repo.
No Node? Paste this instead β the agent fetches the skills itself:
read https://raw.githubusercontent.com/responsibleai/assert-ai-action/main/ONBOARD.md
See docs/ci/ for the short hand-off.
| π Project website β | π Technical blog β | π Quickstart guide β | π Documentation β |
|---|---|---|---|
| Learn about ASSERT | Read the Command Line post | Follow the full walkthrough | Browse concepts and guides |
ASSERT's core method is AI-assisted systematization β turning a broad, contested behavior concept into an explicit, measurable specification β following Agarwal et al. (2026), AI-Assisted Systematization for Evaluating GenAI Systems from Microsoft Research. The staged pipeline that turns that specification into generated scenarios, runs them against a target, and judges the results is modeled in spirit on the design of Bloom and Petri, open-source behavioral-evaluation frameworks from the Anthropic alignment team (Safety Research, MIT licensed).
Adapted third-party material and the corresponding license notices are documented in THIRD_PARTY_NOTICES.md. If you use ASSERT in research, please also cite Agarwal et al. (2026) and Bloom (see CITATION.cff).
ASSERT was built by the Microsoft Responsible AI organization.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos is subject to those third party's policies.
This project does not collect or send telemetry to Microsoft by default. Runs write local artifacts under artifacts/results/, and optional OpenTelemetry trace capture is controlled by your configuration and local collector setup, such as Phoenix.
If you configure a target, judge, trace collector, or model provider to send data to an external service, the prompts, responses, traces, metadata, and other evaluation artifacts sent to that service are governed by that service's terms and your configuration.
See the full section in the Concept Doc.
1,039 followers Β· starred Jul 2026
488 followers Β· starred Jun 2026
603 followers Β· starred Jun 2026
919 followers Β· starred Jun 2026
Requirement-driven evaluation harness for AI agents and LLM applications. Generate behavior-specific test cases, run them against any target (hosted models, callable wrappers, OTel-traced agents), and inspect local-first artifacts.
See the code
Adaptive Spec-driven Scoring for Evaluation and Regression Testing
Local-first. Framework-agnostic. Trace-aware.
π Get started | π Visit project website | π View supported targets | π CLI Reference | π§ͺ Examples | π Behavior Library
Most AI systems start with a specification: product requirements, policies, system prompts, or launch criteria describing what the system should and should not do.
But evaluation often starts elsewhere: generic scorers, predefined benchmarks, or manual test cases that drift from the original intent.
ASSERT closes that gap. It turns your specified behaviors in natural language into structured, executable evaluations that can be reviewed, run, scored, and improved over time.
From the natural language specification, the ASSERT pipeline derives behavior categories, generates single-turn and multi-turn test cases, inferences them against your target, and uses an LLM judge to score each conversation against your policies.
assert_ai/library/behaviors/) spanning safety, bias/fairness, and agentic failure modes β the single source of truth for common behaviors, so you often don't have to write one from scratch. Pair with the scenario library for ready-made application context.from assert_ai import auto_trace; auto_trace.enable() β or emit your own spans with the OTel SDK) so the judge can cite tool calls, routing, model calls, and latency as evidence β not just the final response.ASSERT has two front doors:
run-assert-eval skill (recommended) β describe your agent in chat. Your coding assistant starts from the risks you bring, or discovers them with you, then writes the eval configs, runs the pipeline, reports the failures, and can then generate a policy to fix them and prove the fix worked. No YAML by hand.eval_config.yaml yourself and run it.run-assert-eval skillThe skill turns "I think my agent might do something bad" into measured evidence, and then into a deployable control. It chains three pieces β where the risks come from is a choice you make, not a step you have to clear:
| Clarity | discovery β optional, recommended | An interviewing agent that walks you through what your system is for and where it could fail, and writes the risks down. Use it when you want risks surfaced for you; skip it entirely and name your own when you already know what to measure. |
| ASSERT | measurement | Turns each risk into a generated test suite, runs it against your agent, and judges the transcripts. |
| ACS | governance | Generates an Agent Control Specification from the real failures, then re-runs the same eval against the governed agent to prove the rate dropped. |
Every eval starts from a risk, and you choose where it comes from. Clarity is recommended β it surfaces failure modes you haven't thought of, plus severity and causal chains β but it is never required. If you already know what you want measured, tell the skill directly, in your own words or by pointing it at a PRD, design doc, threat model, or incident report. Either way the skill holds the eval to the same bar: one atomic behavior per config, an explicit permissible boundary, and an explicit sample size.
ASSERT needs Python 3.11+. If you want Clarity's discovery step, you also need Python 3.12+ and an IDE with MCP support β VS Code + Copilot agent mode, Claude Code, or Cursor β because Clarity runs as an MCP server and can't be driven from a bare terminal.
pip install -e ".[phoenix]" # install ASSERT + local Phoenix trace collection
pip install -r examples/travel_planner_langgraph/requirements.txt
cp .env.example .env # add your provider key
assert-ai --help # verify
That is enough to run the skill with risks you describe yourself. To add Clarity's discovery front end:
pip install -e ".[mcp]" # from your clarity-agent checkout
clarity embed . # wires Clarity into this workspace
clarity doctor # verify an LLM provider is configured
Then reload MCP servers in your IDE and confirm the run_clarity tool is callable. clarity embed . generates .vscode/mcp.json and the .clarity-protocol/ scaffold β .vscode/mcp.json contains an absolute path to your checkout, so it is gitignored and never committed.
Full checklist, including end-to-end verification: SETUP-CHECKLIST.md.
Six worked domains under examples/ show the complete
agent, one-behavior-per-YAML configs, setup, and results flow:
| Domain | Target shape |
|---|---|
billing_support_agent | Python callable with tools β the best one to read first |
travel_planner_langgraph | LangGraph graph |
travel_planner_neurosan | Multi-agent network |
azure_doc_qa | Retrieval-grounded Q&A |
change_control_agent | Approval-workflow agent |
science_research_agent | Research agent |
The separate prompt_agents directory is a compact
target-shape gallery, not another worked domain. Worked examples keep only the
runtime files, atomic eval configs, and README needed to understand and run
them; generated discovery and result artifacts stay uncommitted.
Describe your agent in chat β what it does, what it can touch, and what it must never do:
Help me evaluate my billing support agent. Authenticated customers use it to check invoices, update payment methods, change plans, and request refunds up to $200. It can look up account/PII, issue refunds within policy, and escalate to a human. It must refuse legal/tax/financial advice, must not expose another customer's data, and must verify identity before high-risk actions (plan changes, cancellations, refunds).
That description is the shipped billing_support_agent example. The more precisely you state the boundaries, the sharper the risks β whether Clarity discovers them or you name them yourself.
If you already know the risk, name it in the same breath and that is your answer β the skill takes it and goes to triage, with no discovery step in between:
Help me evaluate my billing support agent for cross-customer data exposure β it must never reveal another customer's invoices or PII, even when the user insists the account is theirs.
Both openings start the same workflow. A PRD, design doc, threat model, incident report, or test plan works in place of the sentence.
The skill then, with you in the loop:
.clarity-protocol/ is offered as the default, never selected for you.Results are reported as two separate headline metrics, and it matters that they stay separate:
A change that only moves the first one is a win; a change that drops the first by pushing up the second has mostly moved the problem. Every stage writes local artifacts under artifacts/results/<suite>/<run>/, so nothing is locked in a dashboard.
For anything visual β forest plots, comparing two runs, or stepping through a transcript with the judge's citations highlighted β use the bundled viewer:
cd viewer && npm install && npm run dev # http://localhost:5174
When a run surfaces real failures, ask the skill to fix and verify them. Rather than tweaking the prompt and hoping, it generates a deployable ACS policy from the actual findings and re-runs the same eval against the governed agent, so the improvement is measured rather than asserted:
assert-ai acs generate ... # policy from the baseline findings
assert-ai acs validate ... # check it against known-bad cases
The delta between the baseline and governed runs is the evidence. This requires a callable target whose risky tools can be wrapped β a hosted-model prompt agent has nothing to wrap. See Securing agents with ACS.
The same skill ships for three assistants, plus the workflows it follows:
| Path | Purpose |
|---|---|
.claude/skills/run-assert-eval/ | Claude Code β SKILL.md is the canonical definition |
.github/prompts/run-assert-eval.prompt.md | GitHub Copilot |
.cursor/rules/assert.mdc | Cursor |
workflows/measure-clarity-failures.md | Risk source (Clarity or your own) β measurement loop |
workflows/govern-and-remeasure.md | ACS generation β governed re-run β delta |
workflows/diagnose-acs-delta.md | What to do when the delta comes out wrong |
python -m pip install --upgrade pip # requires pip >= 24.1
pip install -e ".[phoenix]" # install ASSERT + local Phoenix tracing
pip install -r examples/travel_planner_langgraph/requirements.txt
cp .env.example .env # add your provider key
assert-ai run --config examples/travel_planner_langgraph/evals/budget_overrun/eval_config.yaml
The pip upgrade is required on fresh devcontainers/base images: older pip
(< 24.1) crashes with InvalidVersion: 'hosting' while resolving one of the
Azure transitive dependencies' PEP 508 markers.
Use responsibleai/assert-ai-action to run ASSERT as a PR regression gate β it fails the build when a change makes agent behavior significantly worse.
Install the skills into your coding agent (Cursor, Claude Code, Copilot, and 40+ others). Two commands, because the bundle spans two repos on purpose β the evaluation skill is owned here in ASSERT and installed from here, so it never goes stale:
npx skills add responsibleai/ASSERT --skill run-assert-eval --yes
npx skills add responsibleai/assert-ai-action --skill wire-assert-ci --yes
Run them separately. skills add takes one package per invocation and silently ignores extras while still exiting 0, so a combined command looks like it worked and leaves you with half the bundle.
Then ask it to wire the gate:
Use the
wire-assert-ciskill to add an ASSERT safety gate to this repo.
No Node? Paste this instead β the agent fetches the skills itself:
read https://raw.githubusercontent.com/responsibleai/assert-ai-action/main/ONBOARD.md
See docs/ci/ for the short hand-off.
| π Project website β | π Technical blog β | π Quickstart guide β | π Documentation β |
|---|---|---|---|
| Learn about ASSERT | Read the Command Line post | Follow the full walkthrough | Browse concepts and guides |
ASSERT's core method is AI-assisted systematization β turning a broad, contested behavior concept into an explicit, measurable specification β following Agarwal et al. (2026), AI-Assisted Systematization for Evaluating GenAI Systems from Microsoft Research. The staged pipeline that turns that specification into generated scenarios, runs them against a target, and judges the results is modeled in spirit on the design of Bloom and Petri, open-source behavioral-evaluation frameworks from the Anthropic alignment team (Safety Research, MIT licensed).
Adapted third-party material and the corresponding license notices are documented in THIRD_PARTY_NOTICES.md. If you use ASSERT in research, please also cite Agarwal et al. (2026) and Bloom (see CITATION.cff).
ASSERT was built by the Microsoft Responsible AI organization.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos is subject to those third party's policies.
This project does not collect or send telemetry to Microsoft by default. Runs write local artifacts under artifacts/results/, and optional OpenTelemetry trace capture is controlled by your configuration and local collector setup, such as Phoenix.
If you configure a target, judge, trace collector, or model provider to send data to an external service, the prompts, responses, traces, metadata, and other evaluation artifacts sent to that service are governed by that service's terms and your configuration.
See the full section in the Concept Doc.
1,039 followers Β· starred Jul 2026
488 followers Β· starred Jun 2026
603 followers Β· starred Jun 2026
919 followers Β· starred Jun 2026