An apparatus comprising: a number of lines in an electrical power grid, wherein the number of lines is configured to carry electrical power; a plurality of nodes in the electrical power grid, wherein the plurality of nodes is configured to control the electrical power carried on the number of lines; a communications network configured to carry information; and a number of agent processes associated with the plurality of nodes, characterised in that the number of agent processes is configured to: communicate with each other using the communications network; configure the plurality of nodes in the electrical power grid into a circuit by selecting a plurality of the nodes and the number of lines connected to the plurality of nodes to send electrical power from a number of sources to a number of loads based on a capacity to send the electrical power through the plurality of nodes and the number of lines; control a delivery of the electrical power through the circuit to the number of loads associated with the circuit; monitor parameters for the number of lines in the circuit; determine whether the parameters exceed threshold tolerances; and adjust the configuration of the plurality of nodes in response to determining that the parameters exceed threshold tolerances. a number of lines in an electrical power grid, wherein the number of lines is configured to carry electrical power; a plurality of nodes in the electrical power grid, wherein the plurality of nodes is configured to control the electrical power carried on the number of lines; a communications network configured to carry information; and a number of agent processes associated with the plurality of nodes, characterised in that the number of agent processes is configured to: communicate with each other using the communications network; configure the plurality of nodes in the electrical power grid into a circuit by selecting a plurality of the nodes and the number of lines connected to the plurality of nodes to send electrical power from a number of sources to a number of loads based on a capacity to send the electrical power through the plurality of nodes and the number of lines; control a delivery of the electrical power through the circuit to the number of loads associated with the circuit; monitor parameters for the number of lines in the circuit; determine whether the parameters exceed threshold tolerances; and adjust the configuration of the plurality of nodes in response to determining that the parameters exceed threshold tolerances. communicate with each other using the communications network; configure the plurality of nodes in the electrical power grid into a circuit by selecting a plurality of the nodes and the number of lines connected to the plurality of nodes to send electrical power from a number of sources to a number of loads based on a capacity to send the electrical power through the plurality of nodes and the number of lines; control a delivery of the electrical power through the circuit to the number of loads associated with the circuit; monitor parameters for the number of lines in the circuit; determine whether the parameters exceed threshold tolerances; and adjust the configuration of the plurality of nodes in response to determining that the parameters exceed threshold tolerances.