From FreeSpace Wiki
ai-undock Ai-undock (Ship goal) Causes the specified ship to undock from who it is currently docked with. Takes 1 or 2 arguments... 1: Goal priority (number between 0 and 89). 2 (optional): Ship to undock from. If none is specified, the code will pick the first docked ship.