AI Wisdom
accepted2026-02-28

ADR-006: Agentic Workflow Framework — LangGraph vs Direct Implementation

In this article

The problem

We are building agentic features — multi-step AI workflows that plan, use tools, and iterate. We need to decide whether to use LangGraph (stateful graph-based orchestration), build directly on the model APIs with lightweight wrappers, or adopt another framework like AutoGen.

What we weighed

LangGraph

Pros
  • +Purpose-built for stateful, cyclic agent workflows
  • +Built-in persistence, checkpointing, and human-in-the-loop support
  • +LangSmith integration provides turn-key observability for agents
  • +Active ecosystem with many pre-built patterns
Cons
  • Adds LangChain dependency with its associated abstraction overhead
  • Graph mental model has a learning curve
  • Breaking changes between LangChain versions historically painful
  • Python-first; TypeScript SDK less mature

AutoGen (Microsoft)

Pros
  • +Strong multi-agent conversation patterns
  • +Native .NET support aligns with our backend stack
  • +Microsoft backing provides enterprise-grade support
  • +AgentChat abstraction is clean and intuitive
Cons
  • Less mature than LangGraph for production deployments
  • Smaller community and fewer third-party integrations
  • Actor-based model (v0.4) represents a complete paradigm shift from earlier versions
  • Entered maintenance mode in 2025 — merged with Semantic Kernel into Microsoft Agent Framework (GA April 2026), which now receives new features

Direct SDK calls with Vercel AI SDK

Pros
  • +Zero framework overhead — full control
  • +Vercel AI SDK handles streaming, tool calling, and multi-step logic well
  • +No dependency on framework versioning
  • +TypeScript-first, aligns with our Next.js stack
Cons
  • Must implement persistence, checkpointing, and state management manually
  • No built-in human-in-the-loop support
  • More boilerplate for complex multi-agent patterns

What we chose

We chose direct SDK calls with the Vercel AI SDK for our TypeScript/Next.js agentic features. The Vercel AI SDK's generateText/streamText with maxSteps handles multi-step tool use natively, covering 90% of our use cases without framework overhead. For complex stateful workflows (if needed), we will evaluate LangGraph Python microservices. AutoGen is reserved for any dedicated .NET agent services.

What it committed us to

  • Use Vercel AI SDK generateText with maxSteps for multi-step tool calling patterns
  • Build lightweight state management utilities for complex agent flows
  • Implement manual checkpointing using our existing Neon database if long-running agents are needed
  • Monitor agent costs per run via token tracking middleware — no built-in budget in Vercel AI SDK

Discussion

Sign in to share your feedback and join the discussion.