erabot.ai
ProductPricingCase studiesEvalBlogDocs
Book a demo

How erabot works

erabot analyses your AI-generated code for cost inefficiencies — across LLM calls, agent loops, tool use, and skills — and writes the fixes. It runs in your own environment under your own model keys, so erabot never sees your source.

Your code
Detect
ASTidiomsLLM backstop
Price
Fix + verify
Report + patches
1

Analyze

erabot parses your codebase and finds every LLM call — and the agentic patterns around them: agent loops and runners, tool and skill use, memory, and multi-agent workflows, where cost compounds fastest. Across OpenAI, Anthropic, Gemini, and frameworks like LangChain, LlamaIndex, CrewAI, and LangGraph. Static analysis, so it works on any repo without running it.

2

Estimate cost

Each call site is priced with real token counts and current per-model prices — including how many times a call fires inside an agent loop — so you see what it costs per month. Connect Helicone, Langfuse, or OpenTelemetry and the estimates become measured from your actual traffic.

3

Fix

For each inefficiency, erabot writes an apply-ready patch with the dollar savings. You get a report.pdf, a report.md, an agent-instructions.md your coding agent applies directly, and the raw diffs.

4

Measure & monitor

Every model-downgrade is replayed and quality-checked before it ships (below), and structural fixes pass a build/test gate. Re-run in CI to catch new waste before it reaches your invoice.

What erabot optimizes

The ways LLM and agent spend leaks — and the fix erabot writes for each.

Right-size the model

A task running on a bigger, pricier model than it needs — switched to a cheaper one, verified safe (see below).

Cache stable prompts

System prompts, schemas, and reference docs re-sent every call — moved into a cached prefix.

Trim context

Whole files or full history sent on every request — cut to what the task actually needs.

Batch requests

Per-item calls in a loop — collapsed into one batched request (up to ~50% cheaper for bulk work).

Skip redundant work

The same input re-processed every run — guarded so it only runs when something changed.

Cap output

No max_tokens or verbose-by-default output — capped and tightened.

Agent-loop overhead

For agentic apps: re-sent context and memory, per-turn model choice, bloated tool output, and a judge/guardrail call on every step — usually the single biggest lever.

Safe model switching

The riskiest optimization is telling you to use a cheaper model — get it wrong and you ship a quality regression. erabot never recommends a downgrade on a guess. Before it does, a shadow harness runs:

  1. 1It writes representative sample inputs for that exact call site.
  2. 2It replays them through both the current model and the cheaper one.
  3. 3A judge checks whether the cheaper model still meets the task’s success criteria.

Only swaps that hold up are recommended and shipped as apply-ready patches. Ones that don’t are shown with their measured quality — so you see the trade-off — but never applied automatically. It’s why erabot can safely recommend downgrades that runtime tools can’t: it proves the cheaper model works for your task before you change a line.

Book a demo
EB
erabot.ai

Scan any codebase. See exactly what you spend on AI. Get one-click fixes.

No spam. Only launch updates and cost optimization tips.

Product

  • Product
  • CLI
  • Pricing
  • Changelog
  • Docs

Resources

  • Example audit
  • Blog
  • Case studies
  • Eval

Company

  • Security
  • Privacy
  • Terms

© 2026 erabot.ai. All rights reserved.