edited agent in views.py