experimentalCan AI agents call your API?
redocly score checks your OpenAPI description and gives it an Agent Readiness score from 0 to 100: how easily agents and developers can call it. Ten subscores explain the score, and hotspots name the operations to fix first.
Static analysis · no model · no API calls
Developers, SDK generators, and AI agents all read the same description. Fix what the score flags, and every reader benefits.
10
subscores behind one number
100%
same description, same score
< 10 ms
to score the 20-operation Cafe API
/ AI agents
Where agents have to guess
Every low subscore marks a place where an agent has to guess. Here are three in the Cafe API, our demo API.
- Risk for an agent
Schema Simplicity
59%Harder to fill in correctly: a response nests 6 levels deep.
- Risk for an agent
Example Coverage
60%No example to copy for 9 of 20 responses.
- Risk for an agent
Polymorphism Clarity
74%No discriminator to tell which anyOf shape a payload must match.
/ Subscores
Ten reasons behind one number
Pick a subscore to see what it measures and how the Cafe API does.
Schema Simplicity
59%How deep request and response schemas nest, and how many properties they carry.
- In the Cafe API
- GET /order-items nests 6 levels deep.
- To raise it
- Flatten deep nesting and extract repeated shapes into components.
/ Inputs and outputs
One description in, four views out
no flag--format=json--operation-details--debug-operation-id <id>Experimental: the scoring can change between releases.
/ How it works
From a score to a fix in three steps
Run it
The report opens with the score, then the ten subscores behind it.
redocly score openapi.yamlAgent Readiness: 82.2/100 Schema Simplicity 59% Example Coverage 60%
Read the hotspots
The report ends with the operations that pull the score down, and why.
GET /menu (listMenuItems) Agent Readiness: 72.5 - High parameter count (6) - Deep schema nesting (depth 5) - High polymorphism count (6)
Drill into one operation
See every schema behind the numbers, and change the one that costs the most.
redocly score openapi.yaml --debug-operation-id listMenuItems#/components/schemas/MenuItem [oneOf:2] #/components/schemas/Beverage [allOf:2] #/components/schemas/Dessert [allOf:2] Totals: 20 properties, 6 polymorphism items, 16 constraints, max depth 5
/ Lint or score
Valid is not the same as easy
A description can pass every lint rule and still be hard to call. Use both.
redocly lintIs the description valid, and does it follow your rules?
- Output
- A list of problems, by severity
- Fails the build
- On error-level problems
- Configuration
- Optional – recommended rules by default
redocly scoreHow easy is the API to call correctly?
- Output
- An Agent Readiness score from 0 to 100, ten subscores, and ranked hotspots
- Fails the build
- Only when you gate on the JSON report
- Configuration
- None – the scoring is fixed
Keep the score from sliding back
Write the report as JSON and fail CI when the score or any subscore drops below your threshold. Pin the CLI version for a stable gate.
set -e redocly score openapi.yaml --format=json > score.json jq -e '.agentReadiness >= 80' score.json jq -e '.subscores.exampleCoverage >= 0.6' score.json# the overall score is 0–100, subscores are 0–1 in JSON