All plugins

zkagent-attest

Prove what your agent did without revealing what it did: every tool call is recorded, the session is proved inside a signed cap, and one action can be disclosed on request. Replay protection spans both verification modes, so a receipt and the session that contains it cannot both be accepted. Disclosure — on first use, if no zkagent binary is found, the plugin downloads a fixed prebuilt zkagent release from github.com/MCPVOT/zkagent (checksum-pinned) into its own data folder and runs it to build and verify proofs; turn this off with the plugin's autoinstall setting and install zkagent yourself.

MCPVOTToolsv0.5.9Updated 1 day ago

About

Prove what your agent did without revealing what it did: every tool call is recorded, the session is proved inside a signed cap, and one action can be disclosed on request. Replay protection spans both verification modes, so a receipt and the session that contains it cannot both be accepted. Disclosure — on first use, if no zkagent binary is found, the plugin downloads a fixed prebuilt zkagent release from github.com/MCPVOT/zkagent (checksum-pinned) into its own data folder and runs it to build and verify proofs; turn this off with the plugin's autoinstall setting and install zkagent yourself.

zkagent-attest

Your agent's transcript is a claim. This plugin turns it into a receipt a third party can check.

gates
plugin
license
zkagent

Every tool call is recorded with its cost and a digest of its arguments. The session is proved to
have stayed inside a policy cap you signed, and the receipt publishes totals only: the action
count, the spend, the policy that bound them. The actions stay private. When you need to show one,
you reveal exactly one, with the Merkle path that places it in the attested set.

  • checkable, not asserted. A Groth16 proof, 7,442 constraints, format 3, verified by a binary
    whose release is pinned and sha256-checked by the installer.
  • private by construction. No prompt, no argument and no tool output ever reaches a receipt;
    arguments are hashed on the way in.
  • honest about its limits. The ledger is written by the agent about itself, so a receipt proves
    what it lists, not that it lists everything. Said in one line, here and in docs/.
  • no bundled binary. The plugin is Python source; the prover arrives from a checksum-pinned
    release, so what you install is the artifact that was tested.

One picture

Four steps, and the branch that matters: a single changed byte turns accept into reject with
public_input_mismatch and exit 1. The portrait version is what renders on a phone.

Four steps, and the branch that matters: a single changed byte turns accept into reject with
public_input_mismatch and exit 1.

Mermaid diagrams for the sequence, the verdict states and the file ownership live in
docs/DIAGRAMS.md — they render on GitHub and in any markdown viewer that
supports mermaid.

Where to look first

if you haveread
30 secondsthe demo below, or the post on X
3 minutesrun examples/verify-it-yourself/verify-it-yourself.sh and check a receipt yourself
10 minutesdocs/SECURITY-AUDIT.md for the findings, docs/DEMO.md for the run sheet
longerdocs/ARCHITECTURE.md, then the library at MCPVOT/zkagent

Demo

24 seconds, one take, no audio: watch the demo on X.

zkagent-attest demo

The take shows the whole workflow in order: the plugin's tools and hook, five recorded tool
calls, status, attest returning accept, verify recomputing the session root, one
action disclosed out of five, a single flipped hex character turning the verdict into
reject with reason code public_input_mismatch and exit 1, and finally the Omarchy bar
widget reading the verdict file that zkagent verify --json wrote.

Check it without trusting it

examples/verify-it-yourself/ holds a real policy, receipt and proof, plus a tampered copy.
One script downloads the pinned release, checks its sha256, and proves the first accepts while the
second is rejected:

cd examples/verify-it-yourself && ./verify-it-yourself.sh

What that does and does not establish is written down in
docs/VERIFY-IT-YOURSELF.md, including the part it cannot prove:
the ledger is agent-authored, so a receipt is not a complete account of what an agent did.

Try it in 60 seconds

python3 scripts/install-zkagent.py                 # pinned v0.4.0+2026-11-08, sha256 verified
hermes plugins install MCPVOT/hermes-zkagent       # then: hermes plugins enable zkagent-attest
# start a NEW Hermes session: the hook reloads now, the four tools load at session start
#   zkagent_status {}                  -> which binary, how many actions are pending
#   zkagent_attest {"max_amount": 20}  -> accept, with the total measured against the cap
#   zkagent_verify {}                  -> accept, or a refusal with a stable reason code

The same mechanism without Hermes, deterministically, in about 20 seconds:

