1. Scan
Point AIOptimize at your repo. It walks your Python and TS/JS sources and maps every call into the Anthropic and OpenAI SDKs. No runtime telemetry needed.
Static auditor for AI codebases
AIOptimize scans your repo, finds the cache headers, model versions, and context patterns you're missing — and writes the diffs for you.
pipx install aioptimize && aioptimize scan .
MIT-licensed CLI. No runtime telemetry. No SaaS required.
“We went from $14k/mo on Claude to $5.2k/mo in two weeks. AIOptimize found the caching we'd missed on 11 endpoints.”
Three steps from repo to ranked, diffable findings.
Point AIOptimize at your repo. It walks your Python and TS/JS sources and maps every call into the Anthropic and OpenAI SDKs. No runtime telemetry needed.
Every LLM call is checked against a weekly-updated knowledge base of provider best practices — caching, model tiers, context shape, structured output.
Get a ranked list of suggested diffs with estimated cost and latency impact. Paste them into a PR, or let the GitHub bot open one for you.
A sample scan against a typical Series-B Python codebase. Every finding points at a real call site, with a severity and a suggested fix.
$ aioptimize scan . Scanning 142 files (Python: 96, TS/JS: 46) KB version 2026.04.15 · 37 detectors · verified 3 days ago warn D001 Anthropic system prompt without cache_control src/agents/router.py:42 client.messages.create(...) Suggested: add cache_control={"type":"ephemeral"} to the system block Impact: est. $180–$420/mo at current traffic warn D002 Deprecated model version src/workers/summarize.ts:18 model: "claude-2.1" Suggested: migrate to claude-sonnet-4-5 Impact: capability gap, support sunset 2026-06-30 info D003 messages.create without max_tokens src/chat/stream.py:87 Suggested: set max_tokens to cap runaway responses Impact: tail-latency + cost variance Done. 2 warn, 1 info · 0 error Exit 0. Use --fail-on-severity warn to block CI.
Output shortened for readability. See the docs for the full detector reference.
CLI: no. Scans run locally. The optional PR bot has access via a GitHub App with read-only code scope; findings strip prompt content before storage.
No inference at scan time. The MVP is 100% offline — the knowledge base is shipped with the CLI and refreshed on release.
The KB version and last-verified date are shown on every report. Our crawler runs nightly and each entry is human-reviewed before publish.
Off by default. Opt in with --fail-on-severity to block on findings of a given severity or above.
Python and TypeScript/JavaScript at launch. Anthropic, OpenAI, LangChain, and the Vercel AI SDK are covered today. Others on request.
The CLI is MIT-licensed and runs locally. Upgrade when you want the PR bot and dashboard.
pipx install aioptimize