𝗕𝘂𝗶𝗹𝗱𝗶𝗻𝗴 𝗔𝗜 𝗔𝗴𝗲𝗻𝘁𝘀 𝘄𝗶𝘁𝗵 𝗟𝗮𝗻𝗴𝗖𝗵𝗮𝗶𝗻

LangChain agents use LangGraph to work. The model calls tools in a loop. It continues until it finds a final answer.

You can build a support triage agent using createAgent. You need three things:

How the loop works: The model takes a turn. In one turn, it does one of two things:

You should set a recursionLimit. This prevents the agent from looping forever.

How to define tools: Use the tool function with a Zod schema. Give each tool a name and a description. This helps the model decide when to use it.

Example flow for a support agent:

Comparing SDKs:

LangChain:

Vercel AI SDK:

OpenAI Agents SDK:

Choose LangChain if you need document loaders and retrievers in one place. Choose Vercel or OpenAI if you want a simple agent layer.

Source: https://dev.to/zsevic/building-ai-agents-with-langchain-5e69

Optional learning community: https://t.me/GyaanSetuAi