# Mastra — TypeScript AI Agent Framework > AI agent framework for TypeScript from the Gatsby team. Build agents with tools, workflows, RAG, memory, evals, and 50+ integrations. Modern TS-native design. 22K+ stars. ## Install Save as a script file and run: ## Quick Use ```bash npx create-mastra@latest my-agent cd my-agent npm run dev ``` Or add to an existing project: ```bash npm install mastra @mastra/core ``` --- ## Intro Mastra is an AI agent framework for TypeScript, built by the team behind Gatsby. It provides a modern, TypeScript-native way to build AI agents with tools, multi-step workflows, RAG pipelines, persistent memory, evaluations, and 50+ pre-built integrations. Designed for production use with type safety throughout. 22,000+ GitHub stars, MIT licensed. **Best for**: TypeScript/Node.js developers building production AI agents **Works with**: OpenAI, Anthropic, Google, Ollama, any LangChain-compatible model --- ## Core Features ### Agents with Tools ```typescript 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: ```typescript 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. --- ## Source & Thanks > Created by [Mastra AI](https://github.com/mastra-ai) (from the Gatsby team). Licensed under MIT. > [mastra-ai/mastra](https://github.com/mastra-ai/mastra) — 22,000+ GitHub stars --- Source: https://tokrepo.com/en/workflows/59d6f322-d438-4ed3-ab97-ea580be76f48 Author: TokRepo Curated