$ lgo report
| node | agree | p50 ms | $/mo |
|---|---|---|---|
| classifyswap | 98.7% | 310→96 | 4.20→0.38 |
plan, respond · open-ended → keep on llm
✓ 1 node worth swapping · −91% cost · 3.2× faster
llm-graph-optimizer
Find the LangGraph nodes that don't need an expensive model.
One line instruments a compiled graph. lgo shadow replays real traffic through a lighter model, and lgo report shows per-node cost, latency and agreement — with no changes to the agent.
- Cost on one classify node ($4.20 → $0.38/mo)
- −91%
- Faster p50 latency (310 → 96 ms)
- 3.2×
- Agreement at confidence > 0.8
- 98.7%