Your agent pipeline is paying for calls it does not need.
ChainOpt is a Python SDK and CLI that reads your LLM pipeline and names the calls to cut: work that already ran, models larger than the task, and steps waiting on each other for no reason. Every finding carries the prompts and responses it was drawn from. It is in private beta, and I am looking for testers.
pipeline map · support-triage
- step 1 · routehaiku · $0.0002
- step 2 · extractsonnet · $0.0201
- step 3 · summarizesonnet · $0.0194
- step 4 · planopus · $0.0113
- step 5 · retrievehaiku · $0.0004
- step 6 · summarizesonnet · $0.0191
- per run$0.0705
chainopt analyze ./src
→ 7 call sites across 6 steps
→ 3 findings · $59.60/mo · 8.4s/run
- redundancysteps 3 and 6+$38.20/mo
- oversizingstep 4, opus to haiku+$21.40/mo
- parallelismstep 5 waits on step 3-8.4s/run
- recoverable+$59.60/mo
Illustrative example, not measured results.
Analysis complete. 7 call sites across 6 steps. 3 findings · $59.60/mo · 8.4s/run.
Works with LangChain, LangGraph, the OpenAI and Anthropic Python SDKs, OpenTelemetry
Where ChainOpt sits next to your tracing stack
| Tool | What it does | What it leaves to you |
|---|---|---|
| ToolTracinglangfuse · helicone | What it doesRecords every call and totals the bill. | What it leaves to youWhich calls to change. The totals are per model and per run, so a duplicated step looks like ordinary spend. |
| ToolModel routingagentopt | What it doesSwaps a cheaper model in for each step. | What it leaves to youThe shape of the pipeline. Duplicated and badly ordered work survives the swap and keeps costing you. |
| ToolChainOptsdk · cli | What it doesReads the pipeline structure and names the calls to remove, downgrade, or run in parallel. | What it leaves to youWhether to apply it. Each finding is a suggestion with its prompts and responses attached, and nothing is rewritten for you. |
ChainOpt is in private beta and I am taking testers now.