Agreement-Based planning begins with the Product Owner having a collection of Stories (stories are chunks of work that can be done within a sprint) that he/she believes is actionable and sufficient for a sprint. They might have more or less but, for the purposes of this discussion we will assume they have more than enough.
At the beginning of Sprint Planning the Team discusses the Sprint’s goals. If the release is only one sprint long then the goal will be short and often internalized within the sprint stories. Once the overall understanding of the sprint is reached, the PO selects a single Story to consider first. The Team (including the Product Owner) negotiates the “doneness” Agreement for this single Story, and the Team (without undue influence from the Product Owner, aka don’t JAM the team) agrees to this single Story. What they are actually agreeing to is the Story’s “doneness” Agreement. Which is something the whole team believes can be easily accomplished within the sprint (the scrum team’s expectation is that we will have other stories in the sprint the 1st story should not be too large).
The Team may not be able to agree to do the Story, or might not even be able to agree on the “doneness” Agreement. This makes the Story in question an Epic, by definition, and the Team must decide what to do. Typical choices include agreeing to an Analysis Story to analyze the Epic, extracting a smaller Story from the Epic to do instead (putting the remainder back on the Backlog), or skipping the Story altogether and moving to the next one. The goal here is to make bitable work chunks so that a series of stories (chunks of work can be setup and knocked down within the sprint boundaries).
After a Story is agreed to, the Team (with the PO in the lead) has the option to re-prioritize the Story list, and the Team takes the next one to consider. Once again, the Team negotiates the “doneness” Agreement and decides whether not to add the Story to the list of already-agreed-to Stories. This process is repeated until the Sprint is “full” and the Sprint Backlog is complete.