Palimpsests / Runbook
Runbook · updated 16 November 2026Runbook: self-hosted LLM setup and AI agent logging, step by step
Short recipes you can copy for running language models on your own machine and recording what AI agents do, each with what it needs, how to check it worked and what it does not do.
Palimpsests is one open-source Python package that does three kinds of jobs. It runs language models on your own computer, through Ollama or llama.cpp. It writes down what an AI agent did, which tools it called and what came back, in a log that cannot be changed without the change showing. And it lets anyone check that log later, without having to trust you or us.
This runbook is a set of short recipes. Each one does one job in a few commands. Each says what you need first, how to check that it worked, and what it does not do.
Before you start
- Python 3.11 or newer, and
pip. - Recipes that run a model need Ollama with a model pulled, or the
llama-serverprogram from llama.cpp. Recipes that only record an agent need no local model at all. - Most recipes start the Palimpsests server with
palimpsests serve. Next to the log of tool calls, it keeps a log of its own operations, and that one is encrypted by default. For a first try, let it be stored unencrypted. It stays hash-chained either way.
pip install 'palimpsests[serve]'
export PALIMPSESTS_ALLOW_UNENCRYPTED_AUDIT=1
In Windows PowerShell, the second line is $env:PALIMPSESTS_ALLOW_UNENCRYPTED_AUDIT = "1". To keep that log encrypted instead, install 'palimpsests[serve,keyring,encryption]' on a computer with a system keychain, and leave the variable unset.
The log in one paragraph
Each entry carries a fingerprint of the entry before it. Change an entry, remove one or swap two, and the fingerprints stop matching from that point on. Checking them needs no key and never opens what the entries hold. One change the log cannot show by itself is a cut at the very end. For that, you keep a copy of the latest fingerprint somewhere else, called an anchor. More in what makes an audit log tamper-evident and verify without reading.
What it is not
- Not a compliance product. It gives you a record. What your rules require of that record is still yours to decide.
- Not faster than a well-tuned llama.cpp server. On speed, measured, it matches one.
- Not a copy of your content. The log holds operations and fingerprints of data, not prompts, replies or files.
Run a model on your own machine
Run a local LLM behind an OpenAI-compatible API
Start an OpenAI-compatible server on your own machine in front of Ollama or llama.cpp, point any OpenAI client at it, and keep a tamper-evident record of the tool calls that pass through.
Chat longer than the context window on a small local model
Keep a long conversation going on a model with a small context window. Palimpsests keeps the start and the latest turns, moves the middle to disk, and brings back the parts that matter.
Use a local model in OpenCode
Point OpenCode at a model on your own machine through Palimpsests' OpenAI-compatible server, with the configuration printed for you, and know which of its tool calls reach the record.
Record what an AI agent does
Log Claude Code tool calls on your own machine
Record every tool call Claude Code makes in a tamper-evident log on your own machine, with three hook entries and a local server. Fingerprints instead of content, and failures marked as failures.
Claude Code hooks not working? Find where the reports go missing
A failing hook never stops the agent, so a broken hook looks exactly like a working one. The silent failures we measured, how to spot each, and one command that names them.
Log MCP tool calls with a one-file proxy
Put a small proxy in front of any MCP server that speaks stdio, and every tools/call lands in a tamper-evident log on your machine, with whether it came back ok, as an error or not at all.