Media

Audiobookshelf

See who’s listening on your Audiobookshelf server without opening it: each book or episode with its cover, how far along it is and on which device, how many hours everyone listened each day this week, the newest books and episodes, and what each library holds. The page turns red only if the server stops answering or refuses the key.

Install in LegatoSet it up by hand ↓

Audiobookshelf
Listening
10 h5 h0 h
Tue
Wed
Thu
Fri
Sat
Sun
Today
Server
This week
25.7 h · 4 listeners
Last backup
18h ago
Library size
214 GB
Version
2.37.2
Now listening
Salt and Signal · Maren Holt
riley · Apple iPhone 164.2 of 9.5 h
Orbit of Small Things · Elias MorrowPaused
sam · Mac OS 15.6 Firefox6.1 of 11 h
A Map Drawn Wrong · Kettle and Compass
jordan · Google Pixel 912 of 45 min
Libraries
Recent listening
  • The Quiet Enginesam · Apple iPad Air52m · 3h ago
  • Ridge Linesjordan · Google Pixel 945m · 8h ago
  • The Cartographer's Daughteravery · Samsung Galaxy S251h 10m · Yesterday
  • Salt and Signalriley · Apple iPhone 161h 32m · Yesterday
Updated 12 min ago

What you’ll see

Audiobookshelf

  • Health: in Details. Once the server stops answering, or answers that the key isn’t allowed, the health card turns red, and Legato sends a notification. Nothing else counts as a problem.
  • Listening: the last seven days in hours, for everyone on the server, with today in bold. A session counts on the day it started.
  • Server: this week’s hours and how many people listened, when the last backup was made ("No backups" if there are none), how much space the libraries take, and the server’s version.
  • Now listening: each book or episode someone is playing, with its cover (or a headphones or podcast icon when it has none), the author or the podcast, who’s listening on what, and a bar with "4.2 of 9.5 h" (episodes and anything under an hour in minutes). A player that hasn’t reported for two minutes says Paused. After 16 minutes of silence the row goes, even though Audiobookshelf keeps the session open for a day and a half.
  • Recently added: a shelf of the four newest books and podcast episodes across your libraries, with their covers. Each opens in Audiobookshelf.
  • Libraries: each library with what it holds ("412 books · 3,870 h", "9 podcasts · 1,204 episodes"). Each row opens that library’s page.
  • Recent listening: the last four sessions that aren’t on Now listening, each with who, how long and when.

Library

One page for every library, titled with its name. A book library shows how many books, hours and authors it has and its size, then the fifteen newest books. A podcast library shows its podcasts, episodes, hours and size, then the fifteen newest episodes. Each opens in Audiobookshelf.

Status

  • Watches whether the server answers and takes the key, not who’s listening.
  • Red once the server stops answering or refuses the key.
  • Someone listening, a pause or an old backup never counts as a problem.
  • Notifies you when it turns orange or red.

How it connects

The pages read your server’s own API with your API key, sent as Authorization: Bearer. Sessions, backups and the server’s totals answer only admin and root users, so the key has to be one of theirs.

Requests it makes on its own 11

  • GET/api/sessions/open

    Who’s playing what, how far along, and when their player last reported.

    AudiobookshelfOnce a minute, and every 15 minutes

  • GET/status

    That the server answers, and its version.

    AudiobookshelfEvery 5 and 15 minutes

  • GET/api/backups

    The backups and when each was made. Checks the key too, since /status answers without one.

    AudiobookshelfEvery 5 and 15 minutes

  • GET/api/sessions?itemsPerPage=100&sort=updatedAt&desc=1

    The newest 100 listening sessions, for the week and Recent listening.

    AudiobookshelfEvery 15 minutes

  • GET/api/stats/server

    How much space the libraries take.

    AudiobookshelfEvery 15 minutes

  • GET/api/libraries

    The libraries, their names and kinds.

    Audiobookshelf, LibraryEvery 15 minutes

  • GET/api/libraries/{param.id}

    The library’s folders, so its episodes are asked for once.

    LibraryEvery 15 minutes

  • GET/api/libraries/{id}/stats

    How many items, hours, episodes and authors each holds.

    Audiobookshelf, LibraryEvery 15 minutes, for each library

  • GET/api/libraries/{id}/items?sort=addedAt&desc=1&limit=8&minified=1

    The newest books in it (15 on the library’s page).

    Audiobookshelf, LibraryEvery 15 minutes, for each library

  • GET/api/libraries/{id}/recent-episodes?limit=8

    The newest episodes of a podcast library (15 on its page). A book library answers that it has none, and is left out. If a podcast library’s episodes don’t come, its page says so rather than showing it empty.

    Audiobookshelf, LibraryEvery 15 minutes, for each library

  • GET/api/items/{id}/cover?width=144&format=jpeg

    Covers, kept on this Mac.

    Audiobookshelf, LibraryWhile the panel shows the row

