The ruler Ptolemy I Soter is crowned by the Goddesses who preside over South Egypt and North. Wall-painting at Edfu, redrawn by S Pollaroli.

Mary Evans Picture Library/Everett Collection

“Where is the knowledge we have lost in information?”—T.S. Eliot, “The Rock” (1934)

Back when I was in college, I was elected librarian of the Harvard Lampoon in a contest that seemed unusually tight despite the fact that I think my run was uncontested. The undergraduate humor magazine is housed in a mock Flemish castle that dates back to 1909, and I was supposed to find funny books to stock the Lampy library, a quirky, circular chamber with a secret sliding bookshelf that opened up to a hidden room.

Libraries, for me, have always been portals to unexpected places, but in the coming years some of them could become casualties of the internet age. Much of this will be a topic of discussion at The Public Library Association’s (PLA) biennial Conference, set to be held next month in Indianapolis. Public school libraries are enduring budget cuts and staffing reductions. According to a Pew survey released in 2013, 54% of Americans ages 16 and older had personally used a library or library website in the past 12 months, down from 59 % the previous year. The American Library Association (ALA) reports that the use of library materials has increased in recent years, but recent numbers indicate that physical visits have dipped slightly.

To thrive in the digital present and future, today’s librarians should take inspiration from the ancients–and heed their mistakes.

Egypt’s Great Library of Alexandria was founded somewhere around 300 B.C. and endured until possibly 270 A.D. and, according to “Libraries in the Ancient World” by Lionel Casson, its leaders did more than just stock rolls of papyrus. The library thrived in part because of constant innovation.

Zenodotus, the library’s first director, is thought to have been the first to employ alphabetization as a mode of organization. Callimachus, who is thought to have succeeded Zenodotus as director, led a detailed bibliographical survey of all Greek writings and his work became an essential reference tool. Aristophanes of Byzantium, who was director from ca. 200 B.C. to 185 B.C., was said to have read through all the holdings in the facility, and when a poetry competition was staged before the king, he disqualified all the contestants save one on the ground of plagiarism, rushed to the library and, relying just on memory, was able to pluck out the papyrus rolls that proved his case.

That’s a full-service library.

The Ptolemies, the royal dynasty that ruled Egypt around that time, ran the library the way the Steinbrenners used to run the Yankees–they refused to be denied the things they needed to build a world-class organization. In one case, the Ptolemies posted the equivalent of a million dollars to borrow the official versions of the plays of Aeschylus, Sophocles and Euripides from Athens, and, once they got them, they simply refused to return them.

Yes, the Great Library of Alexandra racked up a million dollars in overdue book fines, which, in eyes of some librarians, should make it the Not-So-Great Library of Alexandra. I’m not saying libraries should steal what they need Ptolemy-style, but you have to admire that kind of aggressive application of library science.

Today’s libraries need that same lean-forward energy. According to a Pew survey, 34% of Americans overall think that “public libraries have not done a good job keeping up with new technologies,” while 55% disagree.

Barbara K. Stripling, president of the ALA, contends that libraries and librarians can reboot for the digital age. She wants ebook prices to come down, but says ebook offerings by libraries are nonetheless going up. She believes that libraries and librarians can use their expertise to become digital guides, helping people to refine their questions, identify authoritative sources, and learn how to find the best answers on their own. Sort of an even more advanced advanced search. “The constantly changing and disorganized nature of the information explosion can be overwhelming to individuals,” Stripling said in an email.

As a kid growing up in the tiny town of Brockport, N.Y., I used to steal away to the stacks of the Brockport College library and spend all day pouring through books. I remember reading Richard Wright’s autobiography “Black Boy” about how, as a child, he had to borrow a library card from a sympathetic white man because the Memphis library wouldn’t lend books to blacks. I recall reading Jorge Luis Borges’s 1941 fantastical short story “The Library of Babel” about an infinite library, and then seeing the words come true, in a way, in the digital age. “When it was proclaimed that the Library contained all books, the first impression was one of extravagant happiness,” Borges wrote. “As was natural, this inordinate hope was followed by an excessive depression.”

