ANALYSIS

AutoB2G: A Large Language Model-Driven Agentic Framework For Automated Building-Grid Co-Simulation

M Marcus Rivera Mar 30, 2026 Updated Apr 7, 2026 4 min read
Engine Score 3/10 — Logged

Niche academic research on building-grid co-simulation with limited broad audience appeal.

Editorial illustration for: AutoB2G: A Large Language Model-Driven Agentic Framework For Automated Building-Grid Co-Simulatio
  • AutoB2G is a framework that automates building-grid co-simulation workflows using natural language task descriptions, removing the need for manual programming.
  • The system extends CityLearn V2 to support Building-to-Grid interactions and uses an LLM-based orchestration layer called SOCIA to generate, execute, and refine simulations.
  • A directed acyclic graph (DAG) structure organizes simulation modules and their dependencies, guiding the LLM to retrieve complete executable paths.
  • Experimental results show the framework can coordinate building-grid interactions to improve grid-side performance metrics.

What Happened

A team of researchers — Borui Zhang, Nariman Mahdavi, Subbu Sethuvenkatraman, Shuang Ao, and Flora Salim — has introduced AutoB2G, a framework that automates building-grid co-simulation using large language models. The system allows users to set up reinforcement learning control policies for building clusters through plain-language descriptions rather than manual code.

The paper addresses a gap in existing simulation environments: most tools focus on building-side performance metrics without systematically evaluating how building operations affect the electrical grid. AutoB2G is designed to bridge both sides of this interaction. The growing availability of building operational data makes reinforcement learning an attractive approach, but existing workflows still rely heavily on manual configuration and programming expertise.

Why It Matters

As cities push toward net-zero energy targets, coordinating how buildings consume, store, and feed back electricity to the grid becomes a complex optimization problem. Reinforcement learning offers a way to learn control policies from operational data, but setting up the simulations typically requires substantial programming expertise and manual configuration.

AutoB2G lowers this barrier by accepting natural-language task descriptions. A building energy manager could, in principle, describe a coordination scenario in plain English and have the system generate and run the full simulation pipeline. This matters because the people who best understand building operations are often not the ones with deep programming skills.

The building-to-grid focus is also significant. Existing environments like CityLearn have emphasized building-side metrics such as energy consumption and thermal comfort. By extending CityLearn V2 to incorporate grid-level impacts, AutoB2G enables evaluation of how clustered building controls affect grid stability, peak demand, and power quality.

Technical Details

The framework is built on two core components. The first is an extension of CityLearn V2 that adds Building-to-Grid (B2G) interaction modeling, enabling simulations where building clusters interact with grid infrastructure rather than operating in isolation.

The second component is SOCIA (Simulation Orchestration for Computational Intelligence with Agents), an LLM-based orchestration layer. SOCIA takes a natural-language task description and “automatically generates, executes, and iteratively refines the simulator.” Because LLMs lack built-in knowledge of simulation function implementations, the team constructed a codebase organized as a directed acyclic graph (DAG) that explicitly maps module dependencies and execution order.

This DAG structure is central to the system’s reliability. When the LLM receives a task, it traverses the graph to retrieve a complete executable path covering all required simulation configurations and functional modules. This prevents the common failure mode where an LLM generates code that calls functions in the wrong order or misses dependencies.

The experimental results show that AutoB2G can “effectively enable automated simulator implementations, coordinating B2G interactions to improve grid-side performance metrics.” The system handles the full workflow from task description to simulation execution, including iterative refinement when initial configurations produce errors.

Who’s Affected

Energy researchers and building operations teams working on demand response, grid-interactive buildings, and urban-scale energy management are the primary audience. The framework is also relevant to reinforcement learning researchers who need configurable simulation environments for multi-agent control problems.

Utility companies evaluating the grid impact of coordinated building controls may find the B2G simulation capability useful for scenario planning and policy analysis. Government agencies developing building energy codes that account for grid interactions could also use the framework to model policy scenarios before implementation.

What’s Next

The paper demonstrates effectiveness on automated simulator implementations, but real-world deployment will require validation against physical building-grid systems. The reliance on LLM-generated code also means that simulation correctness depends on the quality of the underlying DAG structure and the LLM’s ability to follow it accurately under diverse task descriptions.

Scale is another open question. The framework builds on CityLearn V2, which models district-level building clusters. Whether AutoB2G can handle city-scale simulations with thousands of buildings and complex grid topologies has not been demonstrated.

Related Reading

Share

Enjoyed this story?

Get articles like this delivered daily. The Engine Room — free AI intelligence newsletter.

Join 500+ AI professionals · No spam · Unsubscribe anytime