New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@agentbadge/scanner

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agentbadge/scanner

Agent Readiness Scanner CLI — scans websites for AI agent readiness resources

latest
npmnpm
Version
0.3.1
Version published
Weekly downloads
18
-37.93%
Maintainers
1
Weekly downloads
 
Created
Source

@agentbadge/scanner

Agent Readiness Scanner — scans websites for AI agent readiness resources, scores them across 4 pillars, and produces signed integrity reports.

npm version license

Install

npm install @agentbadge/scanner
# or
bun add @agentbadge/scanner
# or
yarn add @agentbadge/scanner

CLI Usage

scan

Scan a URL for agent readiness and produce a signed report.

# Basic scan
agentbadge-scan scan https://agentbadge.xyz/

# Force refetch all resources
agentbadge-scan scan https://agentbadge.xyz/ --no-cache

# Output as JSON only
agentbadge-scan scan https://agentbadge.xyz/ --json

# Output format: pretty (default), table, all, json
agentbadge-scan scan https://agentbadge.xyz/ --format table

# Custom report output path
agentbadge-scan scan https://agentbadge.xyz/ --output ./my-report.json

# Skip Ed25519 signing (dev mode)
agentbadge-scan scan https://agentbadge.xyz/ --skip-sign

# Enable anonymous telemetry (opt-in)
agentbadge-scan scan https://agentbadge.xyz/ --telemetry

# Run Lighthouse audit (requires Chrome)
agentbadge-scan scan https://agentbadge.xyz/ --lighthouse

# Generate premium PDF report (requires Chrome/Chromium)
agentbadge-scan scan https://agentbadge.xyz/ --pdf
agentbadge-scan scan https://agentbadge.xyz/ --pdf --pdf-output ./my-report.pdf
agentbadge-scan scan https://agentbadge.xyz/ --pdf --chrome-path /usr/bin/chromium-browser

# Limit resources to fetch
agentbadge-scan scan https://agentbadge.xyz/ --resources robots,sitemap,openapi

badge

Generate an SVG badge from a report.

agentbadge-scan badge agentbadge-report.json
agentbadge-scan badge agentbadge-report.json --output badge.svg --label "agent readiness"

fix

Generate fix suggestions from a report.

agentbadge-scan fix agentbadge-report.json
agentbadge-scan fix agentbadge-report.json --dry-run
agentbadge-scan fix agentbadge-report.json --output fix-suggestions.json

verify-report

Verify the integrity signature of a report.

agentbadge-scan verify-report agentbadge-report.json

Programmatic Usage

import {
  scanDomain,
  RuleEngine,
  runScoringEngine,
  assembleReport,
  getScanResult,
  AGENT_READINESS_RULESET,
  RULE_DESCRIPTIONS,
  PILLAR_DESCRIPTIONS,
  CATEGORY_DESCRIPTIONS,
  PILLARS,
  CATEGORY_TO_PILLAR,
  computeGrade,
} from "@agentbadge/scanner";

// Scan a domain
const sourceState = await scanDomain("https://agentbadge.xyz/");

// Run rule engine
const ruleResult = RuleEngine.run(sourceState);

// Run scoring engine (v2-pillars model)
const scoreResult = runScoringEngine({
  assertions: ruleResult.assertions,
  rulesetManifest: AGENT_READINESS_RULESET,
});

// Assemble signed report
const report = assembleReport({
  scope: { agent_id: "my-agent", agent_version: "1.0.0", endpoint_base_url: "https://agentbadge.xyz/" },
  assertions: ruleResult.assertions,
  scoreResult,
  previousHash: null,
  keyId: "my-key-id",
});

// Get structured scan result as JSON
const scanJson = await getScanResult("https://agentbadge.xyz/", { noCache: true });

Ruleset

159 rules (AB-001 through AB-160) across 17 categories and 4 pillars. Ruleset version: 2.0.0.

Categories

