Add an attempt at centralised handling when the Neo4j server times out
Gah, left behind reference to old string key
Initial (overcomplicated) pass at adding scoped perms to agent.