The deal gives staff at least three months' notice if they lose their jobs as a result of offshore outsourcing of IT systems or business processes. It also guarantees training for staff to help them find another job.
For IT staff, this could mean being trained in new programming languages or more general business skills. Barclays said the agreement was designed to minimise job losses.
The bank is due to announce a multimillion-pound contract to outsource its application development division to consulting giant Accenture in the next few months.
The deal, which is expected to be worth up to £75m a year, is likely to involve the transfer of jobs to India, according to Unifi. However, a Barclays spokeswoman said, "In the contract with Accenture, if jobs do go offshore as a result of the deal, there will be no compulsory redundancies."
Rory Graham, legal director of the National Outsourcing Association, said Barclays' agreement with Unifi formalised the employment packages increasingly offered by companies to help secure the support of IT staff for offshore deals.
"The Barclays deal enhances legal rights that are already there," he said.
Other companies were likely to follow Barclays' example and needed to be aware of the overlooked costs of offshore deals, he added.
Don't be blinded by savings claims >>
The hidden costs of outsourcing >>