[KongchangAI]
· 2 min read· 1,401 words

Return to LangChain or Stay Custom-Built? Thinking Through AI Agent Stack Selection for 2026

Return to LangChain or Stay Custom-Built? Thinking Through AI Agent Stack Selection for 2026

A developer's Agent framework dilemma reflects the industry's collective debate over custom builds vs. frameworks and Python vs. TypeScript.

A developer who went from early LangChain adopter to full custom TypeScript Agent runtime builder faces a new stack decision and sparks a broad Reddit discussion. The article examines key production-grade selection criteria — model provider switching, day-one observability and evals, human-in-the-loop support, and hard compliance requirements like ZDR and HIPAA — while exploring the real-world gap between TypeScript and Python in the Agent ecosystem. It concludes that compliance and observability should be treated as veto criteria, language choice must account for product shape and hiring needs, and mature AI coding tools have meaningfully lowered the barrier to going custom.

An Early LangChain User's Homecoming Question

A developer who started using LangChain back in the GPT-4.1 era recently sparked a discussion on Reddit about Agent stack selection. His journey is remarkably relatable: he started with Python deployed on AWS, then spent two full years building a completely custom TypeScript Agent runtime from scratch — no frameworks, all handwritten code, assisted by Claude and Codex for AI-powered development.

Now facing a new project from zero to one, he finds himself at a familiar yet unfamiliar crossroads: should he re-embrace the LangChain ecosystem that has gone through multiple iterations, continue down the custom-built path, or pivot to emerging options like the Vercel AI SDK? Behind this question lies a real dilemma that countless Agent developers are wrestling with today.

reddit source

The Pain of Framework Abstraction vs. The Freedom of Custom Builds

This developer's criticism of early LangChain is blunt: in the days before Claude Code-assisted programming had matured, LangChain's development experience was "an absolute nightmare." Every customization requirement was buried under layers of abstraction, and waiting for feature updates and changes was a slow, frustrating process. This is precisely why many early users abandoned frameworks and went custom — abstraction layers bring convenience, but they also strip away control over underlying logic.

He chose a different path: writing a custom Agent runtime in TypeScript from scratch, completely free from framework constraints. This approach became far more viable once AI coding tools matured — when Claude and Codex can efficiently help you write and maintain custom code, the cost of "reinventing the wheel" drops significantly, and what you get in return is complete architectural autonomy.

This gets at the fundamental tension in framework selection: frameworks trade conventions and abstractions for development speed, while custom builds trade effort for flexibility and control. In the Agent space, which is still evolving rapidly, this trade-off is especially nuanced.

What Actually Matters When Building from Scratch

The selection criteria this developer listed reads almost like a requirements template for a production-grade Agent system — one worth reviewing against your own checklist:

Easy Switching Between Model Providers

With model capabilities improving rapidly and pricing shifting constantly, how easily you can switch between different model providers directly affects the long-term cost and capability ceiling of your system. This is where abstraction layers can genuinely create value — a well-designed provider abstraction lets you migrate painlessly between OpenAI, Anthropic, and others.

Observability and Evaluation from Day 1

He placed particular emphasis on "observability day 1" and evaluation (evals) capabilities. This reflects a consensus among mature teams: observability and evaluation for Agent systems aren't afterthoughts — they're foundational infrastructure. Without proper tracing and evaluation, Agent behavior is a black box, and iteration and debugging become nearly impossible.

