I have gone through the Live Agent Developer Guide (http://www.salesforce.com/us/developer/docs/live_agent_dev/live_agent_dev_guide.pdf), and I think I have a good idea on how to put together a custom live agent solution. One thing I would like to do is, when the chat ends, take the body of the transcript and add it to a custom field in the Case record. The Case record must be the one that is created from the pre-chat form. I'm guessing I can do this in Apex, but how do I associate the data (live chat transcript, Case ID) with the Apex controller?
You can automatically attach the transcript to a record i.e. a case by using the saveToTranscript method. Depending on wheter you are using the pre-chat API or deployment API all you have to do is follow the instructions on the developer guide to automatically related the transcript to the case.
<input type="hidden" name= "liveagent.prechat.findorcreate.saveToTranscript: String entityName" value= "String transcriptFieldName" />