Macha

How Do You Build an AI Support Agent with LangChain in 2026, and When Does a Platform Beat It?

Abbas, Customer Support & AI, Macha

Written by

Ankeet Guha, Co-founder & CTO, Macha

Reviewed by

Published July 30, 2026

Updated September 24, 2026

A LangChain support agent in 2026 is a create_agent call with a model, a few tools and a system prompt, running on LangGraph with LangSmith for tracing and evals. The code is the small part; the help-desk client, hosting and framework upkeep decide whether you should build it or use a platform.

Key takeaways

  • LangChain support agents in 2026 are built with create_agent from the langchain package, which replaces the deprecated create_react_agent and renames the prompt argument to system_prompt.
  • The example LangChain support agent uses three tools, customer lookup, help-center search and ticket reply, and is instructed to escalate refunds over $100.
  • LangGraph's HumanInTheLoopMiddleware pauses a support agent before a named tool such as a refund runs, and an InMemorySaver checkpointer keeps the run state until a human resumes it.
  • A LangChain build still leaves the team to own the help-desk client, the ticket webhook, 24/7 hosting through its own infrastructure or LangSmith Deployment, and framework upgrades.
  • Macha prices its platform by ticket volume from $299 a month for 750 tickets, with setup and monitoring by the Macha team included.
How Do You Build an AI Support Agent with LangChain in 2026, and When Does a Platform Beat It?

To build an AI support agent with LangChain in 2026, you call create_agent from the langchain package (v1, running on LangGraph), give it a model, three or four tools such as customer lookup, help-center search and ticket reply, and a system_prompt, then wrap it in a webhook your help desk calls for each new ticket. The agent code fits in under 30 lines. The help-desk client, the hosting and the framework upkeep around it are the larger job, and they decide whether a framework or a platform is the better fit.

What does LangChain handle, and what is left to you?

ConcernLangChain / LangGraphMacha
Agent loop + orchestrationLangGraph (yours to build with)Built in
Observability + evalsLangSmith (you wire it)Agent Analytics, evaluation and simulations
Help-desk + API toolsYou build the client + webhookNative connector or Custom Tools
Hosting 24/7Your infra / LangSmith DeploymentRuns in the cloud
Framework upkeepYou track breaking changesHandled by the platform
Best whenCustom orchestration is the productResolving support is the goal

A support agent is a loop: read the ticket, call tools to fetch context (customer, orders, the right help-center article), act (reply, tag, escalate), and know when to hand off to a human. LangChain's own definition is clean: an agent is a model calling tools in a loop until the task is done, and the framework is the "harness" around that loop: the model, its prompt, its tools, and middleware. (If you're weighing build-vs-buy first, see our AI agents for customer service overview.)

How do you build the agent with LangGraph?

LangChain agents now run on LangGraph (both are past v1.0). One accuracy note that trips up older tutorials: LangGraph's prebuilt create_react_agent is deprecated in favor of create_agent from the langchain package, and the old prompt= argument is now system_prompt=. Install with pip install langchain langgraph langchain-anthropic, and a minimal support agent looks like this:

from langchain.agents import create_agent
from langchain_core.tools import tool

@tool
def get_customer(email: str) -> dict:
    """Look up a customer by email."""
    return db.query("SELECT id, plan FROM customers WHERE email=%s", email)

@tool
def search_kb(query: str) -> list[str]:
    """Return the top help-center passages for a query."""
    return [d.page_content for d in vectorstore.similarity_search(query, k=3)]

@tool
def reply_to_ticket(ticket_id: str, body: str) -> dict:
    """Post a public reply on a ticket via the help-desk API."""
    return zendesk.reply(ticket_id, body)

agent = create_agent(
    model="anthropic:claude-sonnet-5",
    tools=[get_customer, search_kb, reply_to_ticket],
    system_prompt="You are Acme's support agent. Answer from the help center; "
                  "escalate refunds over $100.",
)
result = agent.invoke({"messages": [{"role": "user", "content": ticket_text}]})

To run it on live tickets you wrap that invoke in a webhook your help desk calls per new ticket, which is the plumbing covered in the "what's still yours" section below.

