We fit barcodes to our pcbs.
We have set it up as a mechanical cell within the library and then this is place onto each pcb.
The X Y co-ordinates of this barcode are then included in the gencad file.
This information your AI can use to auto place a barcode - similar to any other SMT component.
Do you place it manually every board?
Sorry for delay in reply - as I had to check with our production.
Newer designs they are being fitted by machines, but older designs still have them manually fitted (this is probably something to do with what equipment is available to each production line)