Moving agent service code to agent-api folder.