---
name: agent-audit
description: >-
  Check how ready a product is for AI agents with agent-audit
  (https://agent-audit.multihead.dev). Use when you build or ship an agent-first product
  (an HTTP API, MCP server, or skill) and need to know whether agents can find
  it, understand it, make a first call, get a key, and use it reliably, or what
  changed since the last check. Keyless HTTP; curl is enough.
---

# agent-audit

One URL in. One JSON report out: six stages, the first blocker, and honest fixes. No key, no signup, no combined score.

## 1. Quick check (hosted, about a minute)

```bash
curl -sS 'https://agent-audit.multihead.dev/v0/assess?url=https://example.com'
```

Read `headline.first_blocker` (the earliest stage that fails, or is partial on an essential check; `null` when nothing blocks), then `fixes` in order (essential first, then in journey order). Each stage is `pass`, `partial`, `fail`, `not_measured`, or `n_a`. Branch on these fields, not on the prose. Add `&format=md` for a markdown report.

Every report also has `personal_agents` (where Meta Muse, OpenAI Dots, Claude Duet and xAI Grok Bot would first stop, predicted from the probes) and `handoff` (a prompt and a checklist: what you can fix, and what needs your person, such as account creation, payments, CAPTCHAs, and directory paperwork).

## 2. Deeper: publish a manifest

Publish `/.well-known/agent-audit.json` on the product's host, or POST it:

```bash
curl -sS -X POST https://agent-audit.multihead.dev/v0/assess -H 'content-type: application/json' \
  -d '{"url":"https://example.com","manifest":{"manifest_version":"0.1","first_call":{"method":"GET","path":"/api/search?q=test","success":{"status":[200],"json_field_in":{"ok":[true]}},"bad_call":{"path":"/api/search"}},"auth":{"type":"none"}}}'
```

- `first_call`: one GET that works with no key, and what success looks like (status, plus top-level or dotted JSON fields).
- `bad_call`: a GET that should fail with a 4xx (for example, the first call without its inputs). It tests the error contract.
- `auth.type`: `none`, `api_key` (add `header`), or `oauth`.
- `understanding`: the answers a cold agent should give (endpoint_path, methods, required_inputs, key_required, rate_limited). Full mode grades against it.
- `asks`: 2–4 realistic asks a person would give an agent, without naming the product.
- `connector` (optional): your MCP server for the directory preflight. `{ url, auth, privacy_url, terms_url, support_url, docs_url, repo, countries, tools }`, where `tools` is your `tools/list` result (name, title, annotations, inputSchema). agent-audit checks it against the Claude, ChatGPT, Muse and Cursor rules (https://agent-audit.multihead.dev/v0/rules) and never connects to the server.

Schema: https://agent-audit.multihead.dev/schema/manifest.json. Never put a key in a manifest.

## 3. Full: cold agents (you run them)

Hosted checks are probes, not agents. To measure real agent behaviour, run the **ask-pair** yourself.

For each ask:

1. **Unhinted run.** Start a brand-new subagent with no memory, no repo context, and no mention of the product. Give it only the ask. Let it search and work.
2. **Hinted run.** Start another brand-new subagent. Give it the ask plus only the bare URL (`https://host`). Before its first call, it records an understanding form: `endpoint_path`, `methods`, `required_inputs`, `key_required`, `rate_limited`.
3. Discard each subagent after its run. Never resume or reuse one. If you cannot start a truly empty subagent, stop and say so.
4. Write one record per run (schema: https://agent-audit.multihead.dev/schema/journey.json). `agent_label` must start with `generic cold agent`, for example `generic cold agent — <model>`.

Definitions:

- `found`: the product's host, docs, OpenAPI, llms.txt, MCP, or API appeared in results or was fetched.
- `picked`: the agent used it as its main tool for the ask. Mentioning it is not picking. Requires `found`.
- `called`: the agent sent an HTTP or MCP request to it.
- `call_succeeded`: that request returned a usable answer. Requires `called`.
- `cited`: the final answer cites it as a source.
- `human_needed`: a person had to sign up, supply a key, pass a captcha, or approve something before the first call (`human_needed_reason`: signup, key, captcha, other).
- `errors_hit` / `errors_recovered`: errors from the product, and how many the agent fixed from the error body alone.
- `access` (only when a key was needed): `{ key_needed, obtained, human_touches: [signup, email_verify, captcha, dashboard_copy, payment, approval, other] }`.

Then score:

```bash
curl -sS -X POST https://agent-audit.multihead.dev/v0/score -H 'content-type: application/json' \
  -d '{"url":"https://example.com","journeys":[ ... ],"manifest":{ ... },"previous":{ ... }}'
```

Pass `assessment` (a report from step 1) to reuse the hosted checks instead of probing again. Rates come with a Wilson interval and only when an ask has at least 5 runs; with fewer runs, read the per-run journeys.

## 4. Monitor

- Save each report as `.agent-audit/reports/<generated_at>.json` in the product's repo.
- Next run, pass the latest one as `previous`. The report then has a `diff` (stage changes, regressions, new and resolved fixes, latency, shape drift), and the Stay healthy stage passes only with no regressions.
- In CI, run it on every release and fail the job on a regression (Stay healthy `fail`):

```bash
mkdir -p .agent-audit/reports
prev=$(ls .agent-audit/reports/*.json 2>/dev/null | tail -1)
if [ -n "$prev" ]; then body=$(jq -n --arg url "$URL" --slurpfile p "$prev" '{url: $url, previous: $p[0]}'); else body=$(jq -n --arg url "$URL" '{url: $url}'); fi
curl -sS -X POST https://agent-audit.multihead.dev/v0/assess -H 'content-type: application/json' -d "$body" -o report.json
jq -e '.report_version' report.json > /dev/null   # an error body has no report_version
cp report.json ".agent-audit/reports/$(jq -r .generated_at report.json | tr ':' '-').json"
jq -e '[.stages[] | select(.id == "healthy" and .result == "fail")] | length == 0' report.json
```

## Errors

JSON everywhere: `{ ok: false, code, message, retryable, fix }`.

| HTTP | code | What to do |
| --- | --- | --- |
| 400 | missing_url, invalid_url, target_not_allowed, invalid_json, invalid_range | Fix the input. Public https hostnames only. |
| 413 | body_too_large | Send less (bodies up to 1 MB). |
| 422 | invalid_manifest, invalid_journeys, invalid_previous, invalid_assessment | Fix the listed fields. |
| 404 | not_found, no_stored_report | Check the path; stored reports exist only for agent-audit's own dogfood targets. |
| 405 | method_not_allowed | Use the method in the Allow header. |
| 429 | rate_limited, target_rate_limited | Wait for Retry-After (per-IP limit, or per-host probe limit). |
| 508 | loop_detected | agent-audit does not assess through its own probes. |
| 503, 500 | busy, internal_error | Retry after a short wait. |

## Rules

- Honest fixes only: clearer docs, SKILL.md, llms.txt, OpenAPI, structured data, real listings. No keyword stuffing, fake listings, or spam.
- Do not bot-drive consumer chat apps (chatgpt.com, claude.ai, grok.com, Muse). Use your own agent runs.
- Do not put keys or personal data in manifests or records.
- Hosted checks are HTTP probes from agent-audit's server: not a consumer app and not a real agent. Journeys are labelled generic cold agent, not the consumer app.
