Agent definition

An agent is a JSON document: a set of named functions, each an ordered list of commands. Wherever a value has to be computed, the document uses a Python expression.