Skip to main content

OpenAPI AI Readiness Scorecard & Sandbox — score and simulate your APIs for agentic use

Project description

cli-jentic

A CLI tool that scores OpenAPI specs for AI-readiness across 6 dimensions — giving APIs a letter grade and actionable recommendations so they work well with AI agents and LLM tooling.

Installation

# With uv (recommended)
uv pip install -e .

# Or with pip
pip install -e .

Usage

Scorecard

# Score an OpenAPI spec
cli-jentic score path/to/openapi.yaml

# Output as JSON
cli-jentic score path/to/openapi.yaml --json

# Run against the built-in sample spec to see how scoring works
cli-jentic demo
cli-jentic demo --json

Sandbox

The sandbox spins up a local mock server from your spec and auto-probes every endpoint, reporting a feasibility score — how well the spec can actually be exercised by an agent.

# Start a persistent mock server (press Ctrl+C to stop)
cli-jentic sandbox start path/to/openapi.yaml
cli-jentic sandbox start path/to/openapi.yaml --port 9000

# Probe all endpoints and get a report
cli-jentic sandbox probe path/to/openapi.yaml
cli-jentic sandbox probe path/to/openapi.yaml --json

# Run against the built-in sample spec
cli-jentic sandbox demo
cli-jentic sandbox demo --json

The probe command:

  1. Starts an internal mock server
  2. Generates synthetic request payloads and path parameters from the spec's schemas
  3. Fires requests at every operation
  4. Reports per-endpoint status codes, response times, and any issues found
  5. Exits with code 2 if the feasibility score is below 50%

Exit codes

Code Meaning
0 Success / score ≥ threshold
1 Error reading or parsing the spec
2 Score below threshold (< 60 for scorecard, < 50% for sandbox)

What gets scored

Each spec is evaluated across 6 weighted dimensions:

Dimension Weight What it checks
Foundational Compliance 20% OpenAPI version, info object, paths defined, spec validity
Developer Experience 15% Operation IDs, summaries, request/response examples, parameter descriptions
AI-Readiness & Agent Experience 20% Meaningful descriptions, error responses (4xx/5xx), response schemas, schema property descriptions
Agent Usability 20% Semantic operation IDs, tag usage, parameter schemas, request body documentation
Security & Governance 15% Security schemes defined, operations secured, auth documentation
AI Discoverability 10% API-level description, tags defined, external docs

Grading

Score Grade
90–100 A
80–89 B
70–79 C
60–69 D
< 60 F

Example output

╭─ API AI Readiness Scorecard ──────────────────────────────────╮
│  Task Manager API  v1.0.0                                      │
│  sample_spec.yaml                                              │
│                                                                │
│  Overall Score: 42.3/100  Grade: F                             │
╰────────────────────────────────────────────────────────────────╯

╭──────────────────────────────────┬───────────┬───────┬──────────────────────────┬────────╮
│ Dimension                        │     Score │ Grade │ Progress                 │ Issues │
├──────────────────────────────────┼───────────┼───────┼──────────────────────────┼────────┤
│ Foundational Compliance          │  75.0/100 │     C │ ███████████████░░░░░     │      1 │
│ Developer Experience             │  38.5/100 │     F │ ███████░░░░░░░░░░░░░░    │      3 │
│ AI-Readiness & Agent Experience  │  31.2/100 │     F │ ██████░░░░░░░░░░░░░░░    │      4 │
│ ...                              │       ... │   ... │ ...                      │    ... │
╰──────────────────────────────────┴───────────┴───────┴──────────────────────────┴────────╯

Issues & Recommendations

  AI-Readiness & Agent Experience
    x 4/6 operations lack descriptive intent (need >30 char description)
       paths.*.*.description
    ! 5/6 operations have no documented error responses (4xx/5xx) — agents cannot handle failure gracefully
       paths.*.*.responses

JSON output

Pass --json to get a machine-readable report:

cli-jentic score openapi.yaml --json | jq '.overall_score'
{
  "api_name": "Task Manager API",
  "api_version": "1.0.0",
  "spec_path": "openapi.yaml",
  "overall_score": 42.3,
  "grade": "F",
  "dimensions": [
    {
      "name": "Foundational Compliance",
      "score": 75.0,
      "grade": "C",
      "issues": [...]
    }
  ]
}

Development

# Install with dev dependencies
uv pip install -e .

# Run directly without installing
python main.py score path/to/spec.yaml

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cli_jentic-0.1.1.tar.gz (79.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cli_jentic-0.1.1-py3-none-any.whl (26.8 kB view details)

Uploaded Python 3

File details

Details for the file cli_jentic-0.1.1.tar.gz.

File metadata

  • Download URL: cli_jentic-0.1.1.tar.gz
  • Upload date:
  • Size: 79.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cli_jentic-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5a29fb071e060aab7f4b1a7a1f53e7d7389359db1fa332d48989ab4167df3059
MD5 b85cd0d82a65da0fe204ea70974ab86a
BLAKE2b-256 06e8243879b454a117d8f18f5ef67776320376dfa6273b1615fb76656b60b1c0

See more details on using hashes here.

File details

Details for the file cli_jentic-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: cli_jentic-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 26.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cli_jentic-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c5954328369c54297200d8174b8952aeba2f023d9d443a4849d5bb664b5d6ec0
MD5 569ef8ec9347180a45aafb37f1deaff3
BLAKE2b-256 4a7ea8a2efee8b2aad19b96e2b9e49e4dcba2db85e40e4af778c0d1f01bb68f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page