Mastra
Mastra is an open-source TypeScript framework for building AI agents and workflows. It is built on the Vercel AI SDK and runs on Node.js. The framework exposes six primary primitives — agents, workflows (deterministic step graphs), tools, memory, RAG, and evals. Mastra is positioned as the JS/TS-native alternative to Python-dominated frameworks like LangGraph and CrewAI, which removes a category of language-boundary integration friction for teams whose backends are already TypeScript. The framework includes a local development playground and an integrations layer for connecting to external services.
Example
A TypeScript backend service uses Mastra to define a customer-support agent (model + instructions + tools), wraps complex multi-step flows in Mastra workflows for deterministic paths, and runs eval suites against the same agent code in CI. Tool inputs and outputs are typed via Zod schemas, so the agent layer participates in the same type-checking pass as the rest of the application rather than living in a separately validated boundary.
Put this into practice
Build polished, copy-ready prompts in under 60 seconds with SurePrompts.
Try SurePrompts