Asking for a diagnosis
POST .../deploys/{deployId}/diagnosis — see the
Deploys API. MCP:
await korve.deploys.diagnose({ orgId, projectId, deployId }).
Only failed deployments are diagnosable (409 otherwise). The first
call produces the diagnosis; it is then cached, so repeat calls are free
and instant — the response carries cached: true.
What it sees
The platform agent reasons over the failed deploy’s build log and recorded error, the project’s runtime class, recent deployment history (flaky vs persistent failures), and the names of configured environment variables. Env var values are never read — they stay encrypted; the agent only knows which keys exist (enough to notice a missingDATABASE_URL).
The diagnosis shape
The shape is strict and validated — agents can branch on
kind and
confidence without defensive parsing. A retry kind with decent
confidence means: just deploy again.
Cost
Each fresh diagnosis metersagent.diagnosis ($0.20/run on the
rate card); cached reads
are not re-metered. Diagnosis requires active billing.