Hermes Agent Tracks PureGym Attendance to Find Quiet Gym Hours

1 comment

Apps it uses

The PureGym app only shows how many people are in the building right now. It doesn't tell you how busy a typical time will be. I wanted to train at quiet hours without guessing, so I had one of my Hermes profiles, Uhura, build that history herself. She runs on a VPS at home, and the gym became one more skill with four scheduled jobs.

  1. Sign in with a POST to auth.puregym.com/connect/token using grant_type=password, my email, my 8-digit PIN, the scope pgcapi offline_access, and an iPhone user agent. The bearer token lasts 60 days, is cached with 0600 permissions, and re-authenticates on a 401. The PIN is read at runtime from a self-hosted secret manager and never logged.
  2. Probe before building. /busyness, /forecast, /popularTimes and /history all returned 404, and every v1 route returned 403. Only /api/v2/gymSessions/gym?gymId=465 worked, giving TotalPeopleInGym and AttendanceTime, so the history had to be collected myself.
  3. Sample that endpoint every 20 minutes from 05:00 to 23:00 with cron, writing to SQLite. In the first eight days it made 442 attempts and 277 returned a number. Null counters are logged as misses, because a missing reading is not zero people.
  4. Score two-hour windows from 06:00 to 22:00. Each gets an index and a confidence label: measured, emerging, early or modelled. With only two samples the brief says "early signal" instead of faking a forecast. At 07:00 she posts the three quietest windows, the live count, and the one to avoid.
  5. Nudge only on rest days. At 21:05 she sends the current headcount, and stays silent if the door record already shows a visit. Checking that record against my session log showed an open visit reports Duration as minutes to midnight, and lockers account for the 5 to 10 minute gap.

After eight days, a weekday afternoon runs at 11 to 15 people, while Tuesday 18:00 averaged 47 and peaked at 51. The same data feeds a 7 by 19 heatmap behind a tailnet-only URL.

1 comment

Have a question about this workflow, or a way to improve it?

Log in to comment Create a free account
Joao Silva

Some context: the agent side matters more than the API side. I never asked for a fitness app. I described the outcome: train at quiet hours, keep it going through a busy week, and never guess when the data is thin. The sampling, the scoring, and the two messages were her design based on that. That is also how the planning works. The plan is a rolling thing rather than a fixed document, so a bad week bends it instead of breaking it, and she asks before changing anything in it. The help is mostly restraint: one brief in the morning, one nudge at night, and nothing at all if the door record says I already trained.

Posting guidelines