mastra-ai/mastra

Mastra is the modern TypeScript framework for AI-powered applications and agents.

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 50 minutes ago
Added to GitGenius on February 21st, 2025
Created on August 6th, 2024
Open Issues & Pull Requests: 506 (+3)
Number of forks: 2,684
Total Stargazers: 27,420 (+0)
Total Subscribers: 96 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 0.0 hours
Mean response time: 22.7 hours
90th percentile: 12.1 hours
Tracked items: 5,326

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 97% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Almost all tracked open issues have seen activity in the last three months. Only 5% of issues opened in the past year have been closed. Three people close 57% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 237
New in 7 days: 155
Closed in 7 days: 128
Avg open age: 30 days
Stale 30+ days: 51
Stale 90+ days: 18

Recent activity

Opened in 7 days: 142
Closed in 7 days: 125
Comments in 7 days: 280
Events in 7 days: 1,157

Top labels

  • bug (2,496)
  • effort:medium (1,830)
  • impact:high (1,823)
  • discord (1,170)
  • trio-tb (1,167)
  • enhancement (982)
  • trio-tnt (972)
  • Workflows (926)

Detailed Description

Mastra is a TypeScript framework designed for building AI-powered applications and agents, offering a comprehensive toolkit that bridges the gap between prototype development and production-ready systems. The framework integrates seamlessly with popular frontend and backend technologies including React, Next.js, and Node.js, while also supporting deployment as a standalone server across various environments.

The core functionality centers on several interconnected features. Model routing provides access to over 40 different AI providers through a unified interface, enabling developers to work with models from OpenAI, Anthropic, Gemini, and others without provider-specific implementation details. The agents system allows developers to build autonomous agents that leverage large language models and tools to tackle open-ended tasks, with agents capable of reasoning about goals, selecting appropriate tools, and iterating internally until reaching conclusions. For scenarios requiring more explicit control, the workflow engine uses a graph-based architecture with intuitive syntax for control flow operations including sequential execution via .then(), branching logic via .branch(), and parallel processing via .parallel().

Human-in-the-loop capabilities enable workflows and agents to suspend execution and await user input or approval before resuming, with state persistence through storage systems allowing indefinite pauses and resumption from the exact point of interruption. Context management features provide agents with appropriate information at critical moments through conversation history, data retrieval from APIs and databases, and observational memory that enables coherent agent behavior. The framework supports integration with agentic libraries like Vercel's AI SDK UI and CopilotKit for web-based implementations, and includes Model Context Protocol server authoring capabilities for exposing agents and tools via the MCP interface.

Production readiness is addressed through built-in evaluation systems and observability tools that enable continuous measurement and refinement of agent behavior.

The codebase employs a dual-licensing model combining Apache License 2.0 for the core framework with a source-available Mastra Enterprise License for enterprise features located in ee/ directories. This structure allows free development and testing while requiring valid enterprise licenses for production use of premium features. The project maintains active community engagement through Discord, comprehensive documentation, educational templates, and video resources to support developers at various experience levels with AI agent development.