Position type
Move agent code to typeclass `Agent`