Inspiration

More than 70,000 households around Chicago pay for electricity by the hour through ComEd's Hourly Pricing program, and almost 22,000 of them drive an EV. Their price follows the wholesale power market (PJM), so it moves all day. It can jump several times over on a hot evening, and on a windy morning it can even go below zero. Those customers saved $166 a year on average in 2025, but only by paying attention, and nobody checks a price chart at 6pm before starting the dryer. With AI data centers pulling more power every year, prices are only getting spikier.

I'm a finance and economics student focused on power markets. I wanted to see what happens if your home handles electricity the way a trading desk would: use the cheap hours, avoid the spikes, and never break the rules you set.

What it does

OffPeak is an agent for Alexa+ that runs your home's electricity on autopilot.

  • "Alexa, autopilot tonight." It reads ComEd's live and day-ahead prices and schedules the EV, dishwasher, and dryer into their cheapest hours before morning. It respects your rules (car charged to 80% by 7 AM, house never colder than 66°F) and tells you the cost and what you saved versus running everything now.
  • It acts on its own when prices spike. A watcher checks prices in the background. When power crosses your spike threshold, OffPeak doesn't wait to be asked. It pauses EV charging and moves it so the car is still ready by morning, holds the dryer, eases the thermostat within your comfort limits, and tells you what it did and what it saved.
  • It remembers your home. Your EV deadline, target charge, comfort limits, and tonight's plan carry across sessions. Say "I need the car by 6 and charge it to 90 percent" once, and every future plan respects it.
  • Short voice answers, detail on screen. Every tool returns one spoken sentence, and the Echo Show-style screen shows a 24-hour price bar with your devices pinned to the hours they'll run, what each device is doing, and a running savings total.
  • Plus quick answers like "What's power costing right now?" and "When should I run the dishwasher?"

How I built it

  • MCP server (Python, FastMCP). A self-hosted MCP server over Streamable HTTP with 10 tools: live price, forecast, cheapest-time planner, past-day prices, autopilot, home status, settings, device control, spike check, and spike replay. Each tool returns structured JSON plus a spoken field written for voice.
  • Live data. ComEd's public Hourly Pricing feeds: real-time 5-minute prices, hourly day-ahead estimates, and settled actuals. Before ComEd posts tomorrow's prices (around 4:30pm Central), OffPeak estimates the overnight hours from today's prices and labels them as estimates.
  • Planner. Finds the cheapest back-to-back block for appliances that have to run in one go, or the cheapest split hours for EV charging, all before a deadline.
  • Agent. Built on the Strands Agents SDK, connected to the MCP server as an MCP client, running Claude. It supports both Amazon Bedrock and the Anthropic API behind one setting.
  • Agent Skill. skills/offpeak/SKILL.md, in agentskills.io format, defines the voice persona, which tool to use when, appliance defaults, autopilot behavior, and boundaries. It's loaded at runtime with the Strands Agent Skills loader under strict validation.
  • Autonomy. A background watcher calls the check_for_price_spike MCP tool on its own. The reaction logic lives in the MCP server, so any Alexa+ client gets the same behavior.
  • State. The simulated home (devices, rules, plan, action log, savings) is saved to a file. All device changes go through one function, so real devices can replace the simulation later.
  • Simulated Alexa+ experience. A browser Echo Show with voice in (Web Speech API), voice out (speech synthesis), a listening light bar, and visual cards.
  • 25 automated tests cover parsing, planning, the autopilot, saved settings, and the spike reaction.
  • I'm a finance student, not a software engineer. I designed the product and directed the build, and wrote the code with Claude as an AI coding assistant, running and testing every piece myself.

Challenges I ran into

  • Hour-ending vs. hour-starting. ComEd labels prices by the hour they end, and the last hour of the day is labeled "12:00 AM." Getting midnight right across today and tomorrow took careful parsing and tests.
  • Tomorrow's prices don't exist until the afternoon. In the morning, "charge my car by 7am" could only see today's hours. Now OffPeak estimates tonight from today's prices, says so out loud, and the screen marks those hours as estimates.
  • Voice latency. Agent Skills normally load through an extra tool call. For voice I load the skill's instructions up front to save a round trip.
  • Not rescheduling into the spike. My first version moved EV charging into the exact hour that was spiking. The fix keeps the spike window off-limits.
  • Bedrock access. I planned to run Claude on Amazon Bedrock. I lost access to my original AWS account, and the new account I created was blocked from Bedrock ("Operation not allowed", even for Amazon Nova). Because the agent is provider-agnostic through Strands, I switched to the Anthropic API with one setting. Moving back to Bedrock is the same one-line change.

Accomplishments that I'm proud of

  • The spike moment: the agent notices, acts, explains, and puts a dollar figure on it, with no one asking.
  • Rules that hold. Every action respects the EV deadline and comfort limits.
  • It runs on real market data. While testing, Chicago power prices went negative, and the screen called it out.
  • I built it solo as a finance student.

What I learned

  • How hourly retail pricing passes the wholesale PJM market through to households, why prices sometimes go negative, and why when you use power matters as much as how much.
  • How MCP, Agent Skills, and an agent loop fit together. The skill is the product's judgment and voice; the MCP server is its hands.
  • Designing for voice means one sentence out loud and everything else on screen.

What's next for OffPeak

  • Real devices: Alexa smart home control, EV charging APIs, and smart thermostats.
  • More utilities and rate plans, starting with other PJM utilities with time-of-use and dynamic rates.
  • A "right plan for me?" check that replays a household's real usage against flat, time-of-use, and hourly rates.
  • Joining utility peak-rebate events automatically, so cutting usage on stressed days earns money.
  • Connecting the MCP server to Alexa+ directly with account linking, and moving the agent onto Amazon Bedrock.

Built With

  • agent-skills
  • amazon-bedrock
  • anthropic
  • claude
  • comed
  • fastapi
  • fastmcp
  • model-context-protocol
  • pjm
  • python
  • strands-agents
  • web-speech-api
Share this project:

Updates

Submission history