Waza
repository·main·Indexed 22 days ago
https://github.com/microsoft/wazaA Go-based CLI tool for evaluating AI agent skills. Waza enables developers to scaffold evaluation suites, run benchmarks, compare model performance, and perform adversarial testing. It features a flexible grading system including inline graders (code and text), program graders for complex logic, and prompt graders compatible with Azure AI Evaluation SDK patterns. It also supports trigger tests to measure skill activation accuracy, precision, and recall.
What's inside waza
- Waza is a unified CLI platform designed for creating, testing, and evaluating AI agent skills. It provides a complete developer experience for building compliant skills across different domains and platforms, automating the workflow from scaffolding to cross-model evaluation.
Overview of available Waza example suites
mainThe
examples/directory contains several specialized suites to demonstrate different Waza capabilities:Example Purpose Key Features code-explainer Real-world skill evaluation Multi-language testing, custom script graders, YAML task organization grader-showcase Learning grader types Demonstrates code,regex,file,behavior, andaction_sequencegradersci CI/CD integration GitHub Actions workflows, matrix testing, and result reporting custom-agent VS Code agent evaluation Targets .agent.mdfiles and uses auto-injectedtool_constraintgradersrequired-skills-demo Dependency validation Demonstrates required_skillspreflight validationrubrics Prompt-based evaluation Uses promptgraders with pre-built rubrics for tool call accuracy and intentrepo-resources Git repository integration Uses inputs.reposwithworktreestrategy to isolate task workspacesRun evaluations on Agent Skills with waza-runner
mainThe
waza-runnerskill is used to measure the effectiveness of Agent Skills. It evaluates whether a skill triggers correctly on prompts, its behavior quality (tool calls, reasoning, efficiency), and its ability to complete tasks. Use this for quality evaluations, testing triggers, and generating reports for CI/CD pipelines.Workflow:
- Check for Eval Suite: Ensure an
eval.yamlexists in the skill directory. - Load Tasks: The runner parses task definitions from
tasks/*.yaml. - Execute: Tasks are run through configured graders (Code, LLM, or Human).
- Report: Results are output in JSON or Markdown format.
- Check for Eval Suite: Ensure an
Overview of Waza Graders
mainGraders in Waza are used to evaluate skill execution and produce quantitative and qualitative results. Every grader returns a standardized set of data:
score: A numerical value from0.0to1.0.passed: Abooleanindicating if the evaluation criteria were met.feedback: Human-readable text describing the result.details: Additional metadata related to the evaluation.
Graders can be defined globally in
eval.yamlor specifically for individual tasks.Overview of the Waza CLI workflow
mainWaza is a unified CLI platform built in Go designed for creating, testing, and evaluating AI agent skills (specifically for the
microsoft/skillsrepository). The developer workflow follows a structured lifecycle:init: Initialize new evaluation suites.new: Scaffold new skill structures.dev: Enter an iterative improvement loop using the Sensei engine for compliance scoring.run: Execute evaluations by parsingeval.yamland running tasks.compare: Compare results across different models to generate comparison reports.
Configure a responder for interactive skills
mainFor skills that require follow-up questions, you can configure a
responder. The responder is an LLM that simulates a user to interact with the skill. This is mutually exclusive withfollow_up_prompts.During a run, the responder can:
- reply: Sends an answer back to the agent to continue the conversation.
- stop: Signals the agent is finished.
- abstain: Fails the run with an
abstainedoutcome, indicating the prompt was too vague.
If the agent exceeds
max_followups, the loop stops with thecap_exhaustedoutcome.Fields (under
inputs.responder):instructions(required): The target configuration the responder represents and the rules for when it should abstain.max_followups(required): Maximum number of responder replies before the loop stops (must be>= 1).model(optional): The model used for the responder LLM. Defaults toconfig.model.
# task.yaml inputs: prompt: "Add a new agent to my application" responder: model: gpt-4o # optional; defaults to config.model instructions: | The agent you want is "research-agent" with system instructions "Search the web and summarise findings", tools web_search + url_fetch, and no handoffs. Answer the skill's questions consistently with this. If you genuinely can't infer an answer, abstain. max_followups: 8Classify skills using prefixes
mainTo ensure the LLM correctly routes user requests, include a classification prefix in your skill description. Use one of the following three types:
**WORKFLOW SKILL**: For multi-step orchestration (e.g., deployment pipelines, setup wizards).**UTILITY SKILL**: For single-purpose helpers (e.g., code explanation, formatting).**ANALYSIS SKILL**: For read-only analysis or reporting (e.g., security audits, code review).
Define an Evaluation Specification (Eval Spec)
mainWaza uses YAML-based evaluation specifications to define how skills and tasks are tested. An eval spec includes metadata (name, skill, schemaVersion), configuration for execution (trials, timeouts, models), input variables, lifecycle hooks, MCP mocks, graders, and task definitions.
Key configuration options include:
config.executor: Set tomockorcopilot-sdk.config.max_attempts: Number of retries for failed graders (default: 1).config.instruction_files: List of.mdfiles to append to the agent's system message.config.group_by: Dimension to organize results (e.g.,model).tasks: Glob patterns (e.g.,tasks/*.yaml) or atasks_fromCSV source.
name: my-eval skill: my-skill schemaVersion: "1.2" version: "1.0" config: trials_per_task: 3 max_attempts: 3 timeout_seconds: 300 parallel: false executor: mock model: claude-sonnet-4-20250514 group_by: model instruction_files: - .github/instructions/project.instructions.md inputs: api_version: v2 tasks: - "tasks/*.yaml"Ensuring reproducibility with waza.lock
mainTo ensure reproducibility, offline use, and supply-chain verification, Waza uses a
waza.lockfile. This file is used to:- Lock specific versions and digests.
- Prevent issues caused by floating versions or mutable Git tags.
- Provide a source of truth that the resolver uses to validate modules.
Understand the Waza Grader Protocol (WGP/1)
mainWGP/1 is a standardized JSON protocol used by registry-distributed graders to ensure interoperability regardless of the runtime. Whether a grader is running as a WASM module or an external program, it communicates using this schema over stdin/stdout (for programs) or a thin host ABI (for WASM).
Request Format (sent by Waza): Contains the task details, agent output (including tool calls and files written), effective configuration, and execution context.
Response Format (returned by Grader): Contains the score, a pass/fail boolean, a rationale string, evidence (spans), and custom metrics.
This protocol allows a prototype (e.g., written in Python as a
runtime: program) to be converted into a sandboxed WASM artifact later without changing the specification.### Request Example ```json { "schema": "wgp/1", "task": { "id": "task-42", "input": "...", "expected": "..." }, "agent": { "output": "...", "tool_calls": [ { "name": "...", "arguments": { } } ], "files_written": [ { "path": "...", "sha256": "..." } ] }, "config": { /* effective deep-merged config */ }, "context": { "workspace_dir": "/tmp/waza-xxx", "trial": 1 } }Response Example
{ "schema": "wgp/1", "score": 0.83, "passed": true, "rationale": "Found 3 of 4 expected facts; missed citation for claim #2.", "evidence": [ { "kind": "span", "ref": "agent.output[120..180]" } ], "metrics": { "fact_recall": 0.75, "fact_precision": 1.0 } }Materialize Git repositories in tasks using the worktree strategy
mainYou can materialize a clean copy of a local git repository into a task's workspace using the
worktreestrategy. This is useful for testing skills against a specific local codebase without manual staging. Waza usesgit worktree add --detachto create an isolated, cheap checkout that shares the same.gitobject store as the source.To use this, define a
reposlist in yourtask.yamlunderinputs. You can also set an optionalworkdir(relative to the workspace) to specify where the agent should start its execution, typically matching thedestpath.# task.yaml id: my-task name: Repo-aware task inputs: prompt: "Explain the layout of this repository" workdir: my-repo # optional: where the agent starts (relative to workspace) repos: - type: worktree # required; only "worktree" is currently supported source: /path/to/local/clone # required; local git repo to source from commit: main # optional: commit SHA, branch, or tag (defaults to HEAD) dest: my-repo # optional: subdir under workspace (omit to use workspace root)When statistical fields appear in evaluation results
mainWaza performs statistical analysis to quantify result reliability only when specific conditions are met. If these conditions are not met, statistical fields like
bootstrap_cioris_significantwill be omitted from the results JSON.Statistical fields are computed when:
trials_per_task > 1is configured in your evaluation YAML.- Multiple results are aggregated.
- Comparison analysis is performed.
Single-trial runs skip all statistical analysis.