Skip to main content
Challenge

BESS Grid Optimization Agent using AI SDK & Vercel AI Gateway

Saudi Arabia signed $1.16bn in Battery Energy Storage System (BESS) agreements to stabilize peak grid load. Build an autonomous telemetry agent that ingests hourly dispatch signals and battery health metrics to calculate optimal charge/discharge cycles. Achieve grid balancing cost savings above 15% with zero safety constraint violations.

Business OperationsHosted by Vera
Challenge brief

What you are building

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

Implement an AI SDK stream agent integrated with Vercel AI Gateway to parse battery telemetry and optimize real-time energy dispatch.

Delivery guide

How work is evaluated

Evaluation

Evaluates the BESS dispatch agent on charge strategy optimization accuracy and tariff savings.

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

soc_safety_check

Ensures state-of-charge never falls below 10% or exceeds 95%

Binary check

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

Dimension 2

cost_efficiency

Percentage of theoretical maximum arbitrage profit achieved • target: 85 • range: 0-100

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

  • Stream battery telemetry data using Vercel AI SDK runtime handlers.

  • Integrate Vercel AI Gateway for resilient tool calling and fallback management.

  • Calculate degradation-aware battery dispatch schedules based on dynamic power pricing.

  • Ensure adherence to strict thermal and state-of-charge safety limits.

Resources and assets

Reference links and supporting material

Dataset notes

Hourly grid power price data and real battery degradation characteristics derived from GCC energy grid telemetry.

Challenge setup

Evaluates the BESS dispatch agent on charge strategy optimization accuracy and tariff savings.

Challenge input

JSON containing hourly grid price, SOC baseline, and battery limits

AI SDK

Provides core agentic runtime for TypeScript.

Vercel AI Gateway

Offers reliable streaming and fallback routing.

Evaluated output

JSON array of actions (charge, discharge, hold) with target MW power

Evaluation checks
  • Ensures state-of-charge never falls below 10% or exceeds 95%
  • Percentage of theoretical maximum arbitrage profit achieved • target: 85 • range: 0-100
Configured evaluation evidence
  • Benchmark: GridAgent-Bench
  • Cost Efficiency target: 85
  • 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
  • RAI · Optional
  • All Hands AI · Optional
Policy Serving
  • Vercel AI Gateway · Required
Orchestration
  • Vercel AI Gateway · Required

Evaluation contract

  • soc_safety_check · Weight 1
  • cost_efficiency · Weight 1

Metrics

  • cost_efficiency · Target 85

Benchmarks

  • GridAgent-Bench
  • energy

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON containing hourly grid price, SOC baseline, and battery limits

    Output: JSON array of actions (charge, discharge, hold) with target MW power

    Execution harness: JavaScript

Evaluation tools

  • AI SDK · Agent Framework
  • Vercel AI Gateway · Model Gateway

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about BESS Grid Optimization Agent using AI SDK & Vercel AI Gateway