↓ Skip to main content

Transcript: Rehabbing Old Blog Posts with Hermes

·3412 words·17 mins
Gabriel Guzmán
Author
Gabriel Guzmán
A regular human. (he/him)
Session transcript - my prompts verbatim, the agent’s replies condensed, with other people’s names left out unless they are already in the published photo captions. This is not the post, the post is here.

Context: LLM Transcript that goes along with Rehabbing Old Blog Posts with Hermes.

Agent: Hermes Agent, running on a Raspberry Pi 4, driven over Discord

Model: deepseek-v4.1-flash (Nous Research)

Tools: the Immich 3.4.2 REST API, the Wayback Machine, Pillow, Hugo 0.164.0

Sibling transcript: the Europe, Armenia and Reno restores, which picked up the same recipe the next day


1. “Do you know how to talk to immich?”
#

gabe: Do you know how to talk to immich? I have a local instance.

Hermes: Yes - it’s just a REST API, and I’ve already confirmed your instance answers: https://immich.lifewaza.com/api (192.168.1.10, Caddy in front), /api/server/ping returns 200, /api/server/version returns 3.4.2. /api/server/about answers {"message":"Authentication required"}, so the API is live and wants a key; /api/docs is 404, so no Swagger UI is exposed.

Auth takes an x-api-key header or an ?apiKey= query param. What I don’t have is a key - nothing for Immich is stored on this box. Make one under Account Settings → API Keys, scoped to what you want me doing read-only to start, and drop it in ~/.hermes/.env rather than pasting it here.

Once I have it, two ways to go: raw REST over curl, or an MCP server. The MCP route would need you to run hermes gateway restart from your own shell, since the gateway won’t restart itself.

2. The key, and what it can’t do
#

gabe: API key addded.

Hermes: Key works. Albums read (10 of them, including 2026 - Trip to France, 2,129 assets, and Camera, 9,620), search/metadata filters by date and album, CLIP smart search works (the first call after idle blew past 30 s on model warm-up, then settled to ~9.5 s), thumbnails and originals download, and timeline buckets come back per month.

What the key can’t do, straight from the API: no person.read, so “photos of <a person>” won’t work. Also missing: tag.read, memory.read, partner.read, stack.read, user.read, job.read, server.statistics. Nothing write-related, which is a fine default.

I saved a full endpoint and scope map plus a curl wrapper as the immich-api skill, so next time it’s a one-liner instead of a rediscovery.

gabe: Added additional read scopes.

Hermes: Scopes landed - big jump. user.read, person.read, tag.read, memory.read, stack.read, partner.read, server.config and search/explore all work now. Still 403: the admin and statistics surface (apiKey.read, job.read, server.storage, duplicate.read), which is fine to leave dark.

Person search works end to end: 1,427 face records, 152 named. Two things I noticed while probing. First, you’re at 96.5% of quota - 386.1 GiB of 400 GiB, 13.9 GiB free. Second, the face counts looked suspiciously thin, which I flagged as possibly a stalled facial-recognition job.

gabe: Hmm, on the front end for facial recognition I see 6749 assets under one of the kids and 2698 for the other.

Hermes: You’re right and I was wrong - 6,749 and 2,698 are the real numbers. That was a parsing bug on my end, not your instance.

What went wrong: search/metadata returns assets.count and assets.total, and both of them just echo the page size. I asked for size:3, so it said count: 3, and I reported that as a total. There is no match total in that response at all - the only way to paginate is the nextPage token.

The correct count oracle is /timeline/buckets?personId=…, summed. Verified against your UI exactly: 6,749 and 2,698, and cross-checked against the album endpoint’s own assetCount (France trip 2,129, Manhole Covers 68). So face recognition was working fine and there was never anything to fix - 152 named of 1,427 is just the labelling backlog.

I hardened the wrapper against it: person "<name>" prints bucket-summed totals, and search/smart now print “count/total echo the page size, NOT a grand total” so the mistake can’t repeat silently. Bonus numbers from the same pass: 57,726 assets total, 32 favorites.

gabe: Yeah, I’m aware of the quota issues.

Hermes: Noted - dropped it, and I’ve written that into the immich-api skill so I only raise it when a task genuinely depends on free space, never as a standing remark.

3. “Can you find the pictures that go with this blog post?”
#

gabe: For now read only is good. Can you see if you can find the pictures that might go with this blog post? https://www.lifewaza.com/posts/trip-to-peru/ When I transfered that post from my old blog (and other posts) I lost the pictures that were associated, only the alt-text was copied over anywhere it says “Picture of…” is where I had a picture previously. Let me know. If you’re not sure that’s fine I should be able to re-find them manually.

Hermes: Found them. All 34 of them, and the originals are all in Immich.

