First off, thank god it is the AI you face, that should make this situation at least possible...
Second, it depends on what faction you are...
The key here is going to be making a fleet that takes very few losses...you can take advantage of the fact that the AI is not going to be able to effectively counter a fleet that heavily spams one or two types of units, so....
First, I'd recommend investing in capital ships...not too many, but several...the goal here is to get high level capital ships, because the AI isn't as good at taking them out and it may be your only chance to make a fleet strong enough to go on the offensive...just make sure you don't have too many low level caps at any one time, this can be a killer to fleet supply...
Your fleet composition should be dependent on what faction you are...
If you are TEC, I highly recommend trying to get a lvl 6 sova for its ultimate ability...this will allow you to build ships much faster on the planet you are defending....to get the most of this ability, it helps to have lots of factories at this frontline planet since rapid manufacturing only lasts a limited amount of time...
As for the rest of the fleet, TEC are probably in the worst position...my best guess would be, go for massive amounts of bombers and hoskikos...this will allow you to focus fire very well on enemy targets...if you attack them, just wipe out some caps and some important structures, then retreat...you'll have to keep doing this, making sure you are taking much less losses than they are each time...if you are on defense, start with this fleet and as you suffer losses rebuild with LRMs and HCs...
If you are Vasari, this situation is manageable...lots of bombers, and lots of subverters....and I mean, lots of subverters...you can probably micro them to keep most if not virtually all of the enemy fleet disabled while your bombers take out the main enemy threats, caps and HCs...
If you are Advent, you are in luck...guardians with repulsion and lots of bombers...with enough guardians you should be able to do repulsion and protect your fleet for about...forever...I'd highly recommend antimatter rechargers for your defensive structures if you are advent, as running out of antimatter will doom this strategy...