While trying to debug an agent which had stopped working I will usually use the console to force the agent to run as follows:

    tell amgr run “database.nsf” ‘AgentName’

This should run the agent as it would when the selected trigger normally kicks it off (new/modified documents in this case). With 8.5.1 the syntax above would not work with a database that had a space, in the filename, returning the error:

    AMgr: Syntax for run command: tell amgr run "db filename" 'agent name'

By trial and error I eventually had it running using the syntax below:

    tell amgr run ‘database.nsf’ ‘AgentName’

A very frustrating bug.