>>48464789I think the manga pretty much states it clearly that Agatha was Oak's rival during their childhood.
Also Pokémon Masters EX, there's the following:
"In Pokémon Masters EX, during her Sync Pair Story "A Day with Agatha", Agatha explains how she and Oak met. Oak was always friendly and open when he was young and would talk to Agatha and try to help her. Though he was only trying to be nice, it still annoyed Agatha because she wanted to be left alone. Agatha would battle Oak to try and get him to go away, but he was always better than her, and so she would battle him again and again. Eventually, the time they spent together began to mean a lot to Agatha. As a result, when Oak got the idea to invent the Pokédex and subsequently stopped battling, Agatha felt betrayed."