In one common kind of plea agreement, the prosecution and defense agree on the charge(s) the defendant will plead guilty or “no contest” to and the sentence the prosecutor will recommend. (For more information, see What are the different kinds of plea bargaining?)
Defendants sometimes decide to reject the prosecution’s offer and to plead “open” rather than going to trial. In this situation, there are no promises as to the punishment the judge will choose. But defendants can actually find themselves in a somewhat similar situation even though they’ve agreed to a deal with the prosecutor—the prosecution and defense might agree only to the crime, and not the punishment. That said, by having agreed at least as to the crime(s), the defendant may be in a better situation than someone who pleads "open" to all the charges. (For more, see What does it mean to "plead to the sheet"?)
Example: Rosa is charged with second degree burglary and misdemeanor theft. She pleads guilty pursuant to an open plea agreement with the government. The agreement provides that she will plead guilty to the burglarly charge and the state will dismiss the misdemeanor charge, along with an enhancement for being a habitual offender. It is an open plea because the prosecution agrees not to recommend any sentence, leaving it entirely to the judge’s discretion. (Castor v. State, 245 S.W.3d 909 (Mo. Ct. App. 2008).)
If you are considering entering a plea without any—or with limited—sentencing assurances, it's crucial that you consult with an experienced attorney in your area. That lawyer may have, or be able to get, an idea of the sentence the judge would impose and should be able to advise you of your options.