Fix bugs and implement agent interactions