python3 tests/smoke.py
# hook: 5 actions recorded  ->  attest: accept (total 9, cap 20)  ->  verify: accept
# tamper: rejected, reason_code public_input_mismatch
# disclose: slot 2 -> web_search   |   replay: refused

Measured, not asserted

circuit7,442 constraints, 16 public inputs, BN254/Groth16
prove~437 ms median for one 8-slot batch
verify~11 ms, stateless
proof artifact128 B compressed, 2.3 KB as the CLI's JSON with its public inputs
receipt199 B: totals, action count, time, chain, execution id, trace root
tests156 across the CLI repo, including the negative controls (over-cap, expired, tampered, wrong key), plus 10 failure-path guard tests in tests/test_guards.py here

Read next: Constitution (the eight non-negotiables) ·
Architecture (data flow, files, failure modes) ·
Security (threat model, what a receipt is worth) ·
Testing (the three gates) ·
How it gets used ·
Agents (instructions for an agent working on this repo).

Install

python3 scripts/install-zkagent.py               # pinned v0.4.0+2026-11-08, sha256 verified
hermes plugins install MCPVOT/hermes-zkagent     # then: hermes plugins enable zkagent-attest
python3 scripts/check.py                         # secrets, binaries, manifest, smoke, hermes gates
agent works ──▶ tool calls recorded ──▶ policy signed ──▶ Groth16 proof ──▶ ACCEPT / REJECT
                                          (caps)                            (254-byte receipt)

What you get

ToolWhat it does
zkagent_statusWhich zkagent binary is in use, how many actions are pending, the last attestation, the session index
zkagent_attestSign a policy cap, prove the session inside it, add the receipt to session.json
zkagent_verifyVerify one receipt, or the whole session with {"session": true}; refuse a replay
zkagent_discloseReveal one action's digest plus its inclusion path

Plus a post_tool_call hook: it records every tool call automatically, so the ledger fills
while the agent works and zkagent_attest is a single call at the end.

Sessions longer than one receipt

The circuit has 8 action slots, so a real session produces several receipts. Each one stands
on its own; session.json, written beside runs/ after every attestation, is the index that
ties them together:

{
  "total": 17, "receipt_count": 2, "action_count": 9,
  "root": "59fbac56…",
  "receipts": [
    {"execution_id": 1001, "trace_root": "b33e6278…", "total": 9, "actions": 5, "receipt": "runs/run-1001/receipt.json"},
    {"execution_id": 1002, "trace_root": "caec5dd7…", "total": 8, "actions": 4, "receipt": "runs/run-1002/receipt.json"}
  ]
}

root is a sha256 binary tree over the ordered receipt roots: leaf =
sha256(trace_root bytes), node = sha256(left ‖ right), an odd node is promoted unchanged,
and an empty session is 64 zeros — small enough to re-implement from that sentence. It
carries no signature, and needs none: every field is either copied from a receipt or
recomputed from the receipts, so zkagent_verify re-checks the listed roots against the
receipt files on disk, each per-receipt total against its total_amount, and their sum
against the session total. Any disagreement is a hard failure, not a warning: a
session_mismatch verdict means the index and the evidence do not describe the same session,
and nothing is accepted until the index is rebuilt.

zkagent_verify {"session": true}    # every receipt accepts, roots match, totals add up, one root

Replay

zkagent_verify records what it accepted in seen.json: the execution ids it verified one
by one, and the session roots it accepted whole. A second attempt at the same id (or the same
root) is refused — verdict: "replay", reason: "already_accepted", and a message naming
when it was first accepted. A receipt is evidence for one execution, once; presenting it
again would make one event look like two. Execution ids are never reused: a session started
over a cleared state.json continues above the highest accepted id.

Stated plainly: this is a local guard. It stops an agent from re-verifying its own
evidence and reporting a second acceptance, which is the failure the protocol's
Receipt::is_replay names. It cannot stop someone who copies the files and verifies them
elsewhere; that needs the chain to track spent receipts, which is the protocol's job.

Why this is a plugin and not a skill

A skill can tell the model to write a receipt. It cannot fire on every tool call, and it
cannot make the receipt verifiable by a third party. The hook is the part that cannot be
faked, and the proof is the part that cannot be forged.

The Desktop pane

A read-only view of the last attestation at /api/plugins/zkagent-attest/: verdict and
reason, action count, total against the cap, execution id, the trace root with a copy
button, and a slot picker that reports whether that one disclosure path verifies.

