added json_from_response
continued work on the agent API, basic single agent modification finished