Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather Alert Agent

An AI-powered weather notification agent built with Goose + Infobip.

Ask Goose to check the weather and it sends you a notification — no coding required.

How it works

You → Goose → wttr.in (weather) → Infobip Message MCP → your phone
  1. You tell Goose "Check the weather and send me a message"
  2. Goose fetches live weather from wttr.in (free, no API key)
  3. Goose sends a message via the Infobip Message MCP server (SMS, RCS, or Viber)
  4. A scheduled recipe runs daily at 8am automatically

What you'll need

  • macOS, Linux, or Windows computer
  • Infobip account (free trial) — sign up here
  • Infobip API key with messaging scopes
  • A sender name set up in Infobip for your chosen channel (SMS, RCS, or Viber)
  • A phone number to receive test messages
  • An Anthropic API key (or other LLM provider)

Installation

1. Install Goose

macOS (Apple Silicon):

curl -sL "https://github.com/aaif-goose/goose/releases/download/v1.37.0/goose-aarch64-apple-darwin.tar.gz" -o /tmp/goose.tar.gz
tar xzf /tmp/goose.tar.gz -C /tmp
mv /tmp/goose ~/.local/bin/goose
chmod +x ~/.local/bin/goose

Other platforms: download from the releases page.

Verify:

goose --version

2. Set up your LLM provider

Add to ~/.zshrc or ~/.bashrc:

export GOOSE_PROVIDER=anthropic
export GOOSE_MODEL=sonnet
export ANTHROPIC_API_KEY="sk-your-key-here"

If using a custom endpoint:

export ANTHROPIC_HOST="https://your-custom-endpoint.com"

3. Set up Infobip

  1. Log in to your Infobip account
  2. Go to Security > API Keys and create an API key with messaging scopes
  3. Go to Channels and set up a sender for SMS, RCS, or Viber

4. Configure the Message MCP extension

Edit ~/.config/goose/config.yaml:

extensions:
  infobip-message:
    name: Infobip Message
    uri: https://mcp.infobip.com/message
    type: streamable_http
    enabled: true
    timeout: 300
    headers:
      Authorization: "App YOUR_INFOBIP_API_KEY"

Replace YOUR_INFOBIP_API_KEY with your actual API key.

Usage

Interactive

goose

Then paste:

Check the weather in Newcastle and send a text message to 447700900123 from sender IBSelfServe.

Note: IBSelfServe is a Viber sender name configured in Infobip. Replace it with your own sender name, and 447700900123 with your actual phone number (E.164 format, no +).

One-liner (non-interactive)

goose run -t "Check the weather in Newcastle and send a text message to 447700900123 from sender IBSelfServe."

Automating with a recipe (no cron needed)

Goose has a built-in scheduler. Create a recipe and schedule it — no cron required.

Step 1: Create the recipe

Save this as weather-message.yaml:

version: "1.0.0"
title: "Daily Newcastle Weather Message"
description: "Fetches the weather for Newcastle and sends it as a text message."
prompt: |
  1. Run this shell command to get the weather:
     curl -s "wttr.in/Newcastle?format=3"
  2. Send the result as a text message to 447700900123 from sender IBSelfServe.
  3. Confirm the message was sent successfully.

extensions:
  - type: platform
    name: developer
    bundled: true
    description: "Run shell commands"
    timeout: 30
  - type: streamable_http
    name: infobip-message
    uri: https://mcp.infobip.com/message
    timeout: 300

settings:
  goose_provider: anthropic
  goose_model: sonnet
  max_turns: 10

Important: The recipe's extensions section must match your actual authentication method. If your API key is in your global config.yaml headers (recommended), the recipe needs headers not env_keys. See the example above.

Step 2: Add the recipe to Goose

The recipe needs to be copied to Goose's scheduled recipes directory:

mkdir -p ~/.local/share/goose/scheduled_recipes
cp weather-message.yaml ~/.local/share/goose/scheduled_recipes/daily-newcastle-weather.yaml

Step 3: Schedule it

goose schedule add \
  --schedule-id daily-newcastle-weather \
  --cron "0 0 7 * * *" \
  --recipe-source ~/.local/share/goose/scheduled_recipes/daily-newcastle-weather.yaml

This runs daily at 7:00 UTC = 8:00 AM BST. The cron format is 6-field (seconds, minutes, hours, day, month, weekday).

Step 4: Manage the schedule

Action Command
List schedules goose schedule list
Test immediately goose schedule run-now --schedule-id daily-newcastle-weather
View past runs goose schedule sessions --schedule-id daily-newcastle-weather
Remove schedule goose schedule remove --schedule-id daily-newcastle-weather

How Goose schedules work

Goose's scheduler runs in the background only while Goose is running (Desktop app or CLI). If Goose isn't open at the scheduled time, the job is skipped. The scheduler does not run as a background daemon.

Troubleshooting: If you didn't get a scheduled message, check:

  1. goose schedule list — verify the schedule exists and has run
  2. goose schedule sessions --schedule-id daily-newcastle-weather — check past session logs
  3. Check your Infobip account for delivery status — the Message MCP has no log tools
  4. Make sure Goose was actually running at the scheduled time
  5. Test immediately: goose schedule run-now --schedule-id daily-newcastle-weather

System cron as fallback

If you want the alert to run even when Goose isn't open, use a system cron job:

crontab -e

Add this line (runs at 8am daily):

0 8 * * * cd /path/to/weather-alert-agent && /usr/bin/env GOOSE_PROVIDER=anthropic GOOSE_MODEL=sonnet ANTHROPIC_API_KEY="sk-..." ANTHROPIC_HOST="https://your-endpoint.com" /usr/local/bin/goose schedule run-now --schedule-id daily-newcastle-weather >> /tmp/goose-cron.log 2>&1

Replace the paths and API key with your actual values. This way the job fires regardless.

Project structure

weather-alert-agent/
├── README.md              ← You are here
├── goose-config.md        ← Configuration guide
├── recipe.yaml            ← Reusable Goose recipe
├── prompts/
│   └── examples.md        ← Copy-pasteable prompts
└── screenshots/           ← Example screenshots (coming soon)

Customize it

  • Change city — edit the recipe prompt or use wttr.in/London?format=3
  • Add SMS failover — the Message MCP doesn't support failover; use the Viber MCP instead, which has built-in failover options — note it exposes more tools and will consume more tokens
  • Rich forecasts — use wttr.in/Newcastle?format=j1 for full JSON with 3-day forecast

Resources

About

AI-powered weather notification agent built with Goose and Infobip MCP

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors