There is no programming on the XBee. Think of it as a serial cable running at a given baud rate (default 9600).
The XBee is a 3V CMOS level device. If the ESP is also at 3V, then it should be able to connect Tx to Rx and Rx to Tx.
In your code for your ESP, just use the XBee as a cable.