Not every author has an agent when they get a book deal. It's like when bands get signed by record labels. Sometimes they get record deals when they don't have an agent or a manager. As long as you are happy with the terms of the contract (advance, payment from sales, number of books/records contracted, etc.) and you have an entertainment lawyer check the fine print (I think Rogelio had one of his lawyers look at Jane's contract before she signed it), then you don't absolutely have to have an agent.
This is virtually unheard-of, although an attorney can function as an agent/manager. I don’t know of any publishing house that will look at unagented submissions, for legal reasons. One of my books turned into a very prominent TV show, so I’m familiar w this strange world.