‹ Reports
The Dispatch

GitHub Repo Analysis: mastra-ai/mastra


Executive Summary

Mastra is a TypeScript framework designed to accelerate the development of AI applications, offering tools for workflows, agents, and integrations. It is maintained by an active community and is gaining popularity with over 3,000 stars on GitHub. The project is in a state of active development, focusing on expanding voice capabilities and improving user experience.

Recent Activity

Development Team Members:

  1. Ward Peeters (wardpeet)
  2. Ehindero Israel (TheIsrael1)
  3. Taofeeq Oluderu (Taofeeq-deru)
  4. Tyler Barnes (TylerBarnes)
  5. Yujohn Nattrass
  6. Abhi Aiyer (abhiaiyer91)
  7. Pulkit Sethi (pulkitsethi)
  8. Sam Bhagwat (calcsam)
  9. Dave Yen (davecyen)
  10. Shane Thomas (smthomas)
  11. NikAiyer

Recent Activities:

Patterns:

Risks

  1. Dependency Management Issues (#1996, #1991):

    • Challenges with TypeScript monorepos and pnpm builds could disrupt development workflows.
    • Need for flexible build processes to accommodate diverse setups.
  2. Incomplete Feature Implementations (#1973):

    • Errors in logging features like UpstashTransport could impact users relying on these capabilities.
  3. Cyclical Dependencies (#1970):

    • Potential regressions or overlooked edge cases need addressing to ensure stability.

Of Note

  1. Voice Feature Expansion:

    • Multiple PRs focused on enhancing voice capabilities suggest a strategic direction towards integrating advanced voice functionalities.
  2. Community Responsiveness:

    • Quick resolution of issues like broken documentation links (#1962) reflects strong community engagement and project management.
  3. Automated Versioning Practices:

    • Regular use of automated tools for version control highlights a mature approach to managing releases efficiently.

Quantified Reports

Quantify issues



Recent GitHub Issues Activity

Timespan Opened Closed Comments Labeled Milestones
7 Days 13 8 18 0 1
14 Days 15 11 21 1 1
30 Days 26 17 38 7 1
All Time 42 33 - - -

Like all software activity quantification, these numbers are imperfect but sometimes useful. Comments, Labels, and Milestones refer to those issues opened in the timespan in question.

Rate pull requests



3/5
This pull request primarily focuses on updating documentation formatting and adding a new example guide. While it includes a significant addition with the RAG example, the changes are mostly cosmetic or structural in nature, such as reformatting headings and cleaning up code snippets. The PR does not introduce any new features or bug fixes to the codebase itself, which limits its impact. Additionally, it lacks a changeset, indicating no version bump is needed, further suggesting limited significance. Overall, the PR is average and unremarkable, fitting well within the criteria for a rating of 3.
[+] Read More
3/5
The pull request introduces a new shared UI library for the @mastra/playground, which is a moderately significant change. It includes a substantial number of files and lines of code, suggesting a comprehensive addition. However, the PR is still in draft status, indicating it might not be complete or fully reviewed yet. The lack of changesets also suggests that versioning considerations have not been fully addressed. While the PR seems to be well-organized and potentially useful, its draft status and absence of changesets prevent it from being rated higher.
[+] Read More
3/5
This pull request is primarily an automated chore to version packages for an alpha release, which is a routine task in software development. It introduces minor and patch changes across multiple packages, mainly updating dependencies to a new version of @mastra/core. The changes are not particularly significant or complex, as they mostly involve version bumps and changelog updates. While necessary for maintaining the project's versioning consistency, the PR lacks any notable improvements or innovations that would warrant a higher rating. Thus, it is average and unremarkable.
[+] Read More
3/5
The pull request addresses a specific issue in the documentation by correcting the API call input format, which is important for users following the workflow example. However, the change is minor, involving only a small correction in the code snippet. While it fixes a potential source of confusion, it does not introduce new features or significant improvements to the project. The lack of a changeset indicates no version bump is needed, further underscoring its limited impact. Overall, this PR is functional and necessary but not particularly noteworthy beyond its immediate context.
[+] Read More
3/5
The pull request provides a comprehensive guide and updates examples for integrating Mastra with NextJS, which is useful for developers working with this stack. However, it lacks a changeset, which is necessary for version bump considerations. Additionally, while the documentation is detailed, the changes themselves are not highly significant or innovative, as they primarily involve configuration updates and documentation additions. The PR is still in draft status, indicating it might not be fully complete or ready for final review.
[+] Read More
4/5
The pull request introduces a significant feature by adding support for multiple storage backends, including durable objects, PostgreSQL, and Upstash. It includes comprehensive test coverage and documentation for each new component. However, it lacks a changeset, which is necessary for version management, and the PR is still in draft status, indicating it might not be fully ready for review or merging.
[+] Read More
4/5
The pull request implements voice primitives across multiple platforms, adding significant functionality to the project. It introduces a comprehensive set of changes with detailed documentation and tests for each platform, indicating thoroughness and attention to detail. However, it lacks changesets, which are crucial for versioning and tracking changes. This oversight prevents it from being rated as excellent.
[+] Read More
4/5
The pull request introduces significant improvements to the PG Vector Index by adding index rebuilding for optimization, a comprehensive testing suite, and support for additional index types. The changes are substantial and well-structured, enhancing both functionality and performance testing capabilities. However, the PR is still in draft form and lacks changesets, which could be important for version tracking. Overall, it is a quite good contribution but not exemplary due to its draft status and missing changesets.
[+] Read More
4/5
This pull request introduces support for CommonJS (require) across multiple packages, which is a significant enhancement for compatibility with different module systems. The changes are extensive, covering numerous files and ensuring that both ESM and CJS formats are supported. The PR is well-structured and includes necessary updates to build scripts, indicating thoroughness. However, it is still in draft status and lacks detailed documentation or testing information, which prevents it from being rated as exemplary.
[+] Read More
4/5
This pull request is quite good as it introduces a significant change by deprecating an old package in favor of a new one that offers enhanced capabilities, such as both Text-to-Speech and Speech-to-Text. The PR includes thorough documentation updates, migration instructions, and comprehensive tests for the new package. However, it could be improved with more detailed migration examples or backward compatibility considerations. Overall, it is a well-executed and meaningful update to the project.
[+] Read More

Quantify commits



Quantified Commit Activity Over 14 Days

Developer Avatar Branches PRs Commits Files Changes
Ward Peeters 8 34/31/1 62 863 65663
YujohnNattrass 3 9/7/0 14 120 48801
Abhi Aiyer 8 10/8/2 47 499 46136
Tyler Barnes 4 32/32/0 40 272 32640
NikAiyer 5 23/20/2 43 335 25635
Ehindero Israel 4 21/19/2 26 128 20322
github-actions[bot] 8 27/26/0 35 96 11999
Your Name 3 0/0/0 24 65 8004
Tony Kovanen 2 5/5/0 7 65 5489
Taofeeq Oluderu 1 10/10/0 4 21 1970
dane-ai-mastra[bot] 2 0/0/0 3 217 1760
dayo 1 2/2/0 2 55 1297
Kenny 1 4/3/0 4 10 548
Sam Bhagwat 1 3/3/0 4 8 539
Shane Thomas 2 5/5/0 6 12 197
None (promptless[bot]) 7 7/0/7 7 9 141
Sathya Gunasekaran 1 1/1/0 1 2 42
Pulkit Sethi 1 2/2/0 2 7 14
Evgeny Klimenchenko 1 1/1/0 1 1 2
Dave Yen 1 1/1/0 1 1 2
User (za01br) 0 1/0/0 0 0 0
Tyler Plass (tplass-ias) 0 1/0/1 0 0 0
Hannes Furmans (umgefahren) 0 1/0/1 0 0 0

PRs: created by that dev and opened/merged/closed-unmerged during the period

Quantify risks



Project Risk Ratings

Risk Level (1-5) Rationale
Delivery 3 The project shows active development with numerous open issues and pull requests. However, the net increase in open issues (26 opened vs. 17 closed) and the presence of draft pull requests without changesets indicate potential risks to delivery timelines. The lack of structured planning, as evidenced by minimal milestones, further compounds this risk.
Velocity 3 While there is a high level of commit activity, with significant contributions from key developers like Ward Peeters, the disparity in commit volumes suggests potential dependency on certain team members. This could slow down velocity if these contributors are unavailable. The presence of unresolved issues and draft PRs also indicates possible bottlenecks.
Dependency 4 Several issues highlight dependency management challenges, such as TypeScript monorepo handling (#1996) and pnpm build failures (#1991). The reliance on external systems for telemetry and storage further exacerbates this risk. Draft PRs aiming to update dependencies are not yet integrated, posing additional risks.
Team 3 The team exhibits strong engagement with active discussions on issues and pull requests. However, the uneven distribution of workload among developers could lead to burnout or dependency on key individuals. The lack of contributions from some team members may indicate communication or engagement issues.
Code Quality 3 The codebase shows good practices like TypeScript usage and documentation. However, the rapid pace of changes and lack of explicit error handling in some files pose risks to code quality. Unresolved bugs in open issues also suggest potential quality concerns.
Technical Debt 4 The high volume of changes without corresponding changesets in several PRs indicates potential technical debt accumulation. Unresolved issues related to dependencies and integration further contribute to this risk. The rapid development pace necessitates careful management to prevent debt accumulation.
Test Coverage 3 While some PRs include comprehensive tests, the absence of direct test cases for certain files raises concerns about coverage. Issues related to bugs and regressions suggest gaps in testing that need addressing to ensure robust functionality.
Error Handling 3 Error handling is considered in some areas, such as workflow state management, but lacks consistency across the codebase. The presence of unresolved bugs indicates potential gaps in error handling mechanisms that need improvement.

Detailed Reports

Report On: Fetch issues



Recent Activity Analysis

Recent GitHub issue activity for the Mastra project shows a mix of bug reports, enhancement requests, and questions. Notably, there has been a surge in issues related to dependencies and integration with other tools or frameworks. Several issues highlight complications with TypeScript monorepos, pnpm builds, and integration with specific logging and database tools. A recurring theme is the need for better documentation and support for various integrations, as well as handling dependencies more robustly.

Notable Issues

  • #1996: This issue highlights a significant gap in handling TypeScript dependencies within a monorepo setup. The request for customizable Rollup configurations indicates a need for more flexible build processes.

  • #1991: The pnpm approve-builds command failing with Mastra suggests potential compatibility issues with package managers, which could hinder development workflows.

  • #1973: The UpstashTransport log drains error points to incomplete or incorrect implementation of features, which could affect users relying on logging capabilities.

  • #1970: The cyclical dependencies example not working as expected suggests possible regressions or overlooked edge cases in recent updates.

Issue Details

  • #1996: Created 0 days ago. Priority: High. Status: Open.
  • #1991: Created 1 day ago. Priority: High. Status: Open.
  • #1975: Created 1 day ago. Priority: Medium. Status: Open.
  • #1973: Created 1 day ago. Priority: High. Status: Open.
  • #1970: Created 1 day ago. Priority: Medium. Status: Open.
  • #1829: Created 10 days ago. Priority: Low. Status: Open.
  • #1679: Created 18 days ago, updated 7 days ago. Priority: Low. Status: Open.
  • #1678: Created 18 days ago, updated 1 day ago. Priority: Medium. Status: Open.
  • #1333: Created 42 days ago, updated 29 days ago. Priority: Medium. Status: Open.

Closed Issues

Recent closures include questions about deterministic evaluation results (#1990), installation errors (#1984), and broken documentation links (#1962). These closures indicate active maintenance and responsiveness to user queries.

Overall, the project is actively managed with a focus on addressing user-reported issues promptly, though some areas like dependency management and feature completeness require ongoing attention to ensure smooth user experiences.

Report On: Fetch pull requests



Pull Request Analysis for Mastra Project

Open Pull Requests

#1995: Add support for commonjs (require)

  • Status: Open, Draft
  • Created: 0 days ago by Ward Peeters
  • Description: Adds support for CommonJS (require) module format.
  • Notable Points:
    • This is a draft PR, indicating it is still under development.
    • Changes will be included in the next version bump.
    • Extensive changes across multiple package.json files, suggesting significant dependency updates.

#1989: feat: deprecate @mastra/speech-openai for @mastra/voice-openai

  • Status: Open
  • Created: 1 day ago by Yujohn Nattrass
  • Description: Deprecates the @mastra/speech-openai package in favor of @mastra/voice-openai.
  • Notable Points:
    • Introduces a new package with both TTS and STT capabilities.
    • Significant file additions and deletions, indicating a major package overhaul.

#1985: chore: version packages (alpha)

  • Status: Open
  • Created: 1 day ago by github-actions[bot]
  • Description: Automated PR for versioning packages in pre-release mode.
  • Notable Points:
    • Indicates ongoing development with alpha versions being prepared.
    • Multiple packages are affected, reflecting broad changes across the project.

#1979: Update curl to Test Workflow Example

  • Status: Open
  • Created: 1 day ago by User (za01br)
  • Description: Fixes incorrect output in a workflow example.
  • Notable Points:
    • No changeset found, meaning it might not trigger a version bump.
    • Aimed at improving documentation accuracy.

#1977: implement voice primitives

  • Status: Open, Draft
  • Created: 1 day ago by Yujohn Nattrass
  • Description: Implements voice primitives.
  • Notable Points:
    • No changeset found, suggesting no immediate version impact.
    • Introduces new dependencies and removes some existing ones.

#1971: [MASTRA-1974] PG Vector Index Update

  • Status: Open, Draft
  • Created: 1 day ago by NikAiyer
  • Description: Updates PG vector index handling and adds testing suite.
  • Notable Points:
    • No changeset found, indicating no planned version bump yet.
    • Focus on optimization and testing enhancements.

#1969: improve NextJS integration

  • Status: Open, Draft
  • Created: 1 day ago by Ward Peeters
  • Description: Enhances guides and examples for NextJS integration.
  • Notable Points:
    • No changeset found; documentation-focused improvements.

#1836: feat: shared @mastra/playground ui lib

  • Status: Open, Draft
  • Created: 10 days ago by Kenny (adeleke5140)
  • Description: Introduces a shared UI library for the playground.
  • Notable Points:
    • No changeset found; indicates ongoing development without immediate release plans.

Recently Closed Pull Requests

#1994 to #1965 (Various PRs)

These PRs cover a range of issues from fixing broken builds (#1994) to updating licenses (#1993), removing unnecessary scripts (#1992), and adding new features like the MastraVoice class (#1988). Notably:

  • PRs like #1994 and #1993 were closed quickly after creation, indicating urgent fixes or straightforward updates.
  • Several PRs (#1988, #1987) involved merging without any notable issues or blockers, showcasing efficient review processes.

Notable Observations

  1. Active Development on Voice Features: Multiple open PRs focus on voice-related enhancements (#1989, #1977), suggesting an area of active development and potential upcoming releases in this domain.

  2. Frequent Versioning: The presence of automated versioning PRs (#1985) reflects a structured approach to managing releases even during pre-release phases.

  3. Documentation Improvements: Several PRs aim to fix or enhance documentation (#1979, #1966), highlighting an emphasis on maintaining accurate and helpful resources for users.

  4. Unmerged Drafts: Some drafts have been open for several days (#1836), which might indicate complex features or dependencies awaiting resolution before finalization.

  5. Closed Without Merge: While most closed PRs were merged successfully, it's crucial to monitor any that close without merging to understand potential issues or shifts in project priorities.

Overall, the project appears to be under active development with a focus on expanding voice capabilities and refining existing features. The use of automated tools for versioning and documentation updates suggests a mature workflow aimed at maintaining quality and consistency across releases.

Report On: Fetch Files For Assessment



File Analysis

1. .changeset/huge-regions-attend.md

  • Purpose: This file documents a patch update for several packages, specifically addressing build errors by modifying contracts.
  • Structure: It follows the standard changeset format with package names and a brief description of the change.
  • Quality: The file is concise and serves its purpose well, providing necessary information for version control and change tracking.

2. client-sdks/client-js/src/client.ts

  • Purpose: Implements the MastraClient class, providing methods to interact with various resources like agents, memory threads, tools, workflows, and telemetry.
  • Structure: The file is well-organized with clear method documentation. Each method corresponds to an API endpoint interaction.
  • Quality: The code is clean and follows TypeScript conventions. However, error handling within API requests could be more robust to manage potential failures better.

3. packages/deployer/src/server/handlers/telemetry.ts

  • Purpose: Handles telemetry data retrieval from storage based on query parameters.
  • Structure: The function getTelemetryHandler is structured to handle HTTP requests and return JSON responses.
  • Quality: The code includes basic error handling using exceptions. It could benefit from more detailed logging to aid debugging.

4. speech/playai/src/index.ts

  • Purpose: Defines the PlayAITTS class for text-to-speech operations using PlayAI's API.
  • Structure: Includes configuration interfaces, a list of available voices, and methods for generating and streaming audio.
  • Quality: The code is comprehensive and well-documented. Considerations for API key management (e.g., environment variables) are evident. Error handling during API interactions is present but could be expanded for more granular control.

5. packages/cli/src/commands/create/create.ts

  • Purpose: Provides a command-line interface for creating new Mastra projects with customizable options.
  • Structure: Uses async functions to handle user input and project initialization.
  • Quality: The code is straightforward with user-friendly prompts. It effectively guides users through project setup but could include additional validation for user inputs.

6. packages/create-mastra/src/utils.ts

  • Purpose: Contains utility functions for version management in project creation.
  • Structure: Simple functions that read package versions and parse command-line arguments.
  • Quality: The code is concise and functional. It efficiently handles its tasks but lacks error handling for potential file read issues.

7. packages/cli/src/playground/src/domains/traces/mock-data.ts

  • Purpose: Provides mock data for testing telemetry traces.
  • Structure: A large array of trace objects with detailed attributes mimicking real telemetry data.
  • Quality: The mock data is extensive and appears realistic, which is beneficial for testing environments. However, the file size might impact performance during development.

8. .changeset/every-melons-pull.md

  • Purpose: Documents a patch update related to licensing changes across multiple packages.
  • Structure: Lists affected packages with a brief note on the change.
  • Quality: Clear and concise, effectively communicates the scope of the licensing update.

9. .changeset/fifty-moons-yawn.md

  • Purpose: Notes the removal of a postinstall script from certain packages.
  • Structure: Follows standard changeset format with package names and change description.
  • Quality: Adequate for tracking this specific change; however, additional context on why the script was removed could be helpful.

10. .changeset/lovely-results-open.md

  • Purpose: Introduces a minor update with the addition of the MastraVoice class in the core package.
  • Structure: Briefly describes the update without much detail on functionality changes.
  • Quality: Serves its purpose in documenting version changes but lacks detail on what MastraVoice entails or its impact on existing functionalities.

Overall Assessment

The source files reviewed are generally well-organized and adhere to good coding practices, particularly in documentation and structure. There are areas where error handling could be improved to ensure robustness against unexpected failures or inputs. The changesets provide clear version tracking but could sometimes benefit from additional context or rationale behind certain changes.

Report On: Fetch commits



Development Team and Recent Activity

Team Members and Their Activities:

  1. Ward Peeters (wardpeet)

    • Fixed build issues and added versioning.
    • Moved all licenses to MIT.
    • Entered and exited prerelease mode for versioning.
    • Updated LLM scripts for Windows.
    • Enabled turborepo in build steps.
    • Updated GitHub release workflows.
    • Improved core treeshaking.
  2. Ehindero Israel (TheIsrael1)

    • Implemented dynamic versioning for create-mastra dependencies.
    • Removed CLI post-install script.
    • Fixed mastra create workflow starter issues.
    • Optimized create mastra dependencies installation.
    • Moved client SDK to monorepo.
  3. Taofeeq Oluderu (Taofeeq-deru)

    • Made UI improvements, including workflow step alignment and column resizing.
    • Fixed issues in the Mastra dev web UI.
  4. Tyler Barnes (TylerBarnes)

    • Marked more examples as private.
    • Fixed lockfile errors in CI.
    • Shared getPackageManager() between create and init commands.
    • Fixed storage initialization race conditions.
  5. Yujohn Nattrass

    • Added MastraVoice class.
  6. Abhi Aiyer (abhiaiyer91)

    • Addressed various example issues, including making some private.
  7. Pulkit Sethi (pulkitsethi)

    • Fixed broken documentation links.
  8. Sam Bhagwat (calcsam)

    • Updated reference docs.
  9. Dave Yen (davecyen)

    • Fixed broken links in documentation.
  10. Shane Thomas (smthomas)

    • Added new examples, including NotebookLM Clone and whiteboard-to-excalidraw.
  11. NikAiyer

    • Updated Evals docs and examples, adding new metrics and tests.

Patterns, Themes, and Conclusions:

  • The team is actively engaged in maintaining and enhancing the project with frequent updates to the codebase, documentation, and examples.
  • There is a strong focus on improving user experience through UI enhancements, fixing bugs, and ensuring smooth installation processes.
  • The team is working collaboratively, with multiple members contributing to various aspects of the project, indicating a well-coordinated effort.
  • Licensing consistency has been addressed by moving all packages to the MIT license.
  • The project is in active development with continuous integration improvements, such as fixing build issues and optimizing dependency management.
  • Documentation updates and example additions suggest an emphasis on making the framework accessible and easy to use for developers.