
LangChain OSS
284 posts

LangChain OSS
@LangChain_OSS
Ship great agents fast with our open source frameworks – LangChain, LangGraph, and Deep Agents. Maintained by @LangChain.





this blog covers 6 common workflow patterns we see with dynamic subagents (fanout and synthesize, adversarial verification, etc) if you'd prefer to learn w/ a video, check out this excellent guide from @colifran_ with examples and trace walk throughs!

@alex64781926 Personally I will migrate to e2b since it is already integrated on Langgraph, framework I am currently using the most. Haven’t used boxlite yet, but Im sure that taking a look is more than worthy.

How to keep AI spend flat while token usage grows exponentially: Not with friction and spend alerts. With better defaults, routing, and caching. Better Defaults (not Usage Caps) – Engineers can choose any model they want, but defaults matter. We’re experimenting with defaulting to open weight models like GLM 5.2 and Kimi 2.7 through our LLM gateway, while still encouraging engineers to choose the right model for the task. 91% of our employees were never hitting their usage caps, so instead of lowering caps and driving up alerts, we're moving to cheaper defaults. Note that code reviews use a diversity of models, so they can check each other's work. Better Routing – In our custom harnesses, we preprocess prompts and route to the best model for the job, considering cache hits and model pricing. For instance, you may want a frontier model for planning, but not for execution where they can be overkill. Ultimately, humans shouldn't be choosing models - AI can automate this task. Better Caching – Cache misses are the easiest way to drive your cost up. All of our requests are cache aware, so we’re reusing a warm cache wherever possible. For example, our cache hit rate went from 5% → 60% in LibreChat once properly implemented. Keep Context Lean – Start fresh sessions when switching tasks. Scope file context narrowly. Disconnect unused tools. Don't just compact. The goal isn't fewer tokens used, it's fewer tokens wasted. Better Visibility – Our engineers can use as many tokens as they want, from whatever model they want, but we’ve made usage visible – and the more you spend on AI, the more impact we expect. The goal isn't to suppress usage. It's to build the infrastructure that makes exponential growth sustainable. Putting this into practice has cut our AI spend nearly in half, while our token usage continues to grow.

if you get 1% better every day then you're 37x better in a year (from @JamesClear's atomic habits book) my theory is you can do this for agents if you build a good continual learning loop which is what i'm working on at @LangChain with deepagents



Access all the providers for GLM 5.2 in one spot. Including one serving at over 125 TPS: openrouter.ai/z-ai/glm-5.2



so has anyone figured out what the best harness to use glm-5.2 in is


We've kept hearing how GLM-5.2 beats Opus 4.8, and are skeptical of benchmarks - so we tested them on a real bug from the Cline repo. While both models fixed the issue, GLM was the winner in terms of cost and code quality: - GLM used twice as many tokens (GLM 1.1m vs Opus 660K) but cost half as much (GLM $0.41 vs Opus $0.81) - Opus finished quicker - 1.6 min and 12 tool calls vs GLM 4.7 min and 28 tool calls - GLM cleaned up dead code and verified the build compiled before completing. Opus didn't - it left type errors that passed tests but broke the production build. Both runs used the same Cline harness prompting and tools, so it seems GLM is RL trained to spend more tokens verifying its work before completing. Impressive work by the @Zai_org team!







GLM 5.2 is now on DeepSWE as the top open-source model on our leaderboard. With a pass@1 score of 44% at max effort, GLM 5.2 is indisputable #1 open-source model besting Kimi K2.7 Code by 17%.

open models are having **another** moment! GLM-5.2 is remarkably good i've been using it with deepagents code (dcode), our coding agent built on our open harness, which makes it super easy to take new models for a spin open model 🤝 open harness
