Skip to main content
Challenge

Reactive Energy Operations Assistant with Vercel AI SDK and Mastra AI

With New York's power supply struggling to keep up with electrification, building operators need smarter assistants to manage peak loads and maintenance. In this challenge, you will build a reactive 'Building Energy Assistant' using the Vercel AI SDK and Mastra AI. The system must process real-time telemetry from Building Management Systems (BMS) and utility grid status signals to suggest immediate energy-saving actions. You will use Mastra AI to manage the agentic state and persistent workflows, ensuring that maintenance tickets are generated automatically when energy spikes correlate with sensor failures. The Vercel AI SDK will power the front-end 'streaming' experience, allowing building managers to see real-time reasoning from the AI as it analyzes grid constraints (the 'Dark Days' scenario) and building demand.

Business OperationsHosted by Vera
Challenge brief

What you are building

The core problem, expected build, and operating context for this challenge.

Build a real-time building operations dashboard using Vercel AI SDK and Mastra AI to manage electrification risks and BMS telemetry.

Delivery guide

How work is evaluated

Evaluation

Evaluates the agent's response speed to energy spikes and its accuracy in creating maintenance tasks via Mastra.

Datasets

Challenge datasets

Public datasets, plus the private datasets you have access to.

Evaluation rubric

How submissions are scored

These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.

Dimensions
2 scoring checks
Binary
2 pass or fail dimensions
Ordinal
0 scaled dimensions
Dimension 1

State Persistence

Check if the Mastra agent maintains the building state across multiple turns.

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 2

Response Latency

Time from sensor data input to the first streaming action recommendation. • target: 500 • range: 0-5000

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Learning goals

What you should walk away with

  • Develop a reactive AI agent using Vercel AI SDK for real-time streaming data analysis

  • Utilize Mastra AI for persistent agentic workflows and maintenance ticket orchestration

  • Implement a tool-calling layer that connects BMS sensor data to LLM reasoning

  • Create a 'Grid Constraint' simulation to test the agent's ability to recommend load shedding

Resources and assets

Reference links and supporting material

Dataset notes

Simulated time-series data for a 40-story office building in Midtown Manhattan, including smart meter readings, HVAC setpoints, and simulated NYISO demand-response alerts.

Challenge setup

Evaluates the agent's response speed to energy spikes and its accuracy in creating maintenance tasks via Mastra.

Challenge input

Time-series JSON with 'watts_usage' and 'grid_status'

AI SDK

Enables the real-time reporting experience for building managers.

Mastra AI

Handles the complex logic of persistence and tool-calling for building maintenance.

Evaluated output

List of actions (e.g., 'Dim Lighting', 'Reset Setpoints') and ticket ID

Evaluation checks
  • Check if the Mastra agent maintains the building state across multiple turns.
  • Time from sensor data input to the first streaming action recommendation. • target: 500 • range: 0-5000
Configured evaluation evidence
  • Benchmark: Smart-Building-Ops-1.0
  • Response Latency target: 500
  • 1 public reference case
Configured runtime
  • JavaScript execution harness
  • javascript sandbox (unavailable on Versalist)

Summary shows the first task, up to three tools, and up to three evidence items. Open the technical recipe to view all configured items.

View technical recipe

Configured tools

Action Space
  • Mastra AI · Required
  • Vercel AI SDK · Optional
Observation
  • Galileo · Optional
Reward / Eval
  • Galileo · Optional
Orchestration
  • Mastra AI · Required
  • Vercel AI SDK · Optional

Evaluation contract

  • State Persistence · Weight 1
  • Response Latency · Weight 1

Metrics

  • Response Latency · Target 500

Benchmarks

  • Smart-Building-Ops-1.0
  • energy

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: Time-series JSON with 'watts_usage' and 'grid_status'

    Output: List of actions (e.g., 'Dim Lighting', 'Reset Setpoints') and ticket ID

    Execution harness: JavaScript

Evaluation tools

  • AI SDK · Frontend Streaming
  • Mastra AI · Agent Framework

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Reactive Energy Operations Assistant with Vercel AI SDK and Mastra AI