Initialize agent with default config file, fix api_server connect error issues