Initial version of Agent.m