add more tests for agent