AIToday
Large Language ModelsAI Coding AssistantsLangChain BlogPublished: Oct 29, 2026, 04:00 JST

LangChain: stack four loops, not a better model, to make agents reliable

Send on LINE
LangChain: stack four loops, not a better model, to make agents reliable

3 Key Points

  1. What happened

    LangChain laid out a four-level loop stack for agents — the core agent loop, a verification loop with graders, an event-driven loop for background runs, and a hill-climbing loop that feeds traces to a LangSmith Engine analysis agent.

  2. Why it matters

    The post argues value compounds in the third and fourth loops, so teams should pivot from just getting work done to embedding agents that continuously improve against their criteria, with humans reviewing sensitive actions.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

Context & Analysis

The post builds its argument from a concrete internal case: a docs agent that receives a request for a documentation improvement, plans and drafts changes, and uses tools to clone repos, read files, write docs, and open a pull request. That single example runs through all four levels, which makes the stack easier to picture than an abstract framework.

The verification level adds a grader — deterministic or LLM-as-judge — that checks output against a rubric and sends feedback back when it falls short. For the docs agent, tests check that links resolve, CI checks pass, and the diff is scoped to what was requested. LangChain is candid that this adds latency and cost per run, and frames the tradeoff as quality over speed for most production cases.

The higher levels shift the agent from something you invoke to a component running inside a larger system. Event triggers come from cron schedules and webhooks via LangSmith Deployment, or from Fleet channels and schedules; the docs agent fires whenever a message lands in a #docs-plz Slack channel. The fourth loop is where LangChain makes its strongest claim: traces contain signal about what is working, and an analysis agent can rewrite the harness — prompt, tool, or grader tweaks — with the return arrow reaching inside the agent loop rather than just restarting it. Looking ahead, the post suggests the same loop could feed RL fine-tuning for teams on open-weight models, and improve memory and retrieved skills, with the caveat that what the loop optimizes is up to the team.

FAQ
What are the four loops LangChain describes?
They are the agent loop (model calls tools until done), the verification loop (a grader checks output against a rubric and retries), the event-driven loop (events trigger runs), and the hill climbing loop (traces feed an analysis agent that improves the harness).
What does each loop cost or trade off?
Adding verification increases latency and cost per run. LangChain says it is worth it when quality matters more than speed, which it calls most production use cases.
Where do humans still fit in?
LangChain lists touch points at every level: requiring human input before sensitive tool calls, a human acting as grader, approving outputs before they reach end users, and reviewing harness improvements before deployment.
LangChain BlogRead Original Article
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleGoogle AI Mode deflects on US election winners, citing strict safety filters