Xpage - Link - agent.run() don't run?

Hi,I can’t run a agent from a link script.

My link code is…

var agente:NotesAgent = database.getAgent(“test”);

agente.run();

but returns the message…

Script interpreter error, line=94, col=8: Exception occurred calling method NotesAgent.run() null

what I doing wrong ?

Subject: Agent.run()

What is the Target for your agent? I reproduced that if mytarget was selected documents. Changing target to none, the agent worked.