Create agent.nut

Added agent code