853 assets from November 2006, shot on a Nikon D70 as DSC_####.JPG. The day clustering matches your blog sections closely: your headings for 11/13, 11/14, 11/15 and 11/16 correspond to 28, 66, 79 and 138 photos on exactly those dates.

34 Picture of… placeholders → 34 matched photos. Twenty eye-verified, fourteen ranked by day plus CLIP description.

Two honest caveats: I hit a vision rate limit before checking the last four, and a couple of alt texts are ambiguous by nature - “Incan ruins” appears three times, and one placeholder actually covered two photos. Those are the likeliest candidates for a swap.

[Then: the verification pass, the shortlist sheet and the review sheets the session sent over the next hours.]

4. Your three corrections, and the assumption behind them
#

gabe: After review, here are the one’s I think are wrong (can you give me the immich links to them, so I can see if I can find the correct one): 9, and 25. Go ahead any eye validate the other ones that you weren’t able to before.

Hermes: Verification pass complete - all 34 are checked by eye now, and 7 picks changed as a result. For your two: the porters line-up can’t be a camp photo (I swept the whole first-night window and only two frames exist in it, so it has to be the trailhead gathering), and row 9 depends on which “9” you meant, because my sheet labels and the markdown table numbers were off by one. Links for both sent.

gabe: All the porters is DSC_7883.JPG

gabe: I’m pretty sure “our campsite from the ruins” is DSC_7936.JPG

gabe: “Malea and mike is DSC_7971.JPG”

Hermes: All three are in, and my day assumption was wrong 3 for 3. Every photo you corrected sits outside the day window I’d derived from the blog’s section headings: 7883 is from the section dated 11/13 but was shot 11/14 06:49, 7936 from the 11/15 section but shot 11/14 15:12 - and the post literally says he “snapped off a few shots the day before” - and 7971 is the right day but in the morning, while my shortlist only had afternoon frames.

So the section date is the writing date and can lag the shutter by up to a day, and a CLIP shortlist can miss the right frame outright. I’ve stopped treating the day as a filter - it’s a tiebreaker now, and when unsure I go to the full day’s frames in filename order. That’s written into the skill so the next post doesn’t repeat it.

Which means the other eight picks I changed for day reasons deserve your eye, since that’s exactly the reasoning that was wrong three times. Sheet attached, with the alternatives for each.

5. Seven more, five of them wrong
#

gabe: train back to Cusco: DSC_8231.JPG dining tent at 4am: DSC_8066.JPG clouds over MP: DSC_8132.JPG MP from a distance: DSC_8188.JPG Incan Staircase: DSC_8185.JPG Malea putting on pack: DSC_7910.JPG Dead Woman’s Pass: DSC_7946.JPG

Hermes: All seven folded in - two confirmed, five corrected (the dining tent was one frame off; the clouds shot was 07:34, not the dawn frame I’d assumed; Dead Woman’s Pass was 15:32, not the frame I’d picked).

That’s 10 of 34 confirmed by you, and you beat my “eye-verified” picks five times out of seven. Worth naming plainly: the vision pass is good at eliminating (is this a waterfall at all?) and bad at choosing between plausible frames in the same cluster, and it can’t see capture order, which is the thing that actually decides. Written into the skill as a hard rule - the verifier eliminates, it doesn’t decide.

It also exposes how wrong my reading of 11/16 was: three of your corrections sit in an 11:18-11:25 burst, i.e. that’s the Wayna Picchu sequence.

gabe: I’m not 100% sure you got them wrong, I don’t remember exactly which pictures I used when I posted these.

6. Finding the original on the Wayback Machine
#

Hermes: You’re right that memory alone can’t settle this - so I went looking for the original, and found it. Your old blog is still in the Wayback Machine, captured July 2008, and all 36 images are listed there with their original filenames and alt text.

Two things fall out of that. There’s a 36th image I never mapped - johninincangarden.jpg, whose alt text was empty except for the words “Picture of”, which is why my extraction skipped it. And the original filenames are a ready-made naming scheme for re-attaching these later.

The image files weren’t archived, only the HTML, so I can’t prove frame-for-frame. But the archived order gives a real consistency test - within a section the photos should be in increasing capture order. Two sections pass cleanly; three things fail it:

  • Ollantaytambo - my pick is from 11/05. You passed through on the morning of 11/13, and the post puts that photo between the hostel (05:20) and the trailhead sign (09:44), so it should be an ~08:00-08:20 frame from that day. This one I’m fairly confident is wrong.
  • Peru Treks porter - my pick is 10:56, but the post places it after the nopal at 11:52. A 14:35 frame of a porter crossing a bridge with a big load fits both.
  • Incan staircase - the 11/16 frame I had is the only 11/16 photo in the 11/15 block; the 13:52-14:07 cluster is the consistent one.

