Back to directory

Mastra

A TypeScript framework for building AI-powered applications and agents, with model routing across many providers, a graph-based workflow engine, memory and built-in evaluation.

Mastra

Mastra is a TypeScript framework for building AI-powered applications and agents, meant to cover everything from early prototypes to production. It integrates with frontend and backend frameworks such as React, Next.js and Node, or can be deployed as a standalone server.

It routes model calls to more than 40 providers, including OpenAI, Anthropic and Gemini, through one interface. Agents reason about goals, choose tools and iterate until they produce a final answer, while a graph-based workflow engine, using .then(), .branch() and .parallel() syntax, orchestrates more explicit multi-step processes, including suspending and resuming a run for human-in-the-loop approval. Agents can be given conversation history, data retrieved from APIs, databases or files, and longer-term memory.

Mastra can author Model Context Protocol servers to expose agents and tools to other systems, integrates with UI libraries such as Vercel's AI SDK UI and CopilotKit, and includes built-in evaluation and observability features.

More in Agent frameworks

See all 902
  • Recurse

    recurse.run

    A serverless harness that lets a coding agent design, test, and deploy its own specialist sub-agents as tools, MCP servers, or bots, defined by a schema-validated manifest.

  • ProofForge

    shulgin.is-a.dev

    An AI-agent pipeline that decomposes a mathematics problem, proves each piece, and formalizes the result in Lean 4 and Mathlib until the Lean kernel accepts it, with six of its proofs already merged into Google DeepMind's formal-conjectures repository.

  • local-coder

    github.com

    Builds a local coding-agent team on top of Ollama and OpenCode by detecting the machine's hardware, recommending models for seven specialist roles, and testing whether each assigned model can actually use tools, edit a repository and pass verification.