DocsFAQLicensing

License

Elastic License 2.0 (ELv2)

Mastra is licensed under the Elastic License 2.0 (ELv2), a modern license designed to balance open-source principles with sustainable business practices.

What is Elastic License 2.0?

The Elastic License 2.0 is a source-available license that grants users broad rights to use, modify, and distribute the software while including specific limitations to protect the project’s sustainability. It allows:

  • Free use for most purposes
  • Viewing, modifying, and redistributing the source code
  • Creating and distributing derivative works
  • Commercial use within your organization

The primary limitation is that you cannot provide Mastra as a hosted or managed service that offers users access to the substantial functionality of the software.

Why We Chose Elastic License 2.0

We selected the Elastic License 2.0 for several important reasons:

  1. Sustainability: It enables us to maintain a healthy balance between openness and the ability to sustain long-term development.

  2. Innovation Protection: It ensures we can continue investing in innovation without concerns about our work being repackaged as competing services.

  3. Community Focus: It maintains the spirit of open source by allowing users to view, modify, and learn from our code while protecting our ability to support the community.

  4. Business Clarity: It provides clear guidelines for how Mastra can be used in commercial contexts.

Building Your Business with Mastra

Despite the licensing restrictions, there are numerous ways to build successful businesses using Mastra:

Allowed Business Models

  • Building Applications: Create and sell applications built with Mastra
  • Offering Consulting Services: Provide expertise, implementation, and customization services
  • Developing Custom Solutions: Build bespoke AI solutions for clients using Mastra
  • Creating Add-ons and Extensions: Develop and sell complementary tools that extend Mastra’s functionality
  • Training and Education: Offer courses and educational materials about using Mastra effectively

Examples of Compliant Usage

  • A company builds an AI-powered customer service application using Mastra and sells it to clients
  • A consulting firm offers implementation and customization services for Mastra
  • A developer creates specialized agents and tools with Mastra and licenses them to other businesses
  • A startup builds a vertical-specific solution (e.g., healthcare AI assistant) powered by Mastra

What to Avoid

The main restriction is that you cannot offer Mastra itself as a hosted service where users access its core functionality. This means:

  • Don’t create a SaaS platform that is essentially Mastra with minimal modifications
  • Don’t offer a managed Mastra service where customers are primarily paying to use Mastra’s features

Questions About Licensing?

If you have specific questions about how the Elastic License 2.0 applies to your use case, please contact us on Discord for clarification. We’re committed to supporting legitimate business use cases while protecting the sustainability of the project.