Taxation across borders is very unclear. My understanding is, that if you're not in the UK long enough to become resident for tax purposes, then you personally won't be liable for tax.
If your company is in the UK, then you'll pay corp tax if you declare dividends, but won't pay any tax or NI on your salary. Of course, if you have enough income to pay tax in the UK, you won't get the tax credits on the dividends.
If you company is not UK based, then is liable for tax on any profits it makes by virtue of you working in the UK. But you may have difficulty getting the agency to pay into your company account. Because, I think, if you don't pay that tax, they'll be liable for it.
I Am Not An International Tax Accountant or Lawyer.