If San Francisco has no free appointments, consider another passport agency near you (i.e. "near" meaning within a day trip, perhaps Los Angeles). I myself couldn't get an appointment at the Washington agency and found myself on the 3am train to Philadelphia a couple of years ago. Otherwise, you can wait until 2 weeks before travel (or 4 weeks before a visa application is due) for expedited service.
Passport agencies may take walk-ins without an appointment. I know for certain that Washington and New York do, and recent Yelp reviews of the San Francisco office suggest it is also possible there. At Washington, walk-ins are served last— behind people with appointments or needing emergency service— meaning there is a chance that walk-ins might not get served at all, even if you have been waiting in line since 6am.
An appointment at a passport agency does not mean you see an agent exactly at that time; it is a means of regulating the crowd. At Philadelphia, for example, there were several stages of waiting: the line at the front door, the line for security screening, the line to check in and get your number, the wait until your number is called to submit your application materials, and then the wait to pick up the completed passport. You will get seen if you have an appointment, but depending on the crowd, it may still be an hour or two of waiting from the time you arrive to the time you actually see an agent.
If you have all your documents and have completed the application correctly, it is quite simple. Once my number was called, it only took a minute or two for them to stamp everything up and give me a pickup time, which was the same afternoon. I did see a number of people turned away, for example, for rookie mistakes— not bringing photographs (this isn't the DMV!), not printing out proof of travel (they can't stamp a cell phone screen), or filling out the wrong application. So make sure your ducks are all in a row.