Start your day with a briefing, not a manual search. Today, we turn our OpenClaw agent into a Financial Watchdog—an autonomous observer that tracks markets, monitors your portfolio, and pings you only when it matters.
In Day 9 of the 67 AI Lab, we’re moving from “reactive” assistance (chatting) to “proactive” assistance (monitoring).
Why a Watchdog?
Most of us have a routine: wake up, check stocks, check crypto, read headlines. It’s repetitive. An AI agent can do this faster, better, and without emotion.
By delegating this to OpenClaw, you get:
- Sentiment Analysis: Don’t just see the price; let the LLM tell you why it moved.
- Threshold Alerts: “Tell me if BTC drops below $80k.”
- Morning Briefings: A concise summary delivered to your phone while you drink coffee.
The Stack
To build this, we need three simple ingredients:
- Data Source:
yfinance(Yahoo Finance) is the easiest Python library for free market data. - Logic: A simple Python script to fetch data and format a message.
- Delivery: OpenClaw’s
messagetool (via Slack or Telegram).
Step 1: The Analyst Script
We’ll create a Python script in our skills/finance directory. This script fetches the data and constructs a prompt for our LLM to summarize.
# skills/finance/market_watch.py
import yfinance as yf
import sys
tickers = ["BTC-USD", "NVDA", "MSFT", "TSLA"]
data = yf.download(tickers, period="1d", interval="1d")
# Extract closing prices
summary = "Market Snapshot:\n"
for t in tickers:
price = data['Close'][t].iloc[-1]
summary += f"- {t}: ${price:.2f}\n"
print(summary)
Step 2: The Agentic Twist
Raw numbers are boring. We want analysis. We can pipe this output into an LLM call within OpenClaw.
Instead of just printing the price, we can use the web_search tool to find news associated with any major movers, then have the agent synthesize a “Reasoning” paragraph.
Example Prompt to the Agent:
“Here are the current prices: [Prices]. NVDA is up 5%. Search for recent news explaining this move and summarize it in 2 sentences.”
Step 3: Automating with Cron
We don’t want to run this manually. We want it waiting for us.
Using OpenClaw’s Cron tool, we schedule the job for 8:00 AM daily:
openclaw cron add --name "Market Brief" --schedule "0 8 * * *" --command "run_market_watch.sh"
Now, every morning, the Raspberry Pi wakes up, fetches the data, reads the news, and sends a formatted message to your private Slack channel.
The Result
At 8:00 AM, my phone buzzes:
📈 Market Watchdog
- BTC: $92,400 (+2%)
- NVDA: $145 (+5%)
Insight: NVIDIA shares are rallying following a new chip announcement at CES. Crypto markets remain stable despite regulatory news in the EU.
This is the power of local AI. It’s not just answering questions; it’s watching the world for you.
Next Up
Tomorrow, on Day 10, we tackle security. As we give our agent more power, we need to ensure it’s locked down. We’ll be discussing Security First: Hardening Your AI Agent.