With the overview open and two libraries, that’s about 130 requests an hour, plus a cover the first time each one shows. Up to 10 libraries get their totals and newest items. Covers come only from your server, never from another site, and Load icons from the web in Settings doesn’t affect them. The pages have no buttons: Audiobookshelf can’t stop or message someone else’s player, and the pages never change your library.

Sources and buttons explains each part of a page.

Set it up

  1. Make an API key. Sign in to Audiobookshelf as an admin or root user, open Settings → API Keys, and add a key for that user. Audiobookshelf 2.26 added API keys. Leave the expiry off, or note when it runs out. Audiobookshelf’s docs cover the rest of the server.
  2. Save it in Legato. In Settings → Secrets, save the key under audiobookshelf, bound to your server’s address. You can also link a 1Password reference.
  3. Add the pages. Paste the prompt into your agent, or download the two pages and run /Applications/Legato.app/Contents/Helpers/legato set audiobookshelf-library audiobookshelf-library.json, then legato set audiobookshelf audiobookshelf.json. Keep the ID audiobookshelf-library: every library row opens it with that library’s id.
  4. Point them at your server. Change http://audiobookshelf.local:13378 to your server’s address on every source and link of both pages. Docker’s usual port is 13378. A server behind a reverse proxy works at its own address (https://books.example.com). The installer doesn’t take an address with a path, such as /audiobookshelf; edit the downloaded pages for one, putting the path in each source’s base.

The cards fill within a minute. A key of a user who isn’t an admin is the usual reason they don’t: the server answers that it isn’t allowed, and Details turns red.

Prompt for your agent

prompt
Add 2 Legato pages for Audiobookshelf, starting from https://legatobar.com/examples/audiobookshelf.json, https://legatobar.com/examples/audiobookshelf-library.json. Use the page IDs audiobookshelf, audiobookshelf-library if they’re free: the pages link to each other by those IDs, so with any other ID, change the matching legato://page/ links.

Add the pages as they are, keeping their page IDs, and change http://audiobookshelf.local:13378 on every source and link of both pages to my server’s address. I’ll save my Audiobookshelf API key as audiobookshelf in Settings → Secrets myself.

Use the local Legato MCP tools or /Applications/Legato.app/Contents/Helpers/legato.
Use list_pages first and choose an unused page ID. Do not overwrite an existing page. If I explicitly ask to update one, read its full body with get_page, preserve unrelated cards and settings, and use if_match with that version. On version_mismatch, read again before merging.
Ask me only for non-secret setup details that are missing. Never ask me to paste a password, token or API key into chat, page JSON or command arguments. Tell me to save it in Settings → Secrets for the service host, or link it from 1Password there.
Use the downloadable page, not the illustration’s sample data. Never invent readings. Fix any invalid_page paths and verify that the page loads. Do not press buttons that change the service or real devices to test it.

Download the pages

Questions

When does a row say Paused, and when does it go?

Audiobookshelf keeps a session open until the app closes it, or for 36 hours. The page goes by when the player last reported instead: Paused after two minutes of silence, and gone after 16.

Why does the week say "newest 100 sessions"?

The page reads the newest 100 sessions. On a busy server, a week can have more than that, so its first days would look short. When that happens the chart says so, and This week says "At least". Audiobookshelf’s own stats have the whole history.

Why doesn’t an old backup count as a problem?

Automatic backups are off unless you turn them on, and the API doesn’t say whether they are. A month-old backup might be a problem or might be how you run it, so the page only says when the last one was made.

What happens to the covers?

Legato fetches each cover from your server, only while it’s on screen, and keeps up to 50 MB of them on this Mac, the oldest going first. They never go anywhere else.

The pages were filled from an Audiobookshelf 2.37.2 server on 16 Nov 2026 with made-up listeners playing on a phone, a browser and an Android app, 30 days of their listening, two libraries of invented books and podcasts with silent audio, and one backup. Illustrations use made-up titles, people and numbers. See the service index for other examples.

Legato is independent and isn’t affiliated with or endorsed by Audiobookshelf.