aws / aws/agentcore-cli

Add Mastra as a TypeScript framework template

Open
#1,429 0 comments 3 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
283
Forks
95
Avg merge
1d 2h
Merged PRs (30d)
183

Description

### 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.