If that’s the case, you just need to create an independent snippet on MODx. SO basically the snippet will act only as include statement to include the output to MODx page. That will be a lot easier, considering you won’t need MODx API at all. For AJAX, you can look for moo.ajax or prototype. You can choose whichever that suite your needs.
FYI, there is no pre-made API solution available in MODx to do AJAX processing like SAJAX or other php AJAX framework, but when you started to do it from scratch, you will realize that both of this server side and client side technology are not really connected together, they just work as if they are seamlesly integrated into the system, which most of AJAX framework trying to do. Usually they just add more complexity to the system. It’s just from my opinion though.