There's 2 ways I think... 1 is with actual AI and the other is with the Traffic tool from CSP (?)
But both need modified server files...
There is other serverfiles with extended options in a .cfg.. Set AI traffic to true and you can dedicate AI to fill slots... And assign cars and livery to them..
There are a couple of YT tutorials on how to go about setting it up...
I'm planning on trying this, but due to time constraints and it not being really straightforward I haven't actually done it myself yet.
AI is just normal AI, so it doesn't have the clipping and cars behaving like assets more as cars.. But it's really CPU intensive and you're taking up pit boxes. And with the CSP tool you can spawn up to 2000 cars and is way less CPU intensive, and you can still use all the pit boxes.. but they drive IN the road (wheels sink into the asphalt look). And another downside is that the fake "AI" traffic does not show in replays. They do have full collision.. So if you're not trying to record replays for edit, this does what it needs to. It introduces moving obstacles driving around.. Like, you know, traffic..
Recently it was updated that they do actually try to avoid hitting you. And they also added that "AI" traffic changes lanes...
I've been using the CSP traffic tool in single player.. That's why in single player CSP traffic tool only works in practice...
But both should be possible on a server.. Not at the same time but either/or.. Normal AI won't see CSP traffic, so that gets messy rather quickly...
Google "2REAL traffic assetto corsa" for an introduction to CSP traffic tool.
Google "running assetto corsa server with AI" for how to set up normal AI on a server
Both require quite some setting up, and 2Real traffic might cause you to be kicked on "normal" servers, because of a checksum mismatch, because it involves adding additional stuff to the trackfolder (additional lines zones and intersection info, you can set speed per zone, u-turns allowed per zone, intersection behavior etc etc).. There are tracks that already have all the lines and junctions laid out... (2REAL traffic track mods, Union Island, some parts of SRP for example) But if you have time and patience you could make all the lines, zones and intersections yourself too...