Hi
The ecovia (a bike road, mostly on dirt roads) between Lagos and Sagres is a nice way to know the countryside and the less turistic places, however a bit hilly.
If you are used to bike on dirt and ofroad than this the way to go.
On the other side you have in fact a road you can follow until Sagres but, as someone already said, can be a bit crowded.
Anyway, you can try both taking the ecovia to Sagres and returning on the national road.
There are not many other alternatives like secondary roads. These possibility is really complicated.
I guide bike tours crossing the Algarve and the less prepared people have some difficulty on the section (Lagos/Sagres) via de ecovia but is really beautiful.
More informations about Portugal? please visit my bolg at: http://www.walkinginportugal.blogspot.pt/
Do not hesitate to send me an email if you need more informations.
Enjoy your stay.
David