LangChain 分享编码 Agent 降本三步法,成本连续两月下降
LangChain 把自家编码 Agent 的账单连续两个月打下来了,三个做法都能直接抄:LangSmith 记账、gateway 设上限、OpenSWE 做模型路由。
LangChain 团队发文称其编码 Agent 成本连续第二个月显著下降。第一步是把所有用量追踪到 LangSmith,获得谁在用什么、怎么用的细粒度可见性。
第二步通过 LLM gateway 设置用户级成本上限,避免意外超支。第三步是优化自家的开源云端 Agent 框架 OpenSWE,用模型路由等方式降低调用成本。
we're seeing our coding agent costs decrease significantly for second month in row longer blog on this later, but three quick steps we took 1/ cost visibility. you cant control what you cant measure. Start tracking everything to langsmith. This gives us super granular visibility into who is using what, how they are using it, etc. LangSmith supports first party integrations with all main coding harnesses langchain.com/blog/your-codi… 2/ cost controls. Through our LLM gateway, set user level cost caps. (You can increase your cap by talking to our VPE). This helps curb unexpected or accidental spend. docs.langchain.com/langsmith/llm-… 3/ optimize the harness. Obviously 3rd party harnesses are tougher to optimize, but we are doing more and more coding through OpenSWE, our open source cloud agent harness. Things like model routing help bring the cost down langchain.com/blog/how-to-bu… feel free to reach out if you want help implementing these at your co!📊 24 ⚡
This report is categorized under AITOP's "How-to" desk, focusing on US frontier AI labs and Silicon Valley technology leaders. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include LangChain, LangSmith, OpenSWE, model routing.
Source attribution: curated from Harrison Chase (@hwchase17). Cross-source corroboration: 2 independent sources have covered this development (including shao__meng), confirming industry-wide signal strength.
- shao__meng10-02 11:40Source