Skip to content

Add Mastra as a TypeScript framework template #1429

@huanshenyi

Description

@huanshenyi

Description

Add first-class Mastra support to the AgentCore CLI TypeScript agent template flow.

AgentCore CLI already supports TypeScript templates for Strands and Vercel AI. Mastra is another TypeScript-first agent framework commonly used with AI SDK providers, including Amazon Bedrock. Adding a scaffolded Mastra template would let users create deployable AgentCore Runtime agents without bringing their own project structure.

Proposed scope:

  • Add Mastra to supported TypeScript framework validation.
  • Add Mastra to create/add agent framework selection.
  • Add a Mastra template renderer and TypeScript HTTP template assets.
  • Support Bedrock, Anthropic, OpenAI, and Gemini model providers.
  • Add tests and update asset snapshots.

Related to #1207, where a user reported manually validating a TypeScript Container agent using Mastra and AI SDK while debugging the TypeScript getting-started docs.

Acceptance Criteria

  • Mastra is available as a TypeScript framework in agentcore create.
  • Mastra is available as a TypeScript framework in agentcore add agent.
  • Mastra appears in the relevant TUI framework selection flows.
  • A Mastra TypeScript HTTP template is scaffolded with a working AgentCore Runtime entrypoint.
  • Generated Mastra projects can run locally and respond through /invocations.
  • Generated Mastra projects can be deployed to AgentCore Runtime and invoked successfully.
  • Unit tests and asset snapshots are updated for the new framework.

Additional Context

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions