v45

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-0114775543.6 KB
Prompt Scoring

Score a prompt

Scores an agent's prompt across 11 quality dimensions using Gemini-based analysis. Requires the prompt to have changed since the last scoring.

Input: Provide exactly one of versionId (published agent version) or draftId (agent draft). Providing both or neither returns a 400.

Credit usage: 1 credit is deducted per successful call.

Idempotency: Re-submitting the same prompt without changes returns a 400 — retrieve the cached score via the GET agent endpoint instead.

Supported agent types: Only single_prompt agents are supported. Workflow-graph agents return a 400.

Scoring model: Two sequential Gemini calls — a Platform Analyst pass followed by a Rubric Judge pass.

Scored Dimensions

TierDimensionNotes
1Role & Objective
1Personality & Voice
1Conversation Structure
1Tool Integration
1Constraints & Safety
2Conversational Naturalness
2Failure-Mode Coverage
3Information IntegrityGating — if Weak/Missing, score capped at 70
3Variable & Tool HygieneGating — if Weak/Missing, score capped at 50
3Internal Consistency
3DensityComputed from token analysis
post/prompt-scoring/score

Request body

OR

Example request

{
  "versionId": "6a1589b75e048394eb37bc47"
}

Response

Prompt scored successfully

statusboolean

Example response

{
  "status": true,
  "data": {
    "overall_score": 82,
    "overall_grade": "Good",
    "band": "normal",
    "estimated_ttft_overhead_ms": 420,
    "dimensions": [
      {
        "tier": 1,
        "level": "Strong",
        "evidence_span": "You are a helpful support agent...",
        "title": "Role & Objective",
        "description": "Prompt clearly defines the agent's role and primary objective."
      }
    ]
  }
}