The agent must run locally. This is achieved by [agent].RunOnServer.
This is probably public knowledge.
A thing I just discovered is that the database you're creating the index for has to contain at least one document. I stumbled onto this when working with an agent that creates a "history" database (empty on creation) from a template.
Another application copies documents into the history DB when changes are made. The history DB has a search interface, and therefore I create the the FT-index.
It's a simple workaround, create a dummy-document, create ft-index, delete dummy-document, but WHY should I have to do that?!?