The small backend (dashboard/plugin_api.py) exists because the desktop SDK has no file
bridge to plugin-data/, where the runs live; it re-runs zkagent verify on each load, so
the badge is a check rather than a cached claim. One verification, about 11 ms.

Requirements

  • zkagent, the CLI (Rust). Point ZKAGENT_BIN at a build, put zkagent on PATH, or
    let the plugin fetch it: when zkagent_status finds no binary it runs
    scripts/install-zkagent.py — pinned version, pinned sha256 — into ~/.local/bin, then
    says so in its output. Set ZKAGENT_AUTOINSTALL=0 to forbid that. This plugin does not
    bundle a binary: the catalog forbids shipping compiled payloads, and a checksum-pinned
    download from the upstream release is the honest alternative.
  • No Python dependencies. Standard library only.
  • No API keys. One network call is possible: the checksum-pinned fetch above, and only when
    no binary is installed.

Usage

zkagent_status {}
zkagent_attest {"max_amount": 20}
zkagent_verify {}                    # one receipt
zkagent_verify {"session": true}     # every receipt in session.json, plus the Merkle root
zkagent_disclose {"index": 2}

zkagent_attest attests the oldest pending batch (zkagent's circuit has 8 action slots per
receipt). Anything beyond 8 stays pending for the next attestation.

The cost table

Every tool call costs a number of policy units. The default is deliberately small and
visible, and it is editable without reinstalling:

{"read_file": 1, "write_file": 2, "patch": 2, "terminal": 3, "web_search": 2, "web_extract": 3, "browser_exec": 3}

The numbers are declared in plugin.yaml as config_schema, so the host renders them as
settings under plugins.entries.zkagent-attest.settings (the Desktop Plugins tab writes the
same place), and the defaults there are exactly DEFAULT_COSTS in __init__.py. Read
precedence, stated because it is observable: host settings > state.json costs >
DEFAULT_COSTS. The plugin reads the host settings through ctx.get_config and falls back
to state.json when the host exposes no value (an older Hermes, or a hand-run module); on
such a host, editing state.json still works. The caps in zkagent_attest are in the same
units: max_amount is the session total, max_per_action the most expensive single call.

Privacy, precisely

  • The digest of a call's arguments is recorded; the arguments are not. zkagent_disclose
    reveals that digest, not the payload.
  • The receipt publishes total amount, action count, completion time, chain id, execution
    id and a trace root. It does not name the tools that ran.
  • The proof is zero-knowledge over the actions: the verifier learns only that the
    published totals are explained by some action set inside the signed policy.

What this does not prove: that a tool's result was honest, that the agent ran
unsandboxed-but-honest, or that the recorded set is exhaustive if something bypassed the
hook. It proves the recorded set is consistent with the receipt and inside the policy.

What it does to your machine

  • runs zkagent as a subprocess (setup, policy, prove, verify, disclose)
  • writes under plugin-data/zkagent-attest/ only: keys, policies, receipts, proofs, the
    session index, the replay guard, state
  • a post_tool_call hook that appends one JSON row per tool call and never raises
  • fetches the binary once, at most, and only if none is installed: the pinned release
    from the upstream project, sha256 checked before anything is written to ~/.local/bin,
    reported in zkagent_status (install.attempted, install.output) and refusable with
    ZKAGENT_AUTOINSTALL=0. No other network call.
  • no credential reads, no auto-updater, no shell outside zkagent

Limitations, stated

  • One trusted setup per install, single-party, development-grade. Not a ceremony.
  • 8 actions per receipt, by circuit design.
  • The ledger is per profile and survives updates; clear state.json to start a fresh one.
    seen.json deliberately survives that, so an execution id accepted once is never reused.
  • session.json is an index, not a proof: it is only as good as the receipts under runs/,
    which is exactly why zkagent_verify re-reads them instead of trusting it.
  • Replay refusal is local to this profile. It cannot see a receipt presented on another
    machine.
  • chain_id is carried through the receipt, not enforced against a network.

Licence

MIT. zkagent is MIT, by MCPVOT.

README from the reviewed commit e67adfe; it updates when the author re-pins.

Developer Mode

Explore built-in Hermes toolsets and actions.

HermesAgent

Developer?

Create a Hermes extension for Desktop or agent workflows.

Developer Section