CategoryPillarDescription
discoveryDiscoveryrobots.txt, sitemap.xml, agent-guide.json
machine_readableDiscoveryStructured data, JSON-LD, semantic HTML
openapiDiscoveryOpenAPI spec presence and quality
skillsDiscoveryAgent skills, .well-known/ai-plugin.json
agents_txtDiscoveryagents.txt protocol
webmcpDiscoveryWebMCP server descriptor
content_negotiationDiscoveryContent negotiation for AI agents
seo_aeoDiscoverySEO/AEO meta tags, OpenGraph
documentationUnderstandabilityAPI docs, llms.txt, ai.txt
actionabilityUnderstandabilityActionable instructions for agents
accessibilityUnderstandabilityWCAG, screen-reader compatibility
pricingUnderstandabilitypricing.json endpoint
rate_limitsUnderstandabilityRate limit headers and docs
bot_authExecutabilityBot authentication mechanisms
identityExecutabilityIdentity verification, owner proof
paymentsExecutabilityPayment protocols (L402, x402)
bazaarExecutabilityMarketplace listing, agent card
error_semanticsExecutabilityError response schemas
retry_semanticsExecutabilityRetry headers and policies
sandboxExecutabilitySandbox/test mode availability
versioningExecutabilityAPI versioning strategy
verificationVerifiabilityVerification mechanisms
infrastructureVerifiabilityInfrastructure reliability, DNS
active_probingVerifiabilityActive probing endpoints
agent_policyVerifiabilityAgent policy declarations

Pillars

PillarWeightQuestion
Discovery20%Can an agent find you?
Understandability25%Can an agent understand you?
Executability30%Can an agent act on your API?
Verifiability25%Can an agent verify what it observed?

Scoring

The scanner uses a 4-pillar scoring model (v2):

  • Each category receives a score (0–100) based on assertion statuses (VERIFIED=1.0, INFERRED=0.7, CONFLICT=0.0, GAP=0.0, NOT_APPLICABLE=0.0).
  • Category scores are grouped into pillars by CATEGORY_TO_PILLAR mapping.
  • Each pillar score is the weighted average of its category scores.
  • The overall score is the weighted average of pillar scores (weights: Discovery 20%, Understandability 25%, Executability 30%, Verifiability 25%).
  • Floor caps apply: high-severity GAPs in discovery/documentation cap the score at 40; critical-severity GAPs cap at 30.
  • A letter grade (A–F) is assigned based on the final score.

Rule Descriptions

Every rule has a detailed description with rule_id, category, icon, title, short_description, user_value, wrong_example, right_example, effort_hint, and estimated_cost. Access via:

import { RULE_DESCRIPTIONS, PILLAR_DESCRIPTIONS, CATEGORY_DESCRIPTIONS } from "@agentbadge/scanner";

Resource Fetchers

48 resource fetchers scan for:

robots.txt, sitemap.xml, agent-guide.json, OpenAPI spec, llms.txt, ai.txt, agents.txt, .well-known/ai-plugin.json, WebMCP descriptor, JSON-LD, OpenGraph, semantic HTML, pricing.json, auth metadata, OAuth endpoints, L402/x402 headers, DNS AID, identity proofs, agent cards, skill files, accessibility reports, content negotiation, favicons, RSS feeds, link headers, MCP server.json, content depth, operational discovery, and more.

Output Formats

  • pretty — Human-readable terminal output with category grouping (default)
  • table — Compact table format
  • json — Machine-readable JSON to stdout
  • all — All formats combined
  • PDF — Premium PDF report (requires Chrome/Chromium)

Configuration

OptionCLI FlagDescription
No cache--no-cacheForce refetch all resources
Format--format <pretty|table|all|json>Output format
Output path--output <path>Custom report file path
Skip signing--skip-signSkip Ed25519 signing (dev mode)
Telemetry--telemetryEnable anonymous usage telemetry
Lighthouse--lighthouseRun Lighthouse audit (requires Chrome)
PDF--pdfGenerate PDF report (requires Chrome)
Chrome path--chrome-path <path>Path to Chrome/Chromium
Resources--resources <list>Comma-separated resource filter

Feedback & Contact

Have questions, suggestions, or found a bug? We'd love to hear from you.

License

MIT

Keywords

agent

FAQs

Package last updated on 02 Sep 2026

Related posts