Caveat on that test: it’s strong within a section and weak across section boundaries, since the post has two “11/14” and two “11/13” sections written later. So I’m not claiming those three are wrong, just that the sequence argues against them.

gabe: 1. #3 2. #1 3. #5 4. None of the provided options, I don’t remember who John was, but I think it might be this one: DSC_8062.JPG

Hermes: All four folded in - Ollantaytambo is now an 08:19 frame that sits correctly between the hostel and the trailhead sign, and the staircase now sits inside the afternoon cluster. The map holds all 36 images from the original post, and the two gaps I didn’t know about are closed (John’s photo, and a second Dead Woman’s Pass frame the post had).

The sequence check now passes for five of eight groups. One still open: the second Dead Woman’s Pass photo, where I’ve put the frame right after your pick as a proposal and I’m not claiming it.

7. Wiring them into the post
#

gabe: Pretty happy with all of those. Go ahead and put them into the blog post, guess you’ll have to make a folder for it and copy the photos into the page bundle. Go for it, and do your best to keep the alt text (or improve it where you can). Photo names can stay DSC_* – will be easier to find the originals if ever needed.

Hermes: Done - the post is now a page bundle with all 36 photos in place, downloaded from Immich at full resolution, named DSC_####.JPG as you asked, and inserted positionally against the archived original so each image sits exactly where its Picture of… line was, including the two that only the archive revealed.

Alt text: your original wording throughout, pulled from the 2008 capture, with eight improved where they were too thin to be useful (the bare “Picture of”, two identical “Incan ruins”, the two “Dead Woman’s Pass” shots, and a typo in the eagle caption).

I also found a real bug in your hooks/strip-metadata. The extension pattern is matched with bash [[ =~ ]], which is case-sensitive, so .JPG never matched and 31 of the 36 files kept GPS, camera model and capture timestamps through a “successful” sweep that exited 0. Only the five lowercase .jpg files got stripped. That’s exactly the case cameras produce, so it would have hit every future photo too. Fixed with shopt -s nocasematch, and the repo is now clean of location data.

Verified: all 36 references resolve with exact case, all 36 are valid JPEGs, no stray placeholders left.

[The figure below is not one of the session’s contact sheets - those were sent to Discord and not kept. It is the 36 files now sitting in the post bundle, rendered in post order:]

The 36 recovered photos, in the order they sit in the post

8. “Does hugo automatically resize images?”
#

gabe: Does hugo automatically resize images or does it ship the originals? We should definitely make them smaller.

Hermes: Short answer: no - plain markdown images ship as-is. Hugo only processes an image when a template or shortcode asks for it, and your layouts/ contains no image processing. So all 36 would have been published byte-for-byte at the original size.

So I resized them: 85 MB → 12.8 MB, long edge 1800 px, JPEG q85, all still valid, no EXIF on any of them. One thing nearly slipped: my first pass through Pillow dropped the ICC profiles on the five Adobe RGB frames (Arequipa and Cusco), and an Adobe RGB image served without its profile renders muted. Those five were rebuilt from the originals with the profile re-attached. The full-resolution originals are untouched in Immich and the filenames are unchanged, so the bundle still maps straight back to the same frame.

gabe: Go ahead and commit. And yes please go ahead and install Hugo.

gabe: That will make it easier for me to review changes without having to push + pull on my end.

Hermes: Installed and checksum-verified: Hugo extended at ~/.local/bin/hugo. It warned that Blowfish only supports 0.158-0.164, so I dialed back to 0.164.0 rather than 0.170.1, and the build is clean: exit 0, 394 pages, 167 processed images, all 36 <img> tags with alt text intact, every reference resolving, no originals leaked into public/.

Since you mentioned reviewing without push and pull, there’s a live preview bound to the tailnet. I’m planning two commits, since the hook fix is an independent change and should be reviewable on its own: one for strip-metadata, one for the post.

gabe: For commit messages the formatting is a little off, try to keep line length down to 80 chars max.

Hermes: Both rewrote and committed under 80 columns (longest line 69). Subjects: fix(hooks): match image extensions case-insensitively and content(trip-to-peru): restore the post's 36 original photos, each with Assisted-by: / Model-Rev: trailers and a provenance note.

9. A claim the build disproved
#

Hermes: I have to correct something I told you earlier. I said plain markdown images ship as-is and only shortcodes trigger resizing. The build disproved it: Blowfish’s markdown image render hook does process them - the HTML is a <figure> with srcset at 800w and 1280w. Separately it emits data-zoom-src pointing at the bundle file, which is what the lightbox fetches on click and what gets published verbatim beside the derivatives.

