← Back to Writing

Running a Runbook Librarian on an Orange Pi

A grey metal mini computer seen from above, its top vent cut in the shape of a sliced orange with a leaf.
Photo: courtesy of the author

About this artifact

essayon-the-recordmaintained

automation · since 2026

On a small board, the fast and reliable part of a runbook answer is the passage plus a link to the exact lines it came from. A generated summary is an optional extra, and the one run I accepted took 52 seconds on this hardware.

I put a runbook lookup for my agent fleet on the board on my desk. It indexes four reviewed engineering documents, split into 72 passages, and answers with keyword search. Every passage it prints carries a link pinned to a source commit and a line range. The runbook repository and the code are private, so the links in this post are illustrations, not pages you can open.

Agents need an answer they can check#

The questions are plain ones: where does this job live, and what does the runbook say about installing it. My coding agents ask them, and so do I. An answer is only useful if I can check it against the source in one click.

A local model on its own is a slow way to get that on this board. In benchmark runs at the fastest of the three thread settings I tried, an 8B model (Llama 3.1) generated about 7.7 to 7.8 tokens per second, and a 14B coder model (Qwen 2.5 Coder) 4.30 to 4.33.

That turned the design into one question: which part of the answer has to be fast, and which part can wait?

What I built: passages first, summary optional#

The librarian is a small command-line tool installed in my local bin directory on the board. It reads an explicit allowlist of committed Markdown documents. Uncommitted edits and files off the allowlist stay out of the index.

The daily refresh is a separate path:

Lookup. Search is keyword-only and works offline. One measured query on the board, at an earlier revision of the tool, took 115 ms. On a frozen set of ten questions it found all ten expected passages, six of them ranked first.

Terminal output of a keyword query: the question, one passage under a link pinned to a commit, file and line range, and a wall time of 0.162 seconds.

A later run of the same question on the board, end to end in 0.162 s. The repository is private, so the owner and name are replaced and the link is shown for its shape.

The optional summary. With --summary, a local model gets the ranked passages and a cap of 48 generated tokens. It must name one passage by ID and quote it verbatim. The tool then checks the quote against that passage and attaches the passage's canonical link itself. So the summary is a selected excerpt, not a paraphrase, and the check does not judge whether the excerpt answers the question. If any check fails, the reader gets the evidence only. Thirteen local fixture cases cover invented prose, incomplete excerpts, a truncated reply, a timeout, a server error, and missing, unknown or wrong passage IDs.

The refresh. A daily scheduled job rebuilds the index on my workstation from a pinned commit, compares the source commit and index digest with the expected values, and uploads only on a change. Promotion stages and validates the new index, keeps a backup, syncs to disk, swaps the file by atomic rename, and has a restore command.

One live answer shows the whole path. The question was "Where is the traffic review runtime installed?" The matching passage printed first, then the summary:

Deploy the reviewed traffic-review/ directory to the stable [runtime path].

The full commit-pinned link to lines 89 to 102 of the runbook followed it, and the path and quote match pinned lines 99 to 100. The whole call took 52.403 s.

$ librarian --summary "Where is the traffic review runtime installed?"
real    0m52.403s
Evidence from commit <source commit>:

--- traffic-review/README.md:L89-L102 ---
<link pinned to that commit, file and lines 89-102>
<passage text>

Local summary (verify against the passages above):
Deploy the reviewed `traffic-review/` directory to the stable [runtime path].
<the same pinned link>

The panel is abbreviated: the command name is generic, links and passage text are replaced with placeholders, and the two lower-ranked passages are cut.

Terminal output of the same query with the summary flag: the passage and its pinned link, then a one-sentence local summary followed by the same link, and a wall time of 1 minute 2.342 seconds.

The same question a day later, with the summary: 62.342 s this time, with the same sentence and the same link.

How we got there: the tool owns the citation#

Three recorded versions led to the accepted summary.

Version Wall time What came back
First 30.281 s No answer. The tool gave up and printed the evidence and link anyway.
Second 64.277 s The right path, with the citation cut off mid-link. Only the evidence section had a usable source.
Accepted 52.403 s The verbatim quote with the full pinned link. The model stopped normally after 27 generated tokens.

The accepted version moved the citation out of the model's hands. The model names a passage ID and quotes it, and the tool attaches the canonical link.

An agent in my fleet ran the acceptance question through a scripted harness over SSH, and a separate reviewer confirmed the result.

The night before that accepted run, an overnight soak on the board ran 114 iterations with zero errors, and a health log recorded 729 of 729 minutes OK. An intermittent hang I had seen earlier did not return during that soak.

Twelve threads were several times slower than eight for both models. The GPU was detected (Vulkan reported a Mali-G720 MC10), but inference ran out of device memory, so I have no GPU number. The board rebooted abruptly once, right after a charger swap, and health monitoring came back afterward. After a later power cycle it did not come back, and its log stops on December 2.

The last four lines of the refresh log: one day reports status unchanged with matching source and digest values, and the next day ends with a failed line.

The refresh log for the two scheduled runs: unchanged on the first day, failed before any upload on the second.

What it does not prove#

One accepted question is not a latency distribution and not an accuracy rate. I have two timed runs of that one question: 52.403 s for the accepted run and 62.342 s when I captured the screenshot a day later.

The ten-question scorecard was tuned and scored on the same ten questions, so it does not show how the lookup handles new ones. An earlier baseline has no surviving receipt, so I make no claim of improvement.

The scheduled refresh has not yet published a changed index to the real board. The first scheduled refresh found nothing to upload. The second failed before any upload. The publish path, lost-acknowledgment recovery and failed-stage cleanup have passed only in a simulated harness, and the hang's cause is still unknown.

The implementation is an open, unmerged pull request in a private repository. The next evidence it needs is a scheduled refresh that uploads a real change to the board and survives it.

A small grey metal computer on a wooden desk, with an orange-shaped fan grille on top and three blue indicator lights on the front.

Reference#

Item Value
Corpus 4 allowlisted documents, 72 passages, pinned source commit
Lookup Keyword, offline; one board measurement of 115 ms at an earlier revision
Frozen scorecard 10 of 10 expected passages found, 6 ranked first (tuned on the same set)
Summary 48-token cap, 120 s socket timeout, eight threads; validated excerpt or evidence-only fallback
Generation speed, eight threads 7.7 to 7.8 tok/s (Llama 3.1 8B); 4.30 to 4.33 tok/s (Qwen 2.5 Coder 14B)
Twelve threads Several times slower than eight for both models
GPU Mali-G720 MC10 seen by Vulkan; inference aborted on device memory
Board Orange Pi 6 Plus, 12 cores, 32 GB RAM