Observability in Agent systems typically spans three layers: Tracing records the inputs, outputs, latency, and token consumption of each LLM call; Logging captures discrete events like tool invocations and state changes; Metrics aggregate data on success rates, latency distributions, and cost trends. Leading Agent observability tools include LangSmith (LangChain's official offering), Langfuse (open-source), and Arize Phoenix, among others.

Evaluation (Evals) is a separate dimension — it refers to systematically measuring the quality of Agent outputs, and comes in two flavors: automated evaluation (such as LLM-as-judge or rule-based matching) and human evaluation. Unlike unit tests in traditional software, Agent outputs are probabilistic and open-ended, making them hard to verify with simple assertions. This is why Evals systems require dedicated test datasets and scoring rubrics. The underlying logic behind "observability from day one" is this: without enough accumulated trace data, you can't build meaningful evaluation benchmarks, and debugging and iteration will be entirely gut-driven.

Human-in-the-Loop and Compliance Requirements

Human-in-the-loop (HITL) mechanisms, along with ZDR (Zero Data Retention) and HIPAA compliance, are hard requirements for enterprise and sensitive domains like healthcare. These needs often define the range of viable options from the start — a framework's depth of compliance support can immediately rule out a significant portion of candidates.

Human-in-the-loop (HITL) refers to inserting human review or intervention checkpoints within an Agent's automated execution pipeline — commonly used as a confirmation step before high-risk operations such as database writes, sending external communications, or processing financial transactions. Implementation typically relies on native framework support for "pause-and-resume" workflows, where the Agent suspends at a given step, waits for human input, then resumes execution — a pattern that places significant demands on the underlying state persistence mechanism.

ZDR (Zero Data Retention) is a compliance option offered by cloud providers like Anthropic and OpenAI, committing that API request and response data will not be retained for model training or log storage. It typically requires signing an enterprise-level agreement and paying additional fees. HIPAA (Health Insurance Portability and Accountability Act) requires systems handling Protected Health Information (PHI) to meet strict data security and access control standards. The impact of these requirements on framework selection usually comes down to: whether the framework supports routing LLM calls to compliant endpoints, whether it allows disabling default trace data uploads, and whether third-party integration components hold the relevant certifications.

TypeScript or Python? The Agent Language Debate for 2026

One especially valuable question raised in the discussion: from a hiring perspective, how does community sentiment around TypeScript vs. Python for Agent development look heading into 2026? Has LangChain's TS version — and TypeScript implementations of deep agents — reached parity with their Python counterparts?

This question gets at a long-standing ecosystem imbalance. Python's deep roots in machine learning and data science have made it the default language for AI development, and the Python versions of mainstream frameworks like LangChain typically carry the most complete feature sets and the fastest updates. TypeScript, meanwhile, holds natural advantages in full-stack development, frontend integration, and serverless deployments (like the Vercel ecosystem).

For an Agent product that needs deep integration with a web application, a TypeScript stack allows frontend and backend to share type definitions and simplifies the deployment pipeline. But if the framework's TypeScript version lags behind the Python version in functionality, teams have to choose between language consistency and feature completeness. This developer's question about whether "the TS version has reached parity with Python" is itself a signal that this gap hasn't fully closed in the industry.

The Vercel AI SDK is an AI development toolkit for the TypeScript/JavaScript ecosystem, built by Vercel — the company behind Next.js. It provides a unified model invocation interface, streaming response handling, and deep integration with React Server Components. Its design philosophy leans toward "thin wrapping" — maintaining transparency close to the underlying APIs while smoothing over interface differences between model providers. Compared to LangChain's heavy abstraction, the Vercel AI SDK typically offers a lighter development experience in web full-stack scenarios, though its built-in support for complex multi-step Agents and persistent workflows is relatively limited. For teams whose primary product surface is a web application and who are already deeply invested in the TypeScript stack, it's a serious alternative worth evaluating.

A Decision Framework for Similar Choices

While this was an open-ended question without a definitive answer, the discussion surfaces a few pragmatic principles for making this call:

There's no universally correct choice — only choices that fit the context. If your core need is rapid validation and access to a large library of pre-built integrations, frameworks (LangChain / Vercel AI SDK) can significantly accelerate your progress. If you prioritize maximal control and already have a mature AI-assisted development workflow, the cost of building a custom runtime is nowhere near as steep as it used to be.

Treat compliance and observability as veto criteria. Hard constraints like ZDR and HIPAA should be used to filter options at the very beginning of evaluation — not discovered as blockers during implementation.

Factor in both product shape and hiring when choosing a language. If your product is tightly coupled to a web frontend, TypeScript's full-stack advantages deserve serious consideration. If you depend heavily on the ML ecosystem and the latest framework features, Python remains the safer bet.

This developer's homecoming question is, at its core, a reflection of the broader Agent development community's collective reckoning — at the intersection of framework maturity, AI-assisted programming capabilities, and production-grade requirements. The answer varies by project, but a clear requirements checklist and a principled trade-off framework are always the prerequisites for making the right call.

#AI Agent framework#LangChain vs custom build#TypeScript Python Agent development#Vercel AI SDK#Agent observability#LLM stack selection 2026
Share:

Related articles