技巧

LangChain 分享编码 Agent 降本三步法,成本连续两月下降

we're seeing our coding agent costs decrease significantly for second month in row longer blog on t...

精选理由

LangChain 把自家编码 Agent 的账单连续两个月打下来了,三个做法都能直接抄:LangSmith 记账、gateway 设上限、OpenSWE 做模型路由。

LangChain 团队发文称其编码 Agent 成本连续第二个月显著下降。第一步是把所有用量追踪到 LangSmith,获得谁在用什么、怎么用的细粒度可见性。第二步通过 LLM gateway 设置用户级成本上限,避免意外超支。第三步是优化自家的开源云端 Agent 框架 OpenSWE,用模型路由等方式降低调用成本。

原文 · Harrison Chase

we're seeing our coding agent costs decrease significantly for second month in row longer blog on t...

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! 💬 20 🔄 2 ❤️ 32 👀 2096 📊 24 ⚡