Back to Mastra

Weather Agent

templates/weather-agent/README.md

2025-12-181.9 KB
Original Source

Weather Agent

A template that provides an agent and workflow to fetch weather information for a given location. The workflow provides activity suggestions based on the weather. Built with Mastra.

Why we built this

This is a minimal kitchen-sink template to show off how to build agents and workflows with Mastra. It includes tools for API calls and scorers to evaluate responses.

Demo

<video controls width="640" height="360" src="https://res.cloudinary.com/mastra-assets/video/upload/v1772538187/template-weather-agent_axufas.mp4"></video>

This demo runs in Mastra Studio, but you can connect this workflow to your React, Next.js, or Vue app using the Mastra Client SDK or agentic UI libraries like AI SDK UI, CopilotKit, or Assistant UI.

Prerequisites

Quickstart 🚀

  1. Clone the template
    • Run npx create-mastra@latest --template weather-agent to scaffold the project locally.
  2. Add your API keys
    • Copy .env.example to .env and fill in your key.
  3. Start the dev server

About Mastra templates

Mastra templates are ready-to-use projects that show off what you can build — clone one, poke around, and make it yours. They live in the Mastra monorepo and are automatically synced to standalone repositories for easier cloning.

Want to contribute? See CONTRIBUTING.md.