That's a working agent, and this is where LangGraph earns its place over a raw loop: stateful graphs with checkpointing and human-in-the-loop interrupts, which support needs when an agent wants to do something risky. In v1 you add HumanInTheLoopMiddleware and name the tools that need approval, so the graph pauses before a refund goes out and a human resumes it:

from langchain.agents.middleware import HumanInTheLoopMiddleware
from langgraph.checkpoint.memory import InMemorySaver

agent = create_agent(
    model="anthropic:claude-sonnet-5",
    tools=[...],
    middleware=[HumanInTheLoopMiddleware(interrupt_on={"issue_refund": True})],
    checkpointer=InMemorySaver(),      # persists run state between pause and resume
)
config = {"configurable": {"thread_id": ticket_id}}
result = agent.invoke({"messages": [...]}, config)

Pair it with LangSmith and you also get tracing (see every step of a run) and evals (score agent trajectories), so unlike a raw build, observability and evaluation are partly handled. The LangChain agents docs, the v1 migration guide and the LangGraph repo are the primary references. This is the real argument for the framework: if you need that control, you get it.

Where Claude Code and Codex help

Both coding agents are fluent in LangChain and can scaffold the graph, tools, and LangSmith wiring from a description, then you refine. They write the framework code fast; they don't decide your tools, guardrails, or escalation policy, or run the agent in production.

What does LangChain still leave you to own?

