What class does an alchemist become?

Alchemists are a bit weird if they became a caster class they would effectivly lose the ability to make concoctions for a while.

For alchemists (in lieu of a class) or even other crafters, I'd likely have them be a bit weird in that their XP is essentially spent on formula/samples they own (or could just be an xp tally that caps what they know, letting them swap formula they know in and out like a mages spells). So for example a basic healing potion is about 500gp, and the formula/sample counts as 250gp (or even 500), thus for 250xp they can know that formula or have aquired a sample untill they get a formula.

Obviously most alchemists would start out with a bunch of more mundane formula (for tinctures or the like to assist minor maladies), or skills to initially earn that first magic formula (typically as an assistant).  Though for me Alchemists can create all sorts of weird stuff not just potions (even if some stick to just potions).

Likewise they can effectivly spend 2000xp to gain a new proficiency slot, to develop their alchemical or ancillary skills.

As a rough concept this keeps them as zero level NPCs (while counting them as such for the typical demographics of the area), but gives them a variety of skills and knowledges specific to each NPC Alchemist.

As to making a class, we would need to consider whether it is purely for NPCs or are they likely to be PCs as well.