Customer-facing agents
Answer questions, complete tasks, stream structured UI, and hand users back to your product flows.
Build, observe, and improve agents that can run for days. Mastra gives TypeScript teams one framework for agents, workflows, memory, evals, and deployment.
npm create mastra@latestGet a working project in minutes18ms842ms126ms1.2sBuilt for teams shipping real agent systems
Start with one agent. Add control, context, tools, and production visibility without changing stacks.
Define typed agents with instructions, models, tools, and runtime behavior in one place.
Explore agentsCompose typed steps, branches, retries, and human approval into durable workflows.
Explore workflowsGive agents durable context with conversation history, semantic recall, and observational memory.
Explore memoryConnect agents to external tools and publish your own Model Context Protocol servers.
Explore MCPInspect model calls, tool calls, costs, latency, and execution paths from one trace.
Explore observabilityRun Mastra as a standalone server or deploy it with the platform and adapters you already use.
Explore deploymentDefine an agent with the same language, package manager, schemas, and deployment workflow your team already uses.
import { Agent } from '@mastra/core/agent'
export const assistant = new Agent({
id: 'assistant',
name: 'Assistant',
instructions: 'Help users complete their work.',
model: process.env.MODEL,
tools: { searchDocs },
})Trace each model call and tool decision, evaluate results, and turn production feedback into better behavior.
Answer questions, complete tasks, stream structured UI, and hand users back to your product flows.
Connect tools and business systems, then coordinate repeatable work with explicit workflow control.
Offer shared agent primitives with server APIs, model routing, storage, evals, and observability.
Find implementation details in the current documentation included with this site.
Open documentationMastra is an open-source TypeScript framework for building AI applications and agents. It includes agents, workflows, memory, model routing, evaluation, observability, and deployment tools.
Yes. Use Mastra inside Node.js and web framework projects, or run it as a standalone server. The same agent and workflow definitions can move from local development to production.
Mastra provides a standard model interface across major providers and gateways. Open the model directory to browse the current provider and model documentation.
Mastra records traces for model calls, tool calls, workflows, and handoffs. Use Studio during development and observability integrations in production.
Yes. The framework and this documentation are developed in the public mastra-ai/mastra GitHub repository under the Apache 2.0 license.
Start locally, inspect every run, and deploy with the same TypeScript project.