Workflow
LangChainJS
icon
Search documents
Agents Gone Wild? Use Tool Call Limits in LangChainJS to Keep Them in Check!
LangChain· 2025-11-20 16:30
Hi, this is Christian from LChain. Have you ever built an agent that just goes nuts with your API calls. Tools can give an agent incredible power, but can also cost you a lot of money to run.In this video, I will show you how you could keep your agent under control without any hard-coded guardrails within your system prompt. Today, we're taking a look at the tool called middleware within LChain. It's a clean declarative way to set credit limits, rate limits, or usage caps on any tools your agent uses.Think ...
Stop Endless Back-and-Forth — Add Model Call Limits in LangChainJS
LangChain· 2025-11-18 16:30
Hi there, this is Christian from LChain. Here's a scenario. We want a customer support agent that handles routine questions.But if the user keeps going back and forth with it, maybe asking the same thing in three different ways, that's usually a sign that something is not working. Either the agent isn't resolving the issue or the user's drifting into a too long unproductive conversation that honestly the bot was never meant to handle in the first place. In both cases, we want the agent to stop trying to be ...