What you’ll see
Tautulli
- Health: in Details, your Plex server’s name and "Connected to Plex". When Tautulli can’t reach Plex, it says "Not connected to Plex", and the health card turns orange, and Legato sends a notification. It turns red once Tautulli itself stops answering. Someone watching, a transcode or an update waiting never counts as a problem.
- Period: 30 days, 7 days or 90 days, under the title. Plays per day, the facts’ Plays and Most at once, the Top tabs and Top viewers follow it. Tautulli counts rolling days, today and the days before it, as its own home page does.
- Now playing: each stream with its poster, title and episode, a bar with "31 of 47 min", who’s watching on which player, and whether it plays directly, as a direct stream or transcoding. A paused stream says Paused. While Tautulli can’t reach Plex, the card says so instead of "Nothing playing". On a server with Plex Pass, point at a row for Stop, which asks first.
- Plays per day: one point a day across the period.
- Facts: plays and watch time in the period ("287 · 134h watched"), the most streams at once and the day it happened, Tautulli’s version with "Update ready" when there’s one, and the Plex version.
- Most watched: Top shows, Top movies and Top artists tabs, five each with their posters, plays and watch time in the period. Each row opens the title in Tautulli.
- Top viewers: the five people who played the most in the period, with their plays, watch time and when they last played. Each opens their own page.
- Recently watched: the four newest plays, each with its poster, who watched and when. A film stopped before the end says how far it got ("stopped at 42%").
Viewer
One page for each person, titled with their name, following the same period: their plays per day, what they watched in the period and all time, when they last played, the players they use most, and their last seven plays.
Status
- Watches whether Tautulli can reach Plex.
- Orange while Tautulli isn’t connected to Plex.
- Red once Tautulli stops answering.
- Someone watching, a transcode or an update waiting never counts as a problem.
- Notifies you when it turns orange or red.
How it connects
The pages read Tautulli’s API with your API key, sent as the X-Api-Key header, so it never sits in an address.
Requests it makes on its own 16
- GET
/api/v2?cmd=get_activity What’s playing, where it’s up to, and how it plays.
TautulliOnce a minute
- GET
/api/v2?cmd=server_status Whether Tautulli can reach Plex.
TautulliOnce a minute
- GET
/api/v2?cmd=get_server_info The Plex server’s name and version, and whether it has Plex Pass, which Stop needs.
TautulliOnce a minute, and every 15 minutes
- GET
/api/v2?cmd=get_history &length=4 &include_activity=0 The four newest plays.
TautulliOnce a minute
- GET
/api/v2?cmd=get_plays_by_date &time_range={period.id} Plays per day across the period.
TautulliEvery 15 minutes
- GET
/api/v2?cmd=get_plays_by_date &time_range={period.id} &y_axis=duration Time watched per day, for the watch time.
TautulliEvery 15 minutes
- GET
/api/v2?cmd=get_home_stats &stat_id=most_concurrent &time_range={period.id} The most streams at once.
TautulliEvery 15 minutes
- GET
/api/v2?cmd=get_tautulli_info Tautulli’s version.
TautulliEvery 15 minutes
- GET
/api/v2?cmd=update_check Whether an update is ready. Tautulli asks GitHub itself, at most every few hours.
TautulliEvery 15 minutes
- GET
/api/v2?cmd=get_home_stats &stat_id=top_tv &stats_type=plays &stats_count=5 &time_range={period.id} The most watched shows (and
top_movies,top_musicandtop_usersfor films, artists and viewers).TautulliEvery 15 minutes
- GET
/api/v2?cmd=get_user &user_id={param.user} The viewer’s name.
ViewerEvery 15 minutes
- GET
/api/v2?cmd=get_plays_by_date &time_range={period.id} &user_id={param.user} Their plays per day (and
y_axis=durationfor their watch time).ViewerEvery 15 minutes
- GET
/api/v2?cmd=get_user_watch_time_stats &user_id={param.user} &query_days=0 What they’ve watched all time.
ViewerEvery 15 minutes
- GET
/api/v2?cmd=get_user_player_stats &user_id={param.user} The players they use most.
ViewerEvery 15 minutes
- GET
/api/v2?cmd=get_history &user_id={param.user} &length=7 &include_activity=0 Their last seven plays.
ViewerEvery 15 minutes
- GET
/api/v2?cmd=pms_image_proxy &img={thumb} &width=300 &height=450 Posters, through Tautulli from your Plex server, kept on this Mac.
Tautulli, ViewerWhile the panel shows the row
Requests it makes when you act 1
- POST
/api/v2?cmd=terminate_session &session_key={id} &message=… Stops that stream; the viewer sees "The server owner has ended the stream."
TautulliWhen you press Stop and confirm
That’s about 280 requests an hour with the overview open, plus a poster the first time each one shows. Tautulli’s API key can do anything Tautulli’s web page can, including deleting history; these pages only read, apart from Stop. Tautulli’s API reference lists every command.
Sources and buttons explains each part of a page.
Set it up
- Turn on the API. In Tautulli, open Settings → Web Interface, tick Enable API under API, save, and copy the API key shown there.
- Save it in Legato. In Settings → Secrets, save the key under
tautulli, bound to your Tautulli’s address. You can also link a 1Password reference. - Add the pages. Paste the prompt into your agent, or download the two pages and run
/Applications/Legato.app/Contents/Helpers/legato set tautulli-user tautulli-user.json, thenlegato set tautulli tautulli.json. Keep the IDtautulli-user: every viewer row opens it with that person’s Tautulli user id. - Point them at Tautulli. Change
http://tautulli.local:8181to your Tautulli’s address on every source and link of both pages. Tautulli answers on port 8181 by default. If you reach it through a reverse proxy at a path (Tautulli’s HTTP Root, such as/tautulli), keep the bare address inurland add"base": "/tautulli"to each source; Legato adds it to requests, Stop and posters. The links that open titles in Tautulli are full addresses, so add the path to them too (http://media.example.com/tautulli/info?…). If you’ve turned on Tautulli’s own HTTPS with its self-signed certificate, Legato can trust it only at an IP address or a.localname.
The cards fill within a minute. A mistyped key is the usual reason they don’t: the page then notes that Tautulli refused it.
Prompt for your agent
Add 2 Legato pages for Tautulli, starting from https://legatobar.com/examples/tautulli.json, https://legatobar.com/examples/tautulli-user.json. Use the page IDs tautulli, tautulli-user 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://tautulli.local:8181 on every source and link of both pages to my Tautulli’s address. I’ll save my API key as tautulli in Settings → Secrets myself. Don’t press Stop to test it.
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
Do I need Legato’s Plex page too?
No. This page has its own Now playing, so it works alone. The Plex page adds what was just added and your libraries’ counts, which Tautulli doesn’t keep.
Why don’t I see Stop on a row?
Tautulli stops a stream only for a Plex account with Plex Pass, so Stop shows only then. The viewer sees "The server owner has ended the stream."
Why can’t I delete history from here?
Deleting a play can’t be undone, and the history is what Tautulli is for. Do it in Tautulli’s History page if you need to.
Why does Top artists list artists, not albums?
Tautulli ranks music by artist, so that’s what the tab shows. The poster is the artist’s picture, or a note icon when Plex has none.
What happens to the posters?
Legato fetches each poster through Tautulli with your API key, 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.