I'm not sure that its a limitation of how much is possible for the AI. Making the assumption that the AI uses some system of prioritizing its targets, I think it should not be difficult to make trade ships and ports be at least somewhat less of a target. After all, I've noticed no difference in trade income from trade ships being destroyed, only when ports are taken out, yet, the AI insists that trade ships are worth chasing down over other targets... like my defending fleet shooting them in the rear.

Running away on the other hand is obviously a more complex problem. You can make the AI more agressive at the risk of making it attack despite completely bad odds. I'm not sure what it uses or how it determines when to fight and when to run, but it runs far too often. Unfortunately this has become so predicatable that somewhere around the midgame, I've started to split my fleet between an attacking force, and another force that is waiting for the AI to run to it. Bear in mind that at any point if the AI decided to fight (roughly equal fleets, but mine split in two), I'd take serious losses before help could arrive... but the AI is too busy running away to notice.
Before I started to do that it was pretty frustrating, the AI would just bounce back and forth between two systems, jump, turn around, jump, and could seemingly do this as long as it wanted to. Eventually the small losses it took convinced it to head back through the wormhole from which it came... about an hour later.
To its credit, however, there has been a time where it showed up with a TEC fleet and taught me about taking out robotics cruisers first... my first time playing advent. Now Advent vs TEC seems a lopsided affair, but that's a different point entirely.
Another scenario of this is in a game that has gone on for about 5 to 6 hours, and at this point the AI has more credits than me, and a similar amount of metal and crystal... but is still running away, retreating, unwilling to take losses to inflict losses. It must have something that makes it choose to fight at its home planet, when I arrived there, the AI chose to fight a battle that it had zero chance of even inflicting losses, much less winning. In this case its home planet is by no means its last planet, on a large multi map at this point the AI controls about half of it and I control the other half.
This same game caused a minidump after saving and attempting to exit, though, admittedly a couple of my drivers may be a revision or two behind. That issue repeated itself in 1.0, and now in 1.5, and I'll see about updating drivers before submitting anything about it. Doesn't seem to happen in short games, only after about 3 to 4 hours has gone by.
The point I'm trying to make here really is I'd like to see the AI stand and fight -more often- than it does. I really in the end don't care how "intelligent" you make the AI, as the measure of that isn't what makes the game fun to play. It's the fighting... and the AI should do more of it.