Who can be treated as your agent
The reach of this power surprises people. Under Section 163, a person in India can be treated as the agent of a non-resident if they are employed by or on behalf of the non-resident, have any business connection with them, are a person from or through whom the non-resident receives any income, or are a trustee of the non-resident. Someone in India who has bought a capital asset from the non-resident can also be roped in. So a tenant paying you rent, a manager handling your Indian property, or a business partner through whom your Indian income flows can all fall within it.
Once treated as your agent, that person is a representative assessee under Section 160 and is made liable, under Section 161, for tax on your Indian income in the same way you would be, assessed in their own name but in that representative capacity. It is how the department reaches a non-resident's income without having to pursue someone abroad, and it is used, in particular, against Indian tenants and managers of NRI landlords.
The protections that matter
The power is not unchecked, and the protections are the whole of the defence. First, no person can be treated as the agent of a non-resident without being given an opportunity of being heard by the officer on whether they should be so treated. So an agent cannot simply be fixed with the liability out of the blue; they get to contest it. And the person must genuinely fall within one of the tests, and the principal must actually be a non-resident in that year, so if the alleged principal was resident that year, the section cannot be invoked at all.
Second, and importantly, the agent is not left out of pocket. Under Section 162, an agent who pays the tax has a statutory right to recover it from the non-resident, and to retain, out of any money of the non-resident's in their hands, an amount equal to the tax, and can get a certificate from the officer fixing that amount if there is a dispute. So a tenant or manager made to pay can lawfully keep back the equivalent from the non-resident's funds. Finally, the department must choose, it can assess the non-resident directly or the agent, but not both for the same income.