redesign the Create agent api