Skip to main content Switch to mobile version valqore-qed 1.3.0 Self-hosted policy and evidence kernel for AI-agent actions
pip install valqore-qed Copy PIP instructions
A self-hosted policy and evidence kernel for AI-agent actions.
An agent proposes an action. qed decides ALLOW / BLOCK / REQUIRE_APPROVAL with deterministic rules. Every step is written to one Ed25519-signed, hash-chained evidence ledger that a third party can verify without trusting the instance that produced it.
No LLM in the decision path. No network in the kernel. Runs on your own hardware, including air-gapped.
Valqore QED — quod erat demonstrandum, which is the claim: a third party can verify what happened here without trusting the instance that recorded it. qed is the command, the import package and the repository.
The name changed because "gate" is already a commercial product in this exact category, is not registrable for the thing it describes, and named the half of the product every competitor ships rather than the half that is hard to copy. The rename cost one commit and invalidated no evidence, because ADR-0006 had already taken the product name out of the hash domain separators in week 1 — which is why gate still appears in docs/adr/, CHANGELOG.md and two superseded spec literals, and nowhere else.
Licence: Apache-2.0. See LICENSE and NOTICE. What each channel serves, and what it does not. pip install valqore-qed installs the kernel, and pip install qed-verify the standalone verifier that checks a chain without it. docker run ghcr.io/valqore/qed:1.3.0 and the Helm chart at oci://ghcr.io/valqore/charts/qed are public and cosign-signed; docs/deployment.md carries the cosign verify line to check that with. brew install valqore/tap/qed works from a public tap holding three binaries whose checksums match the assets CI built — but those binaries are not code-signed or notarised, so macOS may refuse to run one until you clear it. deploy/qed.spec keeps UPX off so that signing stays possible; no release step signs anything yet. npm install valqore-qed resolves to a 0.0.0 stub that holds the name and nothing else: QED is a Python program and a JavaScript client has never existed. .github/workflows/release.yml still gates both publishing steps behind the PUBLISH_PYPI and PUBLISH_GHCR repository variables. That gate is no longer an embargo — it is what stops a v* tag from publishing because somebody cut it to test the pipeline. Which version an index serves is a question for the index, and never for this file.
What it does today, capability by capability, is under Status.
python -m venv .venv && . .venv/bin/activate # Windows: .venv\Scripts\activate pip install -e ".[dev]" -e packages/qed-verify qed --version # confirms what you installed qed demo qed --version prints the version, whether it is a wheel or the single-file binary, and the interpreter — which is what a bug report needs and what tells you whether pip install valqore-qed has shadowed a clone. The number is also ENGINE_VERSION, stamped into every verdict this instance writes.
One command, no configuration: it generates a key, writes a qed.yaml, decides five proposals — a read, a destructive migration, an open security group, an unapproved egress and an agent nobody authorised — and verifies the chain it just wrote. It exits 0 although a BLOCK is in it, because the exit code of a demo is whether the demo ran. Everything lands in ./qed-demo (gitignored by the demo itself, every record marked dev); delete it when you are done.
Then the same thing by hand, which is what an adapter does:
qed keys init --dir .qed # Ed25519 evidence key, 0600 qed check examples/proposals/prod-db-drop.json --dir .qed qed export --dir .qed --out chain.jsonl qed-verify chain.jsonl --keys .qed/public --instance-id qed-local The wheel also installs vqed as an alias for the same entry point, for a machine where qed is taken or ambiguous — it is also the name of a Unix text editor, the ancestor of ed. qed is the documented command and the import package; everything below is written with it.
qed check exit codes: 0 ALLOW, 2 BLOCK, 3 REQUIRE_APPROVAL, 1 error — but the default mode is shadow, and shadow always exits 0. The first run above prints REQUIRE_APPROVAL and exits 0, which is deliberate: a pipeline that failed in shadow mode would make shadow mode useless as a way to find out what a policy would do. docs/onboarding-shadow-to-enforce.md covers the three separate dials that all have to point at "enforce" before a BLOCK stops anything.
--instance-id is not decoration. It is the only check that ties an export to a particular instance; everything else the verifier does is self-referential, so a chain generated on a laptop with a fresh key passes without it. Omit it and the verifier now says bound to : NOTHING and names the check that did not run. The id must come from outside the file — and if you are the auditor rather than the operator, so must the public keys.
Put it in front of an MCP server
qed mcp --human you@example.com --env prod \ --target-template 'db:{env}/{args.table}' \ -- npx -y @some/mcp-server The default mode is shadow: every tool call is decided and recorded, and nothing is stopped. Point your agent at qed mcp instead of the server, work for a week, then read what would have happened:
qed export --dir .qed --format oscal --out assessment.json --human or --mandate is required. See docs/mcp-proxy.md for why.
Put it in front of your coding agent
qed install claude-code --human you@example.com Every Bash, every file write, every MCP call and every skill then goes through the same kernel. A refused call comes back as deny with the rule ids; one that needs a person comes back as ask, which puts the question to whoever is at the terminal.
This adapter is advisory and always will be — whoever can edit the settings can delete the entry that calls it, so the chain records it as advisory and never claims the call could not have happened. docs/hooks.md has the hardening, and why an ALLOW verdict deliberately prints nothing at all.
Put it in front of your own function
from qed.sdk import Qed, guard qed = Qed.from_env() @guard(qed, target=lambda account_id, **_: f"crm:accounts/{account_id}", deletes=True) def delete_account(account_id: str) -> None: ... For the action that has no front: a function in your own application that charges a card or deletes a tenant. The decorator proposes before the call, raises QedBlocked or QedApprovalPending if the answer was no, runs the function, and reports what happened. A refused action never runs.
It fails closed by default, unlike the hook: an application has no human watching, so a QED it cannot reach must stop the action rather than wave it through. examples/sdk/ has governed LangGraph and CrewAI tools that run whether or not those frameworks are installed.
Put it in front of everything else
qed proxy --human you@example.com --env prod HTTPS_PROXY=http://127.0.0.1:8888 HTTP_PROXY=http://127.0.0.1:8888 your-agent The MCP proxy governs the tools an agent was given; this governs the rest -- the curl in a shell step, the SDK call in a script, the request an agent makes because something in its context told it to.
Read docs/http-proxy.md before relying on it, for one reason: a CONNECT tunnel is always recorded as advisory. QED decides whether the connection may be opened, but the request inside it is encrypted, so it cannot replace the credential and the agent is using its own. Plain HTTP is fully visible and fully brokered.
# qed.yaml evidence: store_env: QED_DATABASE_URL # a URL has a password; name the variable pip install 'valqore-qed[postgres]' # or -e '.[postgres]' from a clone export QED_DATABASE_URL=postgresql://user:pass@host/qed qed keys init && qed serve SQLite is the default and runs the whole product on one file. Postgres is for the case SQLite genuinely cannot serve: more than one replica sharing a chain, with exactly one of them holding pg_try_advisory_lock and appending (SPEC §15).
It is one store implementation, not two. Forty repository methods are written once and run against either backend, because two copies would be two implementations of the chain's append path and the day they drifted is the day the chain behaved differently depending on which database somebody deployed. tests/evidence/test_cross_backend.py writes the same records to both and asserts every hash, signature and payload matches byte for byte — because if they did not, an export from a Postgres deployment would fail verification against records written on SQLite, and nobody would notice until an auditor did.
helm install qed ./deploy/helm/qed --set signingKey.existingSecret=qed-signing-key --set adapters.existingSecret=qed-adapters --set adapters.registered[0].id=mcp-proxy --set replicaCount=3 --set evidence.backend=postgres --set evidence.postgres.existingSecret=qed-db Every replica serves the API and decides. The decider writes its record durably to an outbox and answers immediately; exactly one replica holds pg_try_advisory_lock(1734440037) and turns those records into chain entries afterwards (ADR-0009). So decision latency is independent of chain latency, and evidence_ref may be an outbox id until the leader catches up — GET /v1/evidence/by-ref/{ref} resolves either shape.
Kill the leader and its connection drops, the lock is released, and another replica takes over on its next tick. Nothing has to notice, announce or hand over. deploy/docker-compose.yml is the same arrangement on a laptop, if you would rather watch it happen than read about it.
The chart refuses replicaCount > 1 on SQLite. Two writers would read the same chain tip and either collide on the hash primary key — losing the evidence for a decision already delivered — or fork the chain, which still verifies record by record and has simply stopped being a chain. docs/deployment.md has the rest.
qed serve --dir .qed --dev # --dev skips adapter signatures; local only curl -s localhost:8710/readyz | jq /readyz answers 503 until there is a signing key and a way to authenticate adapters (SPEC §17). Without --dev, register one first:
qed adapters add mcp-proxy-ci --dir .qed # prints the secret once qed adapters list --dir .qed # is the variable actually set? Adapters sign each request; see docs/api.md for the signature and for how qed adapters rotate keeps the old secret working while a fleet restarts.
export QED_URL=https://qed.internal export QED_ADAPTER_ID=adp_ci QED_ADAPTER_SECRET=... qed check deploy-proposal.json Exit 0 ALLOW, 2 BLOCK, 3 REQUIRE_APPROVAL — and 1 when QED could not decide at all, which is the distinction a pipeline cannot do without: a runner that could not reach the instance has not been refused anything, and reading that as an allow is the failure this whole project exists to prevent.
--server keeps the evidence signing key out of CI and the evidence itself alive after the job. Without an instance, --evidence-out qed-evidence.jsonl leaves the chain behind as an artifact anyone can check with the public key. docs/ci.md has the Actions workflow.
All twelve weeks of the §22 build order are code-complete. The exit criteria that depend on people — two design partners in enforce mode, written auditor acceptance, 1,000 gated actions — are not met and are tracked separately; what follows is what the code does.
Evidence format 1.0 is frozen (ADR-0015). A record written under schema_version: "1.0" verifies under every later verifier, and the repository carries the records that prove it: tests/evidence/fixtures/evidence-format-1.0/ is a real export produced once and never regenerated, checked on every CI run. docs/evidence-format.md is the specification, with a conformance section for anyone writing a second verifier.
Not built yet: the Codex hook (its API is unconfirmed, SPEC §12.2), mode: mitm for the HTTP proxy, the remote.packs feed (the air-gap import is built; fetching a bundle from a URL is the same verification with a download in front of it), the anchor log itself (the client is built; the log is qed-cloud's, SPEC §24.2), and SPEC §19's live-stream and budget pages.
Measured, not estimated: p95 decision latency is 4.5 ms on SQLite and 10.6 ms on PostgreSQL against SPEC §18's 50 ms target — both in-process, with the database on the same machine. Over HTTP to PostgreSQL in the same cloud region it is 46 ms, and from another region, 1,085 ms. A decision makes 18 SQL statements, so the figure is the round-trip count times the round-trip time; co-locating the kernel and its database is a requirement, not an optimisation. Throughput is 250–400 decisions/s per replica, so SPEC §22's "1k rps" is several replicas rather than one. docs/performance.md has the numbers, including the ones that are less flattering.
qed.valqore.io — built from docs/ with mkdocs-material and deployed from CI on every push to main (mkdocs serve to read it locally). New here? docs/onboarding-shadow-to-enforce.md is the install path, in the order that keeps you able to roll back at every step — and it explains the three separate dials that all have to point at "enforce" before a BLOCK stops anything.
examples/README.md is the index of things that run.
QED_SPEC.md — the implementation specification (v0.3.1). Normative. (SPEC §20.1 calls this file SPEC.md; it is left under its original name because every inbound reference in this repository already spells it that way.)
DESIGN_DECISIONS.md — ADR-001…008, accepted. Written in Turkish during the planning phase and superseded by the spec; kept because the public ADR index cites it as the record of what was decided before any code existed.
docs/adr/ — decisions made while implementing, where the spec was silent.
THREAT_MODEL.md — STRIDE, and twelve things qed does not protect against. Read that section first.
docs/onboarding-shadow-to-enforce.md — getting from shadow to enforce.
docs/evidence-format.md, docs/policy-language.md, docs/blast-radius.md.
docs/mcp-proxy.md, docs/http-proxy.md, docs/hooks.md, docs/credential-broker.md, docs/delegation.md, docs/approvals.md, docs/api.md, docs/oscal.md, docs/assurance-classes.md, docs/compliance.md, docs/policy-testing.md.
Running it: docs/deployment.md (process, container, Helm, HA, releasing), docs/ci.md (qed check in a pipeline), docs/checkpoints.md (anchors), docs/siem.md (OCSF), docs/performance.md (what it actually costs) and docs/validation.md (what a green test suite cannot see).
Invariants (enforced by tests, not by convention)
ruff check . && ruff format --check . mypy pytest pytest runs the full suite; -m "not slow and not perf" is what CI's matrix runs on four cells, and the perf marker is separated because a timing assertion measures the host as well as the code (docs/performance.md).
Every commit needs a Signed-off-by line — git commit --signoff. CI enforces it on every commit in a pull request, and a commit without it cannot merge.
Found a claim in this repository that overstates what the code does? There is an issue template for exactly that (.github/ISSUE_TEMPLATE/overclaim.yml), and it is the most useful issue you can open here.
Both files in this release have provenance metadata.
Apache-2.0 View SPDX License List
Programming Language Python :: 3.12
Release files for valqore-qed 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 880.6 kB
Release files / valqore_qed-1.3.0.tar.gz
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.
Release files / valqore_qed-1.3.0-py3-none-any.whl
Security for valqore-qed 1.3.0
Both files in this release have been uploaded with provenance metadata.
With provenance valqore_qed-1.3.0.tar.gz Nov 17, 2026
With provenance valqore_qed-1.3.0-py3-none-any.whl Nov 17, 2026
Attestation for valqore_qed-1.3.0.tar.gz
Attestation for valqore_qed-1.3.0-py3-none-any.whl
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Nov 17, 2026 2 release files Full provenance
Nov 14, 2026 2 release files Full provenance
Nov 2, 2026 2 release files Full provenance
Nov 1, 2026 2 release files Full provenance
Oct 19, 2026 2 release files Full provenance
Oct 17, 2026 2 release files No provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation




