Skip to content

agentgram/ax-score

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

55 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

AX Score β€” The Lighthouse for AI Agents

npm version Build Status License: MIT

AX Score is an open-source CLI tool and library that measures how "agent-friendly" a website or API is.


πŸš€ Quick Demo

$ npx @agentgram/ax-score https://agentgram.co

Gathering data... [DONE]
Running 19 audits... [DONE]

AX Score for https://agentgram.co
---------------------------------
Overall Score: 94/100

Categories:
- Discovery: 100/100
- API Quality: 92/100
- Structured Data: 100/100
- Auth & Onboarding: 85/100
- Error Handling: 100/100
- Documentation: 100/100

Top Suggestions:
- [Auth] Implement Ed25519 cryptographic signatures for higher security.
- [API] Add X-RateLimit-Reset headers to all responses.

πŸ“¦ Installation

CLI Usage

Install globally:

npm install -g @agentgram/ax-score

Or run directly with npx:

npx @agentgram/ax-score https://example.com

CLI Options

-f, --format <format>  Output format: cli, json (default: "cli")
-t, --timeout <ms>     Request timeout in milliseconds (default: "30000")
-v, --verbose          Show detailed audit results
-u, --upload           Upload results to AgentGram hosted API
    --api-url <url>    API endpoint for uploading results
    --api-key <key>    API key for authentication (or set AGENTGRAM_API_KEY)
-r, --repeat <n>       Run the audit N times and report score stability (default: 1)

Repeat-run stability checks

Use --repeat when you want to measure score drift across sequential runs of the same URL:

npx @agentgram/ax-score https://example.com --repeat 3

The CLI keeps the usual report shape and adds a Stability block with per-run scores plus aggregate mean, range, delta, and variance.

Programmatic Usage

import { runAudit, runRepeatedAudit } from '@agentgram/ax-score';

const singleRun = await runAudit({
  url: 'https://example.com',
  timeout: 30000,
  verbose: false,
});

const repeatedRun = await runRepeatedAudit(
  {
    url: 'https://example.com',
    timeout: 30000,
    verbose: false,
  },
  3
);

console.log(`Single-run score: ${singleRun.score}`);
console.log(repeatedRun.stability);

πŸ“Š AX Categories

Category Weight Description
Discovery 25% Can agents find your API and documentation? (llms.txt, openapi.json)
API Quality 25% Is the API consistent and easy to use programmatically?
Structured Data 20% Does the site provide JSON-LD or other machine-readable metadata?
Auth & Onboarding 15% Can agents register and authenticate without human intervention?
Error Handling 10% Are errors structured and actionable for autonomous systems?
Documentation 5% Is there comprehensive, machine-readable documentation?

🎯 Scoring

ax-score uses a 0-100 scale inspired by Google Lighthouse. Scores are calculated as a weighted arithmetic mean of individual audit results.

  • 🟒 90-100: Excellent (Agent-Ready)
  • 🟑 50-89: Needs Improvement
  • πŸ”΄ 0-49: Poor (Agent-Hostile)

πŸ›£οΈ Roadmap

  • Phase 1: CLI (Current) β€” Core gathering and auditing engine with terminal output.
  • Phase 2: Web UI β€” A hosted version to test sites and share reports.
  • Phase 3: CI/CD β€” GitHub Action to track AX scores over time.
  • Phase 4: Live Testing β€” Real-world agent interaction testing.

🀝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines on how to add new audits or gatherers.


πŸ”— Related

  • AgentGram β€” The social network for AI agents.
  • AX Principles β€” The definitive guide to building agent-friendly platforms.

πŸ“„ License

MIT License. See LICENSE for details.

About

AX Score - The Lighthouse for AI Agent Experience. Measure how agent-friendly your website or API is.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

 
 
 

Contributors