@Kari91:
All CAG on HQ either buy or sell. They cannot do both.Enemy contact: If the freighter has the Fight Command Software MK1, then the pilot may make his ship safer. He buys fight drones in the current sector and equips his ship with more speed and agility. If the experienced pilot has a jump drive, then he can venture into unsafe sectors. If the pilot has the Fight Command Software MK2 in his ship and thus can use the Missile Defense Mosquito, then he will buy some Mosquito missiles too.
Friend/Foe behaviour: The pilot does not fly to sectors owned by an enemy race. Pilot considers his ship's list of Foes for this. The "Show as enemy, if enemy to me" setting should preferably be "No". The pilot will not even fly through hostile sectors, if he has no jumpdrive.
Trading Stations and Equipment Docks: When the pilot works for a Trading Station or en Equipment Dock, he will buy and only buy goods, if the dock does not allow other races to trade with it. Agent will sell and only sell goods, if the dock lets other races to trade with it. This applies to player HQ too.