Maybe you may not like this suggestion. When you signed the Agreement, I hope you signed it willingly and, more importantly, because it suited your interests at the time. Based on that Agreement, the US company went ahead and filed for the H1-B. I am not sure if you are aware of the costs involved nowadays in the whole filing process—anywhere between US$3,000-5,000 per filing, including the attorney fees.
Now, just because it doesn't suit your current interests, if you want to drop out, who is to take the flak and who is to bear the costs of the whole process? If you want others to pay for YOUR actions, I am not sure if you think that's fair, but it definitely doesn't seem fair and reasonable to me—mind you, nothing with respect to the legal angle here.
Now to answer your questions:
1. What legal actions can they take against me?
Ans: They can take you to court. And going by the general standards of the timeframes of Indian courts, you know it can take years to get decided—either way. Whether you are ready or not to handle this diversion of your efforts, attention, and money (for the lawyer fees), when you should be focusing on your career, is up to you.
2. Do I really have to cough up the amount which was mentioned in the agreement?
Ans: It depends. If you want to settle this right now, it's better to pay up. If you want to give the legal way a shot, you can wait for now—but if you happen to lose the case, you will still need to pay up, maybe with the accumulated interest and costs. And if their advocate succeeds in arguing, the court may also grant penalties against you.
In these days of Social Networking, don't assume that the world wouldn't know—keep the worst-case scenario in mind (which is your employer knowing about it and possibly reacting adversely)—it's your call whether you want to take the chance.
3. What legal rights do I have in this case?
Ans: You can fight the case, more of 'when' they file it—rather than 'if'. Once it reaches the courts, it becomes sub-judice.
4. Although the company is US-based which did my H1B and offered me the job, however, my contract was with their Indian office. Can this contract be valid as I was never offered a position in India?
Ans: Your Agreement was with the Indian office, and you are a citizen and resident of India right now—so you are governed by the laws of India—NOT the USA. Also, I suggest reading the Agreement carefully. I am sure it would have been mentioned clearly about the purpose of the Agreement and that the US office will be filing for the H1-B.
Frankly, all I can say is: you are looking for ways to jump the gun—as simple as that. AND you want the company to bear the costs and face the consequences of YOUR actions. NOT FAIR. Ethics/propriety apart, I think it's also not in your long-term interest to drag this beyond a point.
Regards,
TS