main program agent.py implemented