Agents

An agent maps observations to actions. In flat mode with central_agent=True, one action vector covers the community. In decentralized flat mode, the environment uses one vector per building. Whether those decisions share information depends on the controller, not just the number of vectors.

Controller choices

The classic RL agents/wrappers use flat spaces. Entity-mode controllers consume tables, masks and edges and must handle the active population and action contract. The native BAU accepts both interfaces through its flat action path.

Create your own

Start with Custom agents and rewards: a complete agent/reward example with the correct reset/step loop. For the base lifecycle, see citylearn.agents.base.Agent.

Use Controller examples for learning-agent notebooks. Select the reward separately from the controller and evaluate final results using KPIs.