agent-qa
Skill36 starsChanged 7 months agoMITView on GitHub
End-to-end QA testing for Agent2 agents. Starts the agent service, sends real API requests from eval datasets, validates responses against the output schema, and generates a health report with confidence stats. Use when asked to "test this agent", "QA the agent", "does this agent work", or "run agent health check".
- Sends data out
In this repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- llms-full.txtllms.txt
- llms.txtllms.txt
- adding-capabilitiesSkill
- adding-knowledgeSkill
- agent-qaSkill
- brain-cloneSkill
- building-domain-expertsSkill
- creating-agentsSkill
- debugging-agentsSkill
- scandal-market-agent-builderSkill
- adding-capabilitiesSkill
- adding-knowledgeSkill
- agent-qaSkill
- brain-cloneSkill
- building-domain-expertsSkill
- creating-agentsSkill
- debugging-agentsSkill
- scandal-market-agent-builderSkill
- adding-capabilitiesSkill
- adding-knowledgeSkill
- brain-cloneSkill
- building-domain-expertsSkill
- creating-agentsSkill
- debugging-agentsSkill
- scandal-market-agent-builderSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
After generating a new agent with /brain-clone or /creating-agents
- Distinctive: line 13
After changing an agent's prompt, tools, or schema
- Distinctive: line 14
Before shipping an agent to production
- Distinctive: line 15
When debugging unexpected agent behavior
- Distinctive: line 21
Ask which agent to test if not obvious from context:
- Distinctive: line 29
Check for existing eval datasets:
- Very specific: line 42
If NO_EVAL_DATASET: generate test cases from the agent's example cases in config.yaml and the prompt in agent.py.
- Distinctive: line 115
If the agent has operational learnings, show them:
- Distinctive: line 129
If we started the agent in Step 3:
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent QA
End-to-end testing for a deployed or locally running Agent2 agent.
When to Use
- After generating a new agent with
/brain-cloneor/creating-agents - After changing an agent's prompt, tools, or schema
- Before shipping an agent to production
- When debugging unexpected agent behavior
Workflow
Step 1: Identify the agent
Ask which agent to test if not obvious from context:
ls agents/*/config.yaml 2>/dev/null | sed 's|agents/||;s|/config.yaml||'Step 2: Load test cases
Check for existing eval datasets:
AGENT_NAME="<agent-name>"
EVAL_FILE="tests/promptfoo/$AGENT_NAME/dataset.json"
if [ -f "$EVAL_FILE" ]; then
echo "EVAL_FOUND: $EVAL_FILE"
cat "$EVAL_FILE"
else
echo "NO_EVAL_DATASET"
fiIf NO_EVAL_DATASET: generate test cases from the agent's example cases in
config.yaml and the prompt in agent.py. Create at least 3 cases:
- A case that should return the primary complete outcome
- An empty/incomplete case that should trigger needs_clarification
- A case with a defect that should trigger rejected (if applicable)
Step 3: Start the agent
# Check if already running
AGENT_PORT=$(grep "port:" "agents/$AGENT_NAME/config.yaml" | awk '{print $2}')
curl -s "http://localhost:$AGENT_PORT/health" 2>/dev/null && echo "ALREADY_RUNNING" || echo "NEEDS_START"If NEEDS_START:
uv run agent2 serve "$AGENT_NAME" &
AGENT_PID=$!
sleep 3
curl -s "http://localhost:$AGENT_PORT/health"Step 4: Run test cases
For each test case, send a real POST /tasks request:
curl -s -X POST "http://localhost:$AGENT_PORT/tasks?mode=sync" \
-H "Authorization: Bearer dev-token-change-me" \
-H "Content-Type: application/json" \
-d '{"input": <test-case-input>}'For each response, validate:
- HTTP status is 200
- Response contains
"status": "completed" resultis present and contains the expected schema fieldsresult.statusmatches expected outcome (if specified in test case)result.confidenceis a number between 0 and 1result.reasoningis non-emptyresult.review_stepsis a non-empty list- Schema consistency: no contradictory fields (e.g., complete + rejection_reason)
Step 5: Generate health report
AGENT QA REPORT: {agent-name}
═══════════════════════════════════════
Tests run: {total}
Passed: {passed}
Failed: {failed}
| # | Case | Expected | Got | Confidence | Pass |
|---|------|----------|-----|------------|------|
| 1 | ... | complete | complete | 0.87 | ✓ |
| 2 | ... | clarification | clarification | 0.65 | ✓ |
| 3 | ... | rejected | complete | 0.45 | ✗ |
Confidence stats:
Mean: {mean}
Min: {min}
Max: {max}
<0.85: {count} ({pct}%)
Issues found:
- {issue description}
Recommendation: {SHIP / FIX_BEFORE_SHIP / NEEDS_WORK}Step 6: Check learnings
If the agent has operational learnings, show them:
LEARN_FILE="$HOME/.agent2/learnings/$AGENT_NAME.jsonl"
if [ -f "$LEARN_FILE" ]; then
echo "LEARNINGS:"
tail -10 "$LEARN_FILE"
else
echo "No learnings yet (agent hasn't processed real cases)"
fiStep 7: Cleanup
If we started the agent in Step 3:
kill $AGENT_PID 2>/dev/nullCompletion Status
Report status as:
- PASS — all tests passed, confidence healthy
- PASS_WITH_CONCERNS — tests passed but confidence is low or edge cases untested
- FAIL — test failures found, list what's broken
- BLOCKED — agent couldn't start or API unreachable
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