Books used to be handed down; ebooks are just downloaded in all their infinite glory, and the next generation often leaves the old electronics behind and looks for its own reading material. My son and daughter, by the time they’re my age, likely will have their own iLibraries of iTunes, iBooks, iPhotos and iMovies, if such things even exist by iThen.

In a digital age, we need librarians more than ever to help sort through it all. Libraries of the future shouldn’t be bookless because, like endangered species, the nondigitized physical texts of the past, and the ones that are still being printed, need a protected space.

Libraries have helped managed public collections, but perhaps they should move into advising us on how to wrestle with our personal digital data too, as we become increasingly overwhelmed with unsorted emails and camera phone photos. The librarians of the future might be human versions the operating system played by Scarlett Johansson in “Her”–likely without Johansson’s smoky voice, unfortunately–guiding us through the digital swirl.

There’s also room to reimagine the concept of a library’s holdings. The Great Library of Alexandria sought to beg, borrow and steal every piece of writing it could. Why not turn that around–but with a technological twist? Amazon.com recently revealed its hopes to someday deliver packages by drones. Perhaps the libraries of the future could have their own drones–to bring books to patrons, and share them between patrons, and maybe not just books, but video games and organic produce and other items that enrich and enliven people’s lives.There’s been lots of talk recently about an internet of things, linking the virtual with the physical–what about a library of things? Imagine if the holdings of a local library included the holdings of everyone who had a library card for the library who could be reached by a drone.

And–why not?–let’s get drones that have automated voices that sound like Scarlett Johansson.

Google recently launched a program called “Helpouts” which connects people with experts. There’s no reason future libraries couldn’t do something similar, acting as a hub for putting people in touch, via Skype or in person, with book authors, professors, and learned members of the community. A number of places around the world are already setting up such “living libraries,” allowing people to contact people in the know directly. The Ptolemies pioneered a similar concept, bringing together some of the leading thinkers of the Hellenistic world for the Museum at Alexandria, which was linked to the Great Library.

Libraries of the future could be places we go not to just check out books, but to check out each other–to participate, face to face, in cultural activities in a way we can’t do over the internet. Some of this is being done. Perhaps more of it needs to be done soon.

The Pew Research Center found that 90 percent of Americans ages 16 and older said closing their local public library would have an impact on their community. I think that’s because, whether they use the library regularly or not, people know that their communities need a cultural and intellectual center. What other institution can fill that role in the same way? Starbucks? You can linger there and read and chat as long as you want, but after awhile the price of those lattes adds up.

The great myth about the Great Library of Alexandria is that it was completely destroyed in a fire. That may have been true, but according to “The Library: A World History” by James W.P. Campbell and Will Pryce, there’s no definitive evidence why the library vanished.

What may well have destroyed the Great Library was a failure to continue to innovate. The library faced budget cuts and bureaucracy and damage from smaller fires that could well have impacted its bottom line. The institution’s papyrus scrolls faced the constant threat of rotting away in the Egyptian heat, and without the money to continually recopy them, the holdings may well have faded away, along with the library itself.

Do I need to connect the dots to today? Innovation matters.

Last time I visited the Lampoon library, some of the books I had purchased during my tenure as librarian were still on the shelves. The presence of the books reminded me of the importance of librarians as curators and custodians, of libraries as connections to the past and future, of libraries as safehouses for nerds and bookworms.

Yup, I was home.

The Lampoon library’s secret sliding bookshelf was still there too. I moved it back so my kids could peek behind the books into another world.

About Speakeasy

Speakeasy is a blog covering media, entertainment, celebrity and the arts. The publication is produced by Barbara Chai and Jonathan Welsh with contributions from the Wall Street Journal staff and others. Write to us at speakeasy@wsj.com or follow us on Twitter at @WSJSpeakeasy or individually @barbarachai.