This book was published before 1980, I think.
A group of petty criminals buy a second hand space ship to trade with planets in the outer reaches. Think medieval culture. While there, pirates/bad guys turn up and start to kill/steal from the locals. The petty criminals decide to help out by pretending to be the space patrol. When they are in deep trouble their ship's AI calls for help to the real space patrol. It turns out the second hand ship has an ex-space patrol AI as computer.
I've been looking for this for over 30 years now. I read it as a teen.
EDIT Actually not sure this is what i remember????? It seems to be the same setting but the book i read was before (book time wise this one)Vaughan Roberts was on his first adventure with the AI ship... Am checking out ALL the books i can find
While i cannot find the exact story i remember i am accepting this as answered as it IS the right storyline/charectors :) Cheers all:)