Core Features
Agents with Tools
const agent = new Agent({
name: "Research Assistant",
instructions: "You help users research topics.",
model: openai("gpt-4o"),
tools: { search: searchTool, summarize: summarizeTool },
});Workflows
Multi-step, branching workflows with automatic state management:
const workflow = new Workflow({ name: "content-pipeline" })
.step("research", researchStep)
.step("write", writeStep, { after: "research" })
.step("review", reviewStep, { after: "write" });RAG
Built-in vector storage and retrieval with chunking strategies.
Memory
Persistent conversation memory across sessions with thread management.
50+ Integrations
Pre-built connectors for GitHub, Slack, Notion, Google, Stripe, and more.
Evals
Test agent quality with built-in evaluation framework.
FAQ
Q: What is Mastra? A: A TypeScript AI agent framework from the Gatsby team. Build agents with tools, workflows, RAG, memory, evals, and 50+ integrations. 22K+ GitHub stars, MIT licensed.
Q: How is Mastra different from LangChain.js? A: Mastra is TypeScript-native with first-class type safety, built-in workflow engine, persistent memory, and a scaffold CLI. More opinionated and production-oriented.