Skip to content
/ weather-agent Public template

One Agent, one Workflow, one Tool, and some Scorers to bring you the weather in your city.

Notifications You must be signed in to change notification settings

mastra-ai/weather-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather Agent Template

This is a template project that demonstrates how to create a weather agent using the Mastra framework. The agent can provide weather information and forecasts based on user queries.

Overview

The Weather Agent template showcases how to:

  • Create an AI-powered agent using Mastra framework
  • Implement weather-related workflows
  • Handle user queries about weather conditions
  • Integrate with OpenAI's API for natural language processing
  • Use scorers to evaluate agent performance (tool usage, completeness, and translation quality)

Setup

  1. Copy .env.example to .env and fill in your API keys.
  2. Install dependencies: pnpm install
  3. Run the project: pnpm dev.

Model Configuration

This template supports any AI model provider through Mastra's model router. You can use models from:

  • OpenAI: openai/gpt-4o-mini, openai/gpt-4o
  • Anthropic: anthropic/claude-sonnet-4-5-20250929, anthropic/claude-haiku-4-5-20250929
  • Google: google/gemini-2.5-pro, google/gemini-2.0-flash-exp
  • Groq: groq/llama-3.3-70b-versatile, groq/llama-3.1-8b-instant
  • Cerebras: cerebras/llama-3.3-70b
  • Mistral: mistral/mistral-medium-2508

Set the MODEL environment variable in your .env file to your preferred model.

Environment Variables

About

One Agent, one Workflow, one Tool, and some Scorers to bring you the weather in your city.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •