Goals are instances of the Goal class. Its constructor receives as a parameter the expression of the Goal.
g = Goal(expr("value(4)")) agent.addGoal(g)