How much does it cost to get a patent? It depends largely on three things:  kind: utility or design,  complexity, and  countries where protection is sought. But some inventor status will determine filing fee discounts.
Patent Agent Legal Services? When it comes to legal rights, in pertinent part, property rights, there are licensed professionals who offer help in exercising or protecting your rights. Lawyers. For patents there are patent practitioners (agent or attorney) to deal with these special rights.
Patenting software, is the same as patenting anything else, and, it can all be done online from the comfort of your home or workshop. The complex nature of the requirements means you might want professional help.