



























Your OpenClaw agent makes a small decision on every tool call, and right now it makes most of them badly. It sends each call to whichever model you hard-coded, whether the task needed the dear one or the cheap one. It re-runs calls it already ran a turn ago, and pays for them again. And when a prompt injection rides in on a document it was only meant to read, nothing stands between that and a real action. Most agents handle the first by static configuration, the second never, the third never.
credence-pi handles all three, automatically, from one belief. It is an OpenClaw plugin plus a small local daemon that holds one Bayesian belief about your agent, learned from your own approvals and refusals and updated as you work. It plugs into two points in the loop: when OpenClaw is choosing which model to call, and when your agent is about to make a tool call. At both, it maximises expected utility and does three things you are currently paying for by hand:
Three levers, one posterior, nothing to tune: the first chooses the model, the other two govern the tool call. No thresholds, no rules table, no magic numbers.
You do not have to trust any of this on faith, and you should not. Run credence-pi in shadow mode and it changes nothing about your runs. It watches, and it reports what it would have done on your own traffic: what it would have routed, what it would have blocked, the dollars that implies, and the part most governors will not show you, its own false-block rate. The first thing you get is a free audit of your own sessions. You switch on enforcement only once the numbers have convinced you.
You need OpenClaw and Docker. Then it is three steps.
Start the brain. A local daemon on 127.0.0.1:8787, restart-resilient:
docker run -d --name credence-pi --restart unless-stopped \
-p 127.0.0.1:8787:8787 -v ~/.credence-pi:/root/.credence-pi \
ghcr.io/gfrmin/credence-pi-daemon
Install the body, then restart OpenClaw. Governance and routing are both on by default:
openclaw plugins install @gfrmin/credence-pi-openclaw
openclaw plugins enable credence-pi
# restart the OpenClaw gateway so it loads the plugin, then confirm:
openclaw plugins list # credence-pi should read "loaded"
That is the whole install, and both artifacts are published and public, so it works as written today.
Audit before you enforce. This step is optional, but it is the one I would actually do first. Set shadowMode: true in the plugin config so credence-pi observes without changing anything, use your agent normally for a while, then read back what it would have done:
curl http://127.0.0.1:8787/report
Everything runs locally: the daemon keeps an append-only log of every observation and decision on your machine, and no raw data leaves it. Routing is fail-open, so if the daemon is slow or down OpenClaw simply uses its configured model and your agent keeps working. The full install notes, a from-source path for the daemon if you would rather not run Docker, and every config key are in the plugin README.
On real OpenClaw sessions and a live benchmark run, not on demos built to be caught:
The reason for the machinery, the part no fixed rule reaches: at one byte-identical input the governor can ask or proceed depending on the variance of its belief, not its mean, and a context it has never seen inherits an informed answer instead of a default. What a Regex Can’t Do is that argument in full, with a reproducible red-team of every claim.
credence-pi is early-stage research, not a finished product, and I would rather make it correct than pretend it already is. I am actively looking for help to improve it. The honest fine print belongs in one place rather than smeared across every sentence:
(tool, args), so a legitimate re-run, like your test suite after an edit, looks identical and would be blocked too. Precision 1.0 is against that definition of waste, not against true waste. The real false-block rate is the thing shadow mode measures on you before you enforce anything.None of this is bolted on at the end. Shadow mode exists precisely so the fine print is something you measure rather than something you take on trust.
The Brain is Opaque to the Body is the architecture: a body that senses and acts, a brain that reasons, and a wire between them that never moves. What a Regex Can’t Do is what the brain learned, and why matching its behaviour with rules ends in re-deriving Bayesian decision theory. The code, the eval harness, and the red-team of every claim are in the repository.
This is research, and it gets better with use I do not have. If you try it, in shadow mode first, the thing I most want to know is whether the savings and the confirmations land on your real work or merely annoy you: where it over-blocks, where the routing misjudges your models, where the belief is simply wrong. An issue, a measurement from your own traffic, or a pull request is exactly the help that turns research-stage into something calibrated. I would like the community to build this with me.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。