Setup signal handling for the agent