On this page · 10 sections
Summary. For Python teams running long, auditable agents, LangGraph (MIT, 1.0 since October 2025, now on 1.2.16) is still the default choice. For TypeScript teams, Mastra (Apache-2.0 core, 1.0 on 20 January 2026) is the most complete option, with the OpenAI Agents SDK (MIT, Python and TypeScript) as the lighter alternative. PydanticAI (MIT, V2 stable on 23 June 2026) wins when typed, validated output matters most, and CrewAI (MIT, now on 1.15) remains the quickest route to role-based crews and event-driven Flows. The open-source cores cost nothing. The bill sits in hosting and tracing, and that changed this month: on 1 October 2026 LangSmith Deployment replaced per-run and uptime billing with usage-based LangChain Standard Units at $1 each, which puts an idle Dedicated Small deployment at 0.5335 LSU an hour, about $389 a month, on top of $39 a seat on the Plus plan. Mastra Platform's Teams plan is $250 a month plus $100 per always-on server. CrewAI's free tier stops at 50 workflow executions a month, and Enterprise is quote-based. Two licence catches: Mastra code in any ee/ directory is source-available rather than Apache-2.0, and the Claude Agent SDK is governed by Anthropic's Commercial Terms. Pick by language first, durability second, hosting third.
About this article. Licences, versions, APIs, code samples and hosting prices were checked against repositories, package registries, documentation and vendor pages on 22 October 2026. Vendors change pricing often, so re-check before you commit. No vendor paid for inclusion or placement. Researched with AI assistance and reviewed by our editorial team.
What changed in 2026
Comparisons written early in 2026 miss at least one of these:
- LangSmith Deployment repriced on 1 October 2026. Usage-based pricing replaced per-run and uptime pricing, and Serverless deployments can now scale to zero, in beta. From 14 September 2026, extended trace retention on LangSmith SaaS is capped at 180 days.
- Mastra hit 1.0 on 20 January 2026, then raised a $22M Series A led by Spark Capital on 9 April 2026, bringing total funding to $35M, and launched Mastra Platform the same day.[^maA]
- PydanticAI V2 went stable on 23 June 2026, nine months after V1 (4 September 2025), reorganised around capabilities.
- Durable execution became a checkbox. Temporal's OpenAI Agents SDK integration reached general availability for Python on 23 March 2026, and PydanticAI documents eight durable engines, including Temporal, DBOS and Prefect.
- Microsoft Agent Framework 1.0 was announced on 3 April 2026 as the successor to Semantic Kernel and AutoGen, and Google's ADK for Python reached 2.0 on 19 May with a graph Workflow runtime.
eCorpIT's July constraint-based comparison of LangGraph, CrewAI, Microsoft Agent Framework, Pydantic AI and LlamaIndex Workflows still stands. This guide adds the TypeScript side, a measurable feature matrix and the October 2026 hosting prices. For OpenAI's own stack (Responses API vs Agents SDK vs AgentKit), see our OpenAI agent API selection guide.
The five frameworks, one by one
LangGraph: graph control and checkpointed durability
LangGraph is LangChain Inc.'s MIT-licensed orchestration library for long-running, stateful agents, in Python with a JavaScript/TypeScript port, usable without LangChain. Version 1.0.0 reached PyPI on 17 October 2025; 1.2.16 shipped on 16 October 2026. The README names Klarna, Replit and Elastic as users.
You model the agent as a graph of nodes over typed state. Checkpointers (Postgres, SQLite) persist thread state for continuity, human-in-the-loop, time travel and fault tolerance; stores hold long-term, cross-thread memory. Approvals use interrupt(), which saves state and waits until you resume with Command(resume=...) on the same thread_id:
from langgraph.types import interrupt
def approval_node(state: State):
# Pause and ask for approval
approved = interrupt("Do you approve this action?")
# When you resume, Command(resume=...) returns that value here
return {"approved": approved}
One production trap: on resume LangGraph restarts the whole node, so side effects placed before interrupt() run again and must be idempotent.
MCP tools load through MCPAdapter in the langchain.mcp namespace, which needs langchain[mcp]>=1.4.0 and is in beta; LangSmith Deployment can also expose an agent as an MCP server. LangSmith ingests OpenTelemetry, and a Collector can fan the same spans out to other backends.
Hosting. LangSmith Developer is $0 (one seat, 5,000 base traces a month) and has no Deployment. Plus is $39 a seat with 10,000 base traces and one free Serverless (Small) deployment. Other deployments meter on requested resources: 0.0675 LSU per runtime vCPU-hour, 0.009 per runtime GiB-hour, 0.177 per database vCPU-hour and 0.025 per database GiB-hour, with autoscaled replicas billed too. Self-hosted and hybrid are Enterprise-only.
Best for: Python workflows that branch, wait on approvals or are expensive to rerun. Limits: more wiring than role-based frameworks.
CrewAI: role-based crews plus event-driven Flows
CrewAI is an MIT-licensed Python framework (3.10 to 3.13). Its README calls it "a standalone Python framework with its own primitives", and its PyPI package lists no LangChain dependency. Crews handle autonomous, role-based collaboration; Flows give event-driven control with @start, @listen and @router.
The @persist decorator saves Flow state (SQLite by default, pluggable), so runs can resume or fork. Since 1.8.0, @human_feedback pauses a Flow and lets an LLM map free-text feedback onto routed outcomes:
from crewai.flow.flow import Flow, start, listen
from crewai.flow.human_feedback import human_feedback, HumanFeedbackResult
class ReviewFlow(Flow):
@start()
@human_feedback(
message="Do you approve this content?",
emit=["approved", "rejected", "needs_revision"],
llm="gpt-4o-mini",
default_outcome="needs_revision",
)
def generate_content(self):
return "Content to be reviewed..."
Flows also get a unified Memory backed by LanceDB. MCP servers attach to agents through an mcps field, with stdio, streamable HTTP and SSE transports and tool filters.
Hosting. CrewAI's Basic plan is free: visual editor, OpenTelemetry tracing, guardrails, human-in-the-loop input, two automations and 50 workflow executions a month. Enterprise is custom-priced, adds SSO, RBAC and PII redaction, and runs on CrewAI cloud, your VPC or your own infrastructure. There is no paid self-serve tier in between.
Best for: business-process automation and fast pilots where a few roles map cleanly onto the problem.
Mastra: the TypeScript-first stack
Mastra (Kepler Software, Y Combinator W25) is a TypeScript framework that plugs into React, Next.js and Node or runs as a standalone server. It bundles agents, a graph workflow engine (.then(), .branch(), .parallel()), memory including Observational Memory, RAG, evals, tracing, MCP server authoring and a model router that now reaches about 220 providers. Agents and workflows can suspend for human input and resume from storage.
import { Agent } from '@mastra/core/agent'
export const testAgent = new Agent({
id: 'test-agent',
name: 'Test Agent',
instructions: 'You are a helpful assistant.',
model: 'openai/gpt-5.6-sol',
})
Licence, read carefully. Mastra moved from the Elastic License to Apache-2.0 in July 2025, but its licence file carves out every directory named ee/, such as @mastra/core/auth/ee. That code is under the Mastra Enterprise Edition License: free for development and testing, while production use needs a written agreement with Kepler and a licence key.
Tracing exports to Langfuse, Datadog, Arize or any OpenTelemetry backend, and a sensitive-data filter, on by default, redacts secrets first.
Hosting. Mastra Platform Starter is $0 (100,000 observability events, 24 CPU hours, 15-day retention). Teams is $250 a month (1 million events, 250 CPU hours, 6-month retention, SSO, SOC 2 documents); overage is $8 per 100,000 events and $0.25 per CPU hour. A persistent 24/7 server is $100 per project. The model gateway bills market rate plus 5.5%, and bringing your own key is only available from Teams up. Self-hosted Enterprise is a flat annual fee.
Best for: TypeScript product teams that want one batteries-included stack and a managed runtime.
PydanticAI: typed output and pluggable durability
PydanticAI, from the Pydantic team, is an MIT-licensed Python framework built around type safety; the current V2 release needs Python 3.11 or later. Give an agent an output_type and every run returns a validated object; tool arguments are validated before your code runs:
from typing import Literal
from pydantic import BaseModel, Field
from pydantic_ai import Agent
class Sentiment(BaseModel):
label: Literal['positive', 'negative', 'neutral']
score: float = Field(ge=-1, le=1)
agent = Agent('openai:gpt-5.6-sol', output_type=Sentiment)
result = agent.run_sync('How are people feeling about the Extract app?')
print(result.output)
V2 made the capability the core primitive: one composable unit bundling tools, hooks, instructions and model settings. Memory, sub-agents and a coding agent ship in the separate Pydantic AI Harness package, and Bedrock, Groq and Mistral became opt-in extras. Release 2.59.0 shipped on 21 October 2026, so pin versions.
Durable execution is the standout. PydanticAI documents eight engines; Temporal, DBOS, Prefect, Restate and AWS Lambda integrations are co-maintained with their vendors, and Airflow is among the others. Tool approval is built in through deferred tools. Instrumentation is OpenTelemetry-native, Pydantic Logfire takes two configuration calls, and MCP is a core capability.
Hosting: none first-party. Best for: extraction, classification and transactional agents where malformed output is the main risk, especially on Temporal or DBOS.
OpenAI Agents SDK: minimal primitives, two languages
The OpenAI Agents SDK is MIT-licensed in Python (3.10+) and TypeScript (Node.js 22+, Deno, Bun). Core concepts are agents, handoffs and agents-as-tools, guardrails, human-in-the-loop, sessions and tracing, plus sandbox agents for long tasks in a container and realtime voice agents.
from agents import Agent, Runner
agent = Agent(name="Assistant", instructions="You are a helpful assistant")
result = Runner.run_sync(agent, "Write a haiku about recursion in programming.")
print(result.final_output)
It supports the Responses and Chat Completions APIs and, per its README, more than 100 other LLMs: any OpenAI-compatible endpoint plugs in, and LiteLLM and Any-LLM adapters are best-effort beta integrations. Sessions persist to SQLAlchemy, SQLite, Redis, MongoDB, Dapr, an encrypted wrapper or OpenAI's server-side Conversations API. The Temporal integration runs each agent invocation through a durable Activity.
Tracing defaults matter. Tracing is on by default and exports to OpenAI, trace_include_sensitive_data defaults to true, and tracing is unavailable under Zero Data Retention. set_trace_processors() replaces the exporter; the docs list 31 third-party processors, including Langfuse, Phoenix, Datadog and Logfire.
Hosting: none. JS support for Cloudflare Workers is experimental; for edge agents compare our Cloudflare Agents SDK production guide. Best for: teams mostly on OpenAI models that want the thinnest abstraction, including voice.
Also worth a look
| Framework | Licence | Languages | Where it fits (October 2026) |
|---|---|---|---|
| Google ADK 2.0 | Apache-2.0 | Python, plus Go and TypeScript 2.0 | Graph Workflow runtime and Task API; breaking changes from 1.x |
| Microsoft Agent Framework 1.0 | MIT | Python, .NET (Go added later) | Semantic Kernel and AutoGen successor; OpenTelemetry built in |
| Claude Agent SDK | Python repo MIT, TypeScript repo all rights reserved; use governed by Anthropic's Commercial Terms | Python, TypeScript | Claude Code's agent loop and tools with the CLI bundled; coding and file-system agents |
| AWS Strands Agents | Apache-2.0 | Python, TypeScript | Model-driven loop with MCP and multi-agent patterns; defaults to Amazon Bedrock |
| LlamaIndex LlamaAgents | MIT | Python | Built on Agent Workflows, event-driven steps for document agents |
Sources: Google ADK, Microsoft Agent Framework, the Claude Agent SDK's Python and TypeScript repositories, Strands Agents and LlamaAgents. Microsoft listed Foundry hosted-agent integration as a preview feature at 1.0.
Head-to-head comparison
| LangGraph | CrewAI | Mastra | PydanticAI | OpenAI Agents SDK | |
|---|---|---|---|---|---|
| Language | Python; JS/TS port | Python 3.10-3.13 | TypeScript | Python 3.11+ (V2) | Python 3.10+; TypeScript |
| Licence | MIT | MIT (platform commercial) | Apache-2.0, except ee/ |
MIT | MIT |
| Orchestration model | Graph over typed state | Role-based Crews + event-driven Flows | Agents + graph workflows | Typed agent loop + capabilities | Agents, handoffs, agents-as-tools |
| Durable execution | Checkpointers (Postgres, SQLite) | @persist (SQLite default) |
Suspend/resume from storage | Temporal, DBOS, Prefect and more | Temporal (GA for Python) |
| Human-in-the-loop | interrupt() + Command(resume=) |
@human_feedback (1.8.0+) |
Suspend/resume, tool approval | Deferred tools with approval | Built-in, approval-gated tools |
| Memory | Checkpointer + long-term Store | Unified Memory (LanceDB) | History + Observational Memory | Harness Memory capability | Sessions (SQL, Redis, MongoDB, Dapr) |
| MCP | MCPAdapter (beta); serve as MCP |
mcps on agents, 3 transports |
MCP server authoring | Core capability | MCP tools |
| Observability | LangSmith; OTel ingest and fan-out | Platform tracing with OTel | Built-in tracing; OTel exporters | OTel-native; Logfire | OpenAI traces by default; 31 processors |
| Model-agnostic | Yes | Yes, incl. Ollama | About 220 providers | Dozens of providers | Yes; LiteLLM/Any-LLM beta |
| Managed hosting | LangSmith: $39/seat + LSU usage | Free 50 runs/mo; Enterprise custom | Platform: $0 / $250 / custom | None first-party | None |
| GitHub stars (22 Oct 2026) | ~43.7k | ~60.0k | ~29.0k | ~20.8k | ~30.2k Py + ~3.9k JS |
| Maturity signal | 1.0 Oct 2025; 1.2.16 | 1.15.28 | 1.0 Jan 2026; $35M raised | V2 Jun 2026; 2.59.0 | Temporal GA Mar 2026 |
Stars are rounded from each repository on 22 October 2026; treat them as an adoption signal only.
Decision table: pick X if...
| Your team profile | Pick | Why | Watch out for |
|---|---|---|---|
| Python; long, branching or approval-heavy workflows; audit trail needed | LangGraph | Per-thread checkpoints, interrupt(), time travel |
Node re-runs on resume; managed cloud is US or EU |
| Python; extraction or transactions; already on Temporal or DBOS | PydanticAI | Validated output_type, first-party durable engines |
Fast releases; plan the V1-to-V2 migration |
| Python; business automation with clear roles; pilot in weeks | CrewAI | Crews for autonomy, Flows for control | Free tier caps at 50 executions |
| TypeScript/Next.js team wanting memory, evals and a studio | Mastra | One TS stack, managed Platform from $250/mo | ee/ licence for enterprise auth |
| Mostly OpenAI models; simple handoffs; voice or sandboxes | OpenAI Agents SDK | Fewest abstractions, Python and TS parity | Default tracing to OpenAI; none under ZDR |
| Regulated (BFSI, health); data must stay in your VPC or India | Self-hosted LangGraph or PydanticAI, or CrewAI/Mastra Enterprise | No third-party trace egress | You own Postgres, scaling and upgrades |
| .NET and Azure shop | Microsoft Agent Framework | Python and .NET parity, Foundry hosting | Preview features beyond the 1.0 core |
Worked cost example: one always-on support agent
Scenario. Six engineers run one customer-facing support agent around the clock plus a staging environment. Model tokens are excluded because they are the same across frameworks; estimate them with our LLM token counter. A month is 730 hours.
Option A: LangGraph on LangSmith Deployment (Plus).
- Seats: 6 × $39 = $234.
- Production on a dedicated deployment, which LangChain recommends for any customer-facing agent, starting at Small. LangChain's billing docs price an idle Dedicated Small (3 vCPU and 6 GiB runtime, 1 vCPU and 4 GiB database) at 3 × 0.0675 + 6 × 0.009 + 1 × 0.177 + 4 × 0.025 = 0.5335 LSU an hour, so 0.5335 × 730 = 389.46 LSU = $389.46.
- Staging on the free Serverless (Small) deployment: $0.
- Total: about $623.46 a month, plus trace overage beyond 10,000 base traces and any replicas added under load. By the same formula, Dedicated Medium (6 vCPU and 12 GiB runtime, 2 vCPU and 8 GiB database) works out to 1.067 LSU an hour: $778.91 compute, $1,012.91 total.
Option B: Mastra on Mastra Platform (Teams).
- Plan: $250, unlimited users.
- Persistent 24/7 server for production: $100, assuming the per-project fee is monthly, which the pricing page does not state.
- Staging inside the 250 included CPU hours: $0, assuming light use.
- Total: about $350 a month, plus $0.25 per CPU hour beyond 250, $8 per 100,000 events beyond 1 million, and 5.5% on model spend if you use Mastra's gateway.
Option C: CrewAI. The 50-execution free tier cannot carry a production agent and Enterprise pricing is not published, so this is quote-based.
Option D: self-hosted. Licences cost $0 (except Mastra ee/ modules in production); you pay for containers, Postgres, an observability backend and, if needed, Temporal or DBOS.
Platform fees here run to hundreds of dollars a month, while a busy agent's token bill is often larger. Our hybrid routing framework covers trimming that first.
India, data residency and DPDP
Traces hold prompts, tool arguments and outputs, often personal data, so where traces and checkpoints live matters as much as the model.
- LangSmith: deployments run in the US or EU data region, follow the organisation's region and cannot move afterwards. Its OpenTelemetry docs also list a GCP APAC endpoint for traces; confirm availability for your organisation. Self-hosted and hybrid are Enterprise options.
- Mastra: Platform runs in US and EU regions, fixed at creation; self-hosted Enterprise states that no traces, prompts or outputs leave your environment.
- CrewAI: Enterprise runs in your VPC or on your infrastructure; switch off open-source telemetry with
CREWAI_DISABLE_TELEMETRY=true.
- OpenAI Agents SDK: replace the default trace processors with an in-region backend, or disable tracing.
- PydanticAI and LangGraph (open source): run in an Indian cloud region with OpenTelemetry pointed at an in-region collector.
We design applications aligned with DPDP, GDPR, HIPAA and SOC 2 requirements. For span conventions, see our guide to OpenTelemetry GenAI conventions for agent tracing, and for the tracing backend our LLM observability comparison.
Implementation checklist
- Choose the language first. Mismatched tooling costs every sprint.
- Decide how long a run lives. If runs wait on humans or last minutes, require durable state on day one: Postgres checkpointer, Temporal or DBOS, storage-backed workflows, or a production
FlowPersistencebackend.
- Make side effects idempotent. LangGraph re-runs nodes on resume and Temporal retries Activities.
- Wire OpenTelemetry first and turn off vendor egress you have not approved.
- Treat MCP servers as untrusted. Filter tools per agent and authenticate every server; see our prompt-injection guardrails guide and Langflow RCE lessons.
- Pin versions. PydanticAI advises upgrading to the latest V1 release and clearing deprecation warnings before moving to V2.
- Review licences per package, including Mastra
ee/imports and the Claude Agent SDK's commercial terms.
- Run evals in CI before launch, as in our note on catching silent agent failures. Agents that execute code need an isolated runtime too; see our coding agent sandbox comparison.
How eCorpIT can help
eCorpIT is a Gurugram-based technology organisation, founded in 2021, assessed at CMMI Level 5 and MSME certified, with senior-led engineering teams working across AWS, Microsoft and Google platforms. Our enterprise AI agent development service helps teams choose a framework against their real constraints, then builds the parts that decide whether an agent survives production: durable state, human approval steps, OpenTelemetry tracing, evals in CI and cost controls. Talk to us at /contact-us/.
Last updated: 22 October 2026.