AI SDKs
Mastra
Agentic adapter for the Mastra AI Agent framework.
- package:
@agentic/mastra
- exports:
function createMastraTools
- source
- Mastra docs
Install
Usage
Note that this example snippet also requires you to install the AI SDK’s OpenAI provider, the Agentic weather tool, and dotenv
.
Running this example
You’ll need a free API key from weatherapi.com
to run this example. Store it in a local .env
file as WEATHER_API_KEY
.
You’ll need an OpenAI API key
to run this example. Store it in a local .env
file as OPENAI_API_KEY
.