LangGraph + LangSmith cover the loop, orchestration, tracing, and evals. Here's the honest remainder:

  • Connect your help desk. LangChain has integrations, but a production support agent still needs a real Zendesk/Freshdesk/Intercom client (OAuth and token refresh, pagination, rate limits) and a webhook endpoint to trigger the agent per new ticket, with signature verification and idempotency. That's yours to build and host.
  • Host and run it 24/7. LangGraph gives you the graph; you still need a cloud host (or LangChain's managed LangSmith Deployment, formerly LangGraph Platform), secrets, a job queue with retries/dead-letter, and autoscaling.
  • The framework itself. This is the hidden cost. LangChain moves fast: the create_react_agent to create_agent shift, and prompt becoming system_prompt, are recent examples. You're signing up to track breaking changes, migrate, and keep up with a large surface area. That's fine if the framework's control is worth it; it's overhead if you just wanted a support agent.
  • Maintenance. Model deprecations, help-desk API changes, KB re-indexing, and the framework upgrades above, permanently.
Macha's Agent Analytics logs every run — the conversation, the agent, the tool calls and the source.
Macha's Agent Analytics logs every run: the conversation, the agent, the tool calls and the source.

When does a platform beat a framework?

A framework is the right call when the agent's orchestration is your product: you need custom LangGraph state machines, unusual control flow, or to embed the agent deep in your own app. But if your goal is "resolve support tickets well," a framework asks you to own a lot that isn't your differentiator: the help-desk plumbing, the hosting, and a fast-moving dependency.

Macha is the platform side of that trade. You keep the agent design; it owns the infrastructure:

  • Tools without clients. Custom Tools turn any REST API into a tool (define endpoint + auth, or let the AI builder create it from a sentence). Your help desk is a native connector (Zendesk, Freshdesk, Gorgias, Front, HubSpot or Intercom), so there's no client to write, no webhook to host, and no framework version to chase.
  • Run, observe, grade. Agents run in the cloud, triggered by tickets. Agent Analytics traces every run (the LangSmith-style visibility, built in), simulations replay past tickets against an agent, and evaluation scores its output.
Macha's Studies run an agent across a batch of real historical tickets and score the outcomes.
Macha's Studies run an agent across a batch of real historical tickets and score the outcomes.

The pricing shape differs too. A LangChain build costs model tokens plus your hosting and engineering time. Macha is one plan priced by ticket volume, from $299 a month for 750 tickets, billed per ticket rather than per message, with setup and monitoring by the Macha team included (pricing).

So which should you build?

Reach for LangChain/LangGraph when you want maximum control of the agent's control flow, you're embedding it in a larger app, or custom orchestration is the point, and you're happy to own the framework and the infra around it. (Our from-scratch vs. platform breakdown goes deeper on that trade.) Choose a platform when resolving support is the goal and you'd rather not maintain help-desk plumbing, hosting, and a fast-moving dependency. You can start a Macha trial with $50 of free usage and no credit card, and bring the same agent design without the framework overhead.

FAQ

Is LangChain overkill for a support agent? Sometimes. If you just need "answer tickets from our docs and systems," LangChain's surface area can be more than you want to own, and that's the platform case. If you need custom multi-step orchestration, it's exactly right.

LangChain or LangGraph? Both. You write the agent with create_agent from langchain, which runs on LangGraph underneath; create_agent replaces the deprecated create_react_agent. If you have older AgentExecutor or create_react_agent code, plan a migration using the v1 guide.

Does LangSmith replace an eval harness? LangSmith gives you tracing and trajectory evals, which is most of it. You still assemble the test set of real tickets and decide what "good" means. A platform like Macha packages the batch-grading side with simulations against past tickets.

Can Claude Code or Codex build the LangChain agent for me? They'll scaffold the graph, tools, and LangSmith wiring fast. They won't make the product decisions or host, monitor, and maintain it in production.

Macha

About Macha

Macha is an AI agent platform that works on top of the help desk you already use (Zendesk, Freshdesk, Gorgias, Front, Intercom or HubSpot) and connects to the rest of your stack, even your own internal systems. It is done for you: the Macha team analyzes your past tickets, builds the knowledge base and the agents, and runs them in safe mode until the drafts are right. Pricing is about $0.40 a ticket, and that includes setup and a dedicated success manager who handles your changes. Learn more about Macha →

Zendesk
5.0 on Zendesk Marketplace

Loved by support teams worldwide

See what support teams are saying about Macha AI.

The application seems excellent to me! We are still testing, and we need support for some details and they were extremely efficient too!

Daniela Costa

Daniela Costa

Head of Support, Seabra

Macha has been a great addition to our support toolkit. It generates clear, well-organized responses that fit naturally into our workflow. One feature we particularly appreciate is its ability to automatically reply in the same language as the ticket.

Marius F

Marius F

Support Head, Zentana

We've been using Macha for a little while now and it's been really great addition so far! It's powerful, convenient, and makes getting work done a lot easier for our agents.

Alexander Wedén

Alexander Wedén

Head of Support

Support team is very helpful and responsive. Really enjoy how lightweight this is within Zendesk itself vs other more intrusive tools.

Cathleen Wright

Cathleen Wright

Zendesk Admin, Cortex IO

So far it's pretty good! Our queries are a little nuanced, so we can't always use it, but it's got enough utility for us. It can even incorporate our bilingual country with greetings in a second language.

Jae Oliver

Jae Oliver

Head of Support, Wise

Really enjoying using Macha, it has made a noticeable difference to our support team in a short amount of time. I really like the ticket summary feature, saves us a lot of time.

Harry Jackson

Harry Jackson

Head of Support, Crumb

Macha AI is a great addition to my workspace! It's powerful, convenient, and it really makes productivity so much easier for our agents!

Dave G

Dave G

Head of Support, Cyber Power Systems

Very impressed! AI integration for Zendesk has certainly come a long way and Macha seems to set the standard for now. This will for sure save lot of time in our support team.

Pauli Juel

Pauli Juel

Head of CS, Dokument24

Macha has been working great for us so far! The auto-responses are accurate and our resolution time has dropped significantly.

Lana T

Lana T

Zendesk Admin, Swotzy

Macha AI is a great addition. The knowledge base feature means our agents always have the right answers at their fingertips.

Mischa Wolf

Mischa Wolf

Head of Support, Topi

We're enjoying this integration so far. It's made our support team more efficient and our customers get faster responses.

Paula G

Paula G

Head of Customer Support, Xly Studio

The team enjoys using it. It saves considerable time on common questions and the integration options are excellent.

Kilian Leister

Kilian Leister

Support Head, Didriksons

Ready to supercharge your team with AI?

Get started in minutes. Connect your tools, configure your agents, and let AI handle the rest.

$50 in free credits · no time limit, no credit card