Make the agent server mode optional