Agent frameworks

Mastra

TypeScript agent framework with workflows, memory, and evals in one package.

Visit mastra.ai ↗

Pricing
Open source
Runs
Hosted or self-hosted
Languages
TypeScript
Interface
Library
Source
Open source

What Mastra is

Mastra is TypeScript-first rather than a port of a Python library, which shows in the ergonomics. It bundles agents, durable workflows, memory, retrieval, and evals in one package, with local development tooling for inspecting runs.

Best for

TypeScript and Node teams who want a framework designed for their stack instead of a translated one.

Consider something else if

A younger ecosystem than the Python incumbents, with correspondingly fewer integrations and less written about it.

Mastra alternatives

The closest options in agent frameworks, on the axes that actually separate them.

Mastra compared with 5 alternatives
ToolBest forPricingRuns
Mastraopen sourceTypeScript and Node teams who want a framework designed for their stack instead of a translated one.Open sourceHosted or self-hosted
LangChainopen sourceProjects that benefit from breadth of integrations, and teams who want explicit stateful graphs via LangGraph.Open sourceHosted or self-hosted
Claude Agent SDKopen sourceFilesystem- and shell-shaped agents where the built-in tool set is most of what you need.Open sourceSelf-hosted
LlamaIndexopen sourceRetrieval-heavy applications where document ingestion and indexing are the hard part.Open sourceHosted or self-hosted
Pydantic AIopen sourcePython teams already using Pydantic who want type safety and a framework small enough to hold in your head.Open sourceSelf-hosted
DSPyopen sourceTasks with a measurable metric and enough examples to optimise against, where hand-tuned prompts keep drifting.Open sourceSelf-hosted

Choosing within agent frameworks

Language, honestly

Most of this category is Python-first. If your service is TypeScript, the shortlist is genuinely shorter, and a thin layer over the provider SDK is often better than a half-maintained port.

How much it hides

Some frameworks give you primitives you compose; others give you an agent you configure. The second is faster to a demo and harder to debug at depth. Match this to how much novel behaviour you expect to need.

The full guide to agent frameworks →

Questions

What is Mastra?

Mastra is TypeScript-first rather than a port of a Python library, which shows in the ergonomics. It bundles agents, durable workflows, memory, retrieval, and evals in one package, with local development tooling for inspecting runs. It is open source and hosted or self-hosted.

What are the alternatives to Mastra?

The closest alternatives are LangChain, Claude Agent SDK, LlamaIndex, Pydantic AI, DSPy. They sit in the same category — agent frameworks — and differ mainly on hosting model, pricing shape, and how much they abstract away.

Is Mastra the right choice?

TypeScript and Node teams who want a framework designed for their stack instead of a translated one. The main caveat: A younger ecosystem than the Python incumbents, with correspondingly fewer integrations and less written about it.