# KORA Doctor

> Open-source CLI that analyzes AUDR traces to find execution waste in AI agent runs.

KORA Doctor is an open-source command-line tool from Krako-Labs that analyzes AUDR JSON or JSONL traces of AI agent runs and surfaces execution waste. It reports observed cost, potentially avoidable cost, and a list of waste candidates across tool usage, context growth, deterministic work, repeated inference, orchestration, and model choice. It runs locally with no dashboard, account, or hosted service.

## What It Is

KORA Doctor is a diagnostic CLI built on top of AUDR usage and cost telemetry. Where AUDR records what an agent ran and what it cost, KORA Doctor asks which parts of that execution could be removed. Its guiding rule is to fix execution waste first and downsize models second. It targets AUDR v1.0.0 and accepts a single JSON object, a JSON array, or JSONL with one record per line.

## What It Looks For

The analysis covers repeated tool/read calls, context amplification, prompt cache efficiency, deterministic validation work that could live in ordinary code, repeated inference, cross-run reuse candidates, suspicious orchestration overhead, and smaller-model candidates. Findings are labeled as observed, estimated, candidate, or insufficient evidence, with a confidence level, because AUDR records omit prompt content and cannot prove calls were semantically identical. Savings are calculated only when cost totals are present, use scenario ratios per candidate, and never stack for one call.

## Optional Evidence Enrichment

Traces can carry privacy-preserving hashes of tool arguments and results in attribution labels, letting KORA Doctor distinguish same-argument repeats from different calls. An OpenTelemetry sidecar (OTLP JSON or simple span arrays) can be supplied with the --otel option to add hashed fingerprints, span status, and retry lineage; raw payloads are hashed in memory and not copied into the report. Explicit labels can also flag unconsumed outputs and planners that planned more steps than they executed.

## Setup Path

Install with pipx directly from the GitHub repository, then run kora-doctor audit on an AUDR file. A --json flag produces machine-readable output. The tool has no runtime dependencies and ships synthetic sample traces. Documented limitations include that it does not modify agents or reroute traffic in v0, and smaller-model recommendations do not benchmark output quality.

## Features
- Analyzes AUDR JSON, JSON array, and JSONL traces
- Detects repeated tool/read calls
- Flags context amplification
- Reports prompt cache reuse
- Identifies deterministic validation candidates
- Finds repeated inference and cross-run reuse candidates
- Flags orchestration overhead and smaller-model candidates
- Estimates avoidable cost with confidence labels
- Hash-based tool fingerprints and retry lineage
- OpenTelemetry sidecar enrichment
- Machine-readable JSON output
- No runtime dependencies, runs locally

## Integrations
AUDR, OpenTelemetry

## Platforms
WINDOWS, MACOS, LINUX, WEB, API, CLI

## Pricing
Open Source

## Version
v0.1.6

## Links
- Website: https://github.com/Krako-Labs/kora-doctor
- Documentation: https://github.com/Krako-Labs/kora-doctor#readme
- Repository: https://github.com/Krako-Labs/kora-doctor
- EveryDev.ai: https://www.everydev.ai/tools/kora-doctor
