Add mongo database support to Agent program