← All guides AI Release
RU Subscribe to @ai_release1

Auditing an AI agent in 120 seconds: 32 checks and an A–F grade

Updated: 05.11.2026 · AI Release · @ai_release1
Auditing an AI agent in 120 seconds: 32 checks and an A–F grade

TL;DR

Requirements and setup

Illustration: Requirements and setup
Illustration: Requirements and setup

Pre-flight checklist — do not start the scan until every box is ticked:

curl --version | head -n 1
jq --version
test -n "$AGENT_API_KEY" && echo "key present" || echo "key missing"

Why this works: the first two lines prove the tooling exists, the third proves the key reached the shell — all three failures below are caught here before you spend the 120 seconds.

Example: jq --version prints jq-1.7.1; if it prints command not found, install jq first.

Step 1. Freeze the agent under test

What to do: record the exact version of the agent, snapshot its config, and confirm the endpoint answers before the audit starts.

export AGENT_ENDPOINT="https://agent-staging.example.com"
export AGENT_API_KEY="$(cat ~/.secrets/agent-staging.key)"

RUN_DIR="audit/$(date +%F)"
mkdir -p "$RUN_DIR"

curl -sS -o /dev/null -w "%{http_code}\n" \
  -H "Authorization: Bearer $AGENT_API_KEY" \
  "$AGENT_ENDPOINT/health"

cp agent.config.yaml "$RUN_DIR/agent.config.yaml"
git rev-parse --short HEAD > "$RUN_DIR/commit.txt"

Why: an A–F grade is meaningless without a baseline. When you fix a finding and re-run, the only thing that must change between the two reports is the agent, not the endpoint or the prompt.

How to check: curl prints 200; ls "$RUN_DIR" shows agent.config.yaml and commit.txt.

Example: if your agent's prompt and tools live in a folder tree, mirror that layout in RUN_DIR — a naming convention for those folders is described in ICM in practice: a folder structure that keeps agents manageable.

Step 2. Run the 32-check audit

Illustration: Step 2. Run the 32-check audit
Illustration: Step 2. Run the 32-check audit

What to do: start the scan against the frozen endpoint, hand it the credentials, and let the full check set — 32 checks — run. The scan window is 120 seconds; if your run goes past it, the run is not finished, not "slow but fine".

The scan needs exactly four inputs, whether you use the console or the CLI:

InputValue in this guideNote
Target`$AGENT_ENDPOINT`the frozen staging URL from Step 1
Credential`$AGENT_API_KEY`read-only key, passed by reference to the env var
Check setall 32 checkspartial sets give a grade you cannot compare
Output`audit/<date>/report.json`one file per run, never overwrite
# Template. Command name and flag spelling differ between iFixAi versions —
# take the exact string from the documentation, keep the four inputs above.
<ifixai-command> scan \
  --target "$AGENT_ENDPOINT" \
  --api-key-env AGENT_API_KEY \
  --checks all \
  --output "$RUN_DIR/report.json"

Why: running the full 32 checks in one pass is what makes the grade comparable across runs; a partial scan moves the letter without moving the agent.

How to check: the report file exists and is not empty:

test -s "$RUN_DIR/report.json" && echo "report written"
jq 'keys' "$RUN_DIR/report.json"

Example: jq 'keys' lists the top-level fields of your report — for instance the grade and the array of individual checks. Use exactly the names it prints in Step 3; field names are version-specific, so check the documentation rather than copying names from another team's script.

While the scan runs, do not touch the system prompt, the tool list, or the model setting. A report that mixes two configs cannot be reproduced.

Step 3. Read the grade, triage findings, verify with a re-run

Illustration: Step 3. Read the grade, triage findings, verify with a re-run
Illustration: Step 3. Read the grade, triage findings, verify with a re-run

What to do: read the A–F grade, pull out every check that did not pass, fix in order of severity, then re-run the same command against the same endpoint.

# Adjust the field names to the ones printed by `jq 'keys'` above.
jq -r '.checks[] | select(.status != "pass") | [.severity, .id, .title] | @tsv' \
  "$RUN_DIR/report.json" | sort

Then re-run Step 2 into a new folder and compare:

ls audit/
jq 'keys' audit/2026-01-15/report.json
jq 'keys' audit/2026-01-22/report.json

Why: the grade is a summary; the fix list is the work. Comparing two reports from the same endpoint is the only proof that a finding is actually closed.

Grade bands and what they mean for your next action — the exact score cut-offs are printed in your report legend, check the documentation:

GradeReadingAction
ANo blocking findingsShip, keep the report as a baseline
BMinor findingsFix in the current sprint, re-run
CSeveral findingsFix before release, re-run required
DSerious findingsBlock release, fix, re-run
FCritical findingsStop, treat as an incident

How to check: the number of non-passing checks drops between the two reports, and the grade moves up or stays. If the count is identical, the fix did not reach the running agent — redeploy, then re-run.

Example: first run returns grade D with findings in tool permissions; you restrict the tool list, redeploy, re-run, and the same check now reports pass and the grade moves to B. Two JSON files sit side by side in audit/.

Troubleshooting

Problem. The scan cannot reach the agent endpoint.

Problem. The scan starts but every request is rejected.

Problem. The command exits but no report appears.

Summary and next steps

Freeze the agent, run all 32 checks against that frozen endpoint, and read the A–F grade together with the list of non-passing checks rather than the letter alone. Keep every report in its own dated folder so the next run proves the fix — then wire the same command into CI, and read Designing AI systems: components, diagrams and common pitfalls before you add more tools to the agent.

FAQ

How long does an iFixAi audit take?

The scan itself is the 120-second run; the full procedure above takes about 15 minutes on a first pass because of setup, snapshotting, and reading the report.

Do I need production credentials for the audit?

No. Use a read-only key against a staging endpoint. The audit sends real requests to the agent, so production keys add risk without improving the grade.

What exactly do the 32 checks test?

The report lists each check by name and ID. The current list changes between versions — check the documentation, and use jq 'keys' on your own report to see what your version returned.

Can I run the audit automatically in CI?

Yes, if your iFixAi access is a CLI. Confirm the exit-code behaviour in the documentation first, then gate the pipeline on the failing-check count instead of the letter grade.

🤖 AI summary