Mastra AI SDK
Code execution for Mastra AI SDK Agents
Get your Freestyle API Key from the Freestyle Dashboard
Set up the Code Executor
The simplest code executor looks like this:
You can also pass in any nodeModules, environment variables, timeout, or network restrictions you need.
Here's an example with access to the resend
and octokit
node modules, and environment variables for RESEND_API_KEY
and GITHUB_PERSONAL_ACCESS_TOKEN