feat: add Mastra framework extension#1037
Open
vijaygopalbalasa wants to merge 1 commit intocoinbase:mainfrom
Open
feat: add Mastra framework extension#1037vijaygopalbalasa wants to merge 1 commit intocoinbase:mainfrom
vijaygopalbalasa wants to merge 1 commit intocoinbase:mainfrom
Conversation
🟡 Heimdall Review Status
|
Adds a new framework extension that converts AgentKit actions into Mastra-compatible tools via getMastraTools(), enabling AgentKit usage with the Mastra AI agent framework. - Follows the same pattern as existing LangChain and Vercel AI SDK extensions - Maps AgentKit Action (name, description, schema, invoke) to Mastra createTool - Includes unit tests (3 test cases), README with usage examples - Targets @mastra/core >= 1.0.0 (1.x createTool execute signature) - Zod 4 compatible across all packages Resolves WISHLIST.md item: "Mastra" under AI Framework Support.
d92e244 to
ca2120b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
@coinbase/agentkit-mastra— a new framework extension that enables AgentKit usage with Mastra, the TypeScript AI agent framework (YC W25, from the team behind Gatsby).getMastraTools(agentKit)converts AgentKit actions into Mastra-compatible tools viacreateToolfrom@mastra/core/tools@coinbase/agentkit-langchainand@coinbase/agentkit-vercel-ai-sdkextensionsaction.name → id,action.description → description,action.schema → inputSchema,action.invoke → execute@mastra/core >= 1.0.0(uses the 1.xcreateToolexecute signature whereinputDatais the first parameter)Files added
Verification
tscclean)createToolAPI verified against@mastra/core@1.15.0pnpm-workspace.yamlglobframework-extensions/*auto-includes the new packageUsage
Resolves WISHLIST.md item: "Mastra" under AI Framework Support.
Test plan
pnpm --filter @coinbase/agentkit-mastra build— compiles cleanpnpm --filter @coinbase/agentkit-mastra test— 3/3 passpnpm --filter @coinbase/agentkit-mastra lint— no errorspnpm --filter @coinbase/agentkit-mastra format:check— clean