So the resize was still the right call, but for a different reason than I gave: it’s the zoom payload and the published footprint, not the inline view. Verified against the served output - inline derivative 67 KB, zoom original 367 KB, where it would have been ~3 MB each.

Also worth knowing: the notes ref is fetched but not pushed on this repo, so git push would not have carried the provenance to GitLab. I left it alone rather than changing how your pushes behave.

gabe: Looks great! Go ahead and push the changes plus the refspec. Also feel free to configure git.name and git.email in this repo.

Hermes: Pushed and verified against GitLab rather than assumed: main at 79b43c7 matching local exactly, refs/notes/commits new on the remote with matching SHA, the remote tree holding 37 files under the post, and a travel test - fetched the notes ref into an empty repo and read the note back, so the provenance genuinely ships. Repo-local config now carries your name and email, and the push refspec for notes.

10. “I prefer to push both main and notes at the same time”
#

gabe: Yeah I prefer to push both main a and notes at the same time is that possible?

Hermes: Yes, and it’s done - a bare git push now sends both, configured as two push refspecs. One deliberate choice: main has no +, so if you ever rewrite it a bare push is rejected with “non-fast-forward” instead of silently force-pushing over it; you run --force-with-lease when you actually mean it. The notes refspec keeps its + because that’s inherent to notes refs.

Two caveats: the refspec names main specifically, so other branches still need an explicit push, and if you ever want bare push to force main too, that removes the guard rather than adding one. I verified the whole thing in a throwaway repo instead of assuming it.

Appendix: the rows you corrected
#

Thirteen of the 36 matches were confirmed or corrected by eye, from /home/openclaw/peru-picture-map.md, the map the session maintained as it went:

# Section Photo File Taken Note
5 11/16 Machu Picchu train trip back to Cusco DSC_8231.JPG 11-16 16:52 confirmed
6 11/16 Inca Trail dining tent at 4am DSC_8066.JPG 11-16 04:19 corrected, was DSC_8065
7 11/16 Inca Trail where Machu Picchu should be, if not for the clouds DSC_8132.JPG 11-16 07:34 corrected, was DSC_8108
8 11/16 Inca Trail Machu Picchu, from a distance DSC_8188.JPG 11-16 11:22 corrected, was DSC_8109
9 11/15 our campsite from the ruins DSC_7936.JPG 11-14 15:12 corrected; shot the day before its section
10 11/15 Malea and Mike at some impressive ruins DSC_7971.JPG 11-15 09:56 corrected; outside the day window
12 11/15 an Incan staircase DSC_8016.JPG 11-15 14:05 corrected, was DSC_8185
15 11/15 John in Incan garden DSC_8062.JPG 11-15 16:26 the photo the placeholder extraction missed
21 11/14 Malea putting on her pack DSC_7910.JPG 11-14 10:25 confirmed
22 11/14 Dead Woman’s Pass DSC_7946.JPG 11-14 15:32 corrected, was DSC_7916
25 11/13 one of the Peru Treks Porters DSC_7860.JPG 11-13 10:56 confirmed
27 11/13 all 22 of the Porters, and Marcelo the head guide DSC_7883.JPG 11-14 06:49 corrected; EXIF puts it on the next day
30 11/13 Cusco the central square in Ollantaytambo DSC_7840.JPG 11-13 08:19 corrected, was a frame from 11/05

Outcome, in one place
#

  • The 2006 Peru post has its photos back: 36 images, positionally matched to the archived original, alt text kept and eight improved, all stripped of GPS and metadata, web-sized at 12.8 MB instead of 85 MB, ICC profiles preserved on the five Adobe RGB frames.
  • Immich is wired up and the API is wrapped as a skill, with timeline/buckets documented as the only trustworthy count oracle after search/metadata tricked me into reporting a page size as a total.
  • The matching lesson, paid for in corrections: eight of the 36 picks were corrected by eye, and gabe beat my “eye-verified” pass five times out of seven. The section date is the writing date, so it cannot filter; the verifier eliminates rather than decides; capture order is what settles a same-day burst.
  • A bug that would have kept leaking location data: hooks/strip-metadata matched .JPG case-sensitively, so 31 of 36 photos kept GPS through a sweep that exited 0. Fixed, and the repo is clean.
  • A claim the build corrected: Blowfish does process plain markdown images (figure plus srcset, with data-zoom-src pointing at the published original). The resize was right; my reason for it was wrong.
  • Pushed with its provenance: 7c87e2a and 79b43c7 on main, refs/notes/commits on the remote, verified by reading the notes back out of a fresh fetch.
  • Still open from that day: the second Dead Woman’s Pass photo is a proposal rather than a confirmed match, and two “Incan ruins” placeholders sit inside same-minute bursts where any neighbouring frame is defensible.