Skip to main content Switch to mobile version vectorguard-agentproof 1.1.1 Agent identity: verify which AI agent is calling and which human or business is accountable, using verifiable credentials and signed HTTP requests
pip install vectorguard-agentproof==1.1.1 Copy PIP instructions
AgentProof lets a business delegate real authority, including money, to an AI agent, and lets every merchant or API the agent calls check that authority before acting.
It answers four questions on every request:
Who is this agent, and who is accountable for it? The agent signs each HTTP request with its own key. AgentProof ties that key to a registered agent and to the organization that owns it.
What may it do? The owner signs a delegation that limits scopes, merchants, expiry and spending. Sub-agents can only narrow it.
May it spend this much, here, now? The purchase is reserved against every budget in the delegation chain in one PostgreSQL transaction, or refused.
Can this be proven later? Every decision returns a signed receipt. Every committed money movement is mirrored to VectorLedger as tamper-evident evidence, and every security event goes on a hash-chained log with external checkpoints.
Revoking an agent or a delegation takes effect on the next request.
owner (business) agent merchant / API ──────────────── ───── ────────────── registers agent ───────────────▶ holds its own key delegates $5,000/day ───────────▶ signs every request ─────────────▶ POST /api/v1/verify-agent (scopes, merchants, expiry) (RFC 9421) identity + delegation + revocation + budget revokes agent ──────────────────────────────────────────────────────▶ next request: DENY receipt, ledger, events Status. AgentProof is a pilot candidate, not yet a production-certified financial authorization service. The architecture, spend enforcement, recovery drills and evidence pipeline are tested (see Testing), but an independent security review and a design-partner deployment are still to come. See Project status.
Walkthrough: an agent makes a purchase
Evidence and accountability
Running in production
The credential layer underneath
PostgreSQL is the supported production database. YugabyteDB is experimental.
Design notes: spend operations, OAuth design, receipt signing keys.
pip install vectorguard-agentproof # or: pip install -e ".[dev,pg]" from a checkout Run the full agent-commerce scenario in one process, with real cryptography (Ed25519 keys, signed credentials, RFC 9421 signatures, signed receipts):
python scripts/demo_agent_commerce.py # in-memory ledger python scripts/demo_agent_commerce.py --database postgresql://... # PostgreSQL enforcement python scripts/demo_agent_commerce.py --database postgresql://... \ --vectorledger 127.0.0.1:5433 --vl-user admin --vl-password-file ./vl-password It registers a purchasing agent for Acme, grants it $5,000/day ($1,500 per purchase, $2,000/day at one merchant), buys from two merchants, is refused when it exceeds its authority, is revoked, and then verifies the evidence.
Run the API locally:
agentproof_ENV=development agentproof-server # http://localhost:8000 curl http://localhost:8000/api/v1/health With a database, set agentproof_DATABASE_URL and run alembic upgrade head first.
The full version, with every option, is the Agent Identity guide.
1. The owner registers the agent
The agent generates its own Ed25519 key; AgentProof never sees the private key. The agent proves possession by signing a challenge addressed to the owner:
from agentproof.holder import build_presentation # POST /api/v1/agents/challenge (owner's admin key) -> {"nonce", "audience": owner_did} proof = build_presentation(agent_did, [], agent_keypair, audience=owner_did, nonce=nonce).proof.jwt # POST /api/v1/agents (owner's admin key) # {"did": agent_did, "hosted": true, "name": "Purchasing", "agentId": "buyer-001", # "ownerDomain": "acme.com", "challenge": nonce, "proof": proof} The response holds the registry record and a platform-signed registration credential. With hosted: true the agent gets a did:web identity whose keys can be rotated without changing the agent.
2. The owner delegates authority
curl -X POST $API/api/v1/agents/$AGENT_DID/delegations -H "X-API-Key: $OWNER_KEY" -d '{ "scopes": ["commerce:buy"], "expiresInSeconds": 86400, "maxDepth": 1, "spendLimit": {"amount": "5000", "currency": "USD", "period": "day", "maxPerTransaction": "1500", "merchantLimits": [{"merchantDid": "did:web:books.example", "amount": "2000"}]}, "audiences": ["shop.example.com", "books.example"] }' A sub-delegation can only narrow scopes, limits, audiences and expiry. Every link with a limit is charged: if Acme gives agent A $10,000/day and A gives B and C $7,000/day each, B and C together can never spend more than $10,000 a day.
3. The agent signs its requests
import httpx from agentproof.agent_client import AgentAuth, AgentSigner signer = AgentSigner(agent_did, agent_keypair, credentials=[registration_jwt, delegation_jwt], key_id=f"{agent_did}#key-1") async with httpx.AsyncClient(auth=AgentAuth(signer)) as client: await client.post("https://shop.example.com/checkout", json={"sku": "abc"}) Signatures follow RFC 9421 (Ed25519) and cover the method, host, path, query and body digest, with a nonce and an expiry of at most 5 minutes.
4. The merchant verifies and reserves funds
A merchant authenticates with an API key bound to a DID that is linked to its domain. It forwards the signed request, plus the purchase, to AgentProof:
curl -X POST $API/api/v1/verify-agent -H "X-API-Key: $MERCHANT_KEY" -d '{ "method": "POST", "authority": "shop.example.com", "path": "/checkout", "signatureInput": "...", "signature": "...", "credentials": "...", "requiredScopes": ["commerce:buy"], "requireRegistered": true, "spend": {"amount": "1200.00", "currency": "USD", "reference": "order-8812"} }' The response says ALLOW or DENY with a reason, names the agent, its owner and the delegation used, and includes the reservation and a signed receipt. If any budget in the chain is short, nothing is held. Or use the middleware:
from agentproof.agent_remote import RemoteAgentVerifier from agentproof.merchant import AgentIdentityMiddleware app.add_middleware(AgentIdentityMiddleware, verifier=RemoteAgentVerifier("https://agentproof.vectorguardlabs.com", merchant_api_key, required_scopes=["commerce:buy"], require_registered=True)) 5. Capture, release or refund
Unused holds expire (15 minutes by default) and a background worker returns them. Every call is idempotent by reference.
6. Verify a receipt offline
from agentproof.receipts import verify_receipt body = await verify_receipt(receipt_jwt, resolver, trusted_issuers=[platform_did], context=my_merchant_did) 7. The owner revokes the agent
curl -X PATCH $API/api/v1/agents/$AGENT_DID/status -H "X-API-Key: $OWNER_KEY" \ -d '{"status": "REVOKED"}' The next /verify-agent call is denied, outstanding reservations can no longer be captured, and OAuth tokens stop being accepted at introspection.
Or build the agent in AgentProof
A company can also design the agent itself in AgentProof: its purpose, instructions, AI model (OpenAI or Anthropic, on the company's own account), tools and spending rules. AgentProof produces a package the company runs on its own infrastructure. On first start the agent generates its key where it runs and enrolls with a one-time token; it is registered and receives its delegation automatically. The agent's key and the company's AI-provider key never reach AgentProof. See the Agent Builder guide.
AgentProof is also an OAuth 2.1 authorization server, so MCP servers and APIs that accept OAuth tokens can accept AgentProof agents without the SDK:
client_credentials with private_key_jwt and mandatory DPoP. The agent's DID is its client id.
Tokens are RFC 9068 JWTs: 5 minutes, one audience, DPoP-bound, no refresh tokens, and scopes never wider than the verified delegation.
Endpoints: /.well-known/oauth-authorization-server, /oauth/token, /oauth/introspect, /oauth/revoke, /oauth/jwks.
MCP tool-level scopes (agentproof.mcp): a delegation can grant mcp:tool:search without granting other tools.
Tokens carry identity and scopes only. Spending always goes through a reservation.
Signed receipts for every decision. With delegation enabled (agentproof_RECEIPT_KEY_DELEGATION=1), the PyHSM root key certifies short-lived per-tenant keys. Measured with a local PyHSM: 197 purchases/s against 33/s when the HSM signs every receipt, with one HSM signature for 600 purchases (benchmarks). Keys rotate automatically and can be revoked across all instances (POST /api/v1/platform/signing-keys/revoke).
Objective event log: denials, replays, revocations, spend transitions and admin reads. One hash chain per agent, append-only in the database, exportable as a signed bundle that verifies offline (GET /api/v1/agents/{did}/events/export).
External checkpoints: the platform key signs the chain heads at intervals and writes them to storage outside the database (agentproof_CHECKPOINT_FILE, several paths for independent copies). A rewritten chain, or a rolled-back checkpoint log, is then detected.
VectorLedger mirror: every committed money movement, delivered at least once through the outbox and reconciled hourly. GET /api/v1/spend/evidence-status shows whether the evidence is in sync, how far behind it is, and when it was last reconciled. A purchase is valid once PostgreSQL commits it, whatever the mirror's state.
Full list of claims, where each is enforced, the test that backs it, and known limitations: docs/SECURITY_REVIEW_PACKAGE.md.
No overspend across a delegation chain, under concurrency and across instances (PostgreSQL row locks and CHECK constraints; tested with concurrent children and grandchildren and a property-based state machine).
Each spend operation is all or nothing, including when the process is killed mid-transaction.
Only /verify-agent takes budget; OAuth tokens carry no spend authority.
Replay protection on signed requests and DPoP proofs; single-use challenges.
Tenant isolation of events, receipts and receipt-signing keys.
The application database role cannot alter evidence or un-revoke a receipt key.
The root key stays in PyHSM; receipt keys are never written to disk.
Report vulnerabilities privately to VectorGuard Labs (not in public issues).
docker compose up starts a development stack (API, YugabyteDB, Redis, Prometheus, Grafana, Jaeger, Caddy). It uses YugabyteDB, which is experimental for AgentProof; use PostgreSQL for anything beyond local testing. Secrets handling: SECRET_MANAGEMENT.md.
Full request and response details: API-Docs.md.
AgentProof's registration and delegation credentials are W3C verifiable credentials. The same layer provides did:key, did:web and did:ethr resolution, an issuer trust registry with tiers, StatusList2021 revocation, optional on-chain attestation anchoring (contracts/AttestationRegistry.sol), SD-JWT selective disclosure, billing, and example KYC, AML and accredited-investor credential types that can back a verified organization.
That layer and its CLI (agentproof issue, agentproof verify, ...) are documented in docs/CREDENTIAL_LAYER.md and API-Docs.md.
pip install -e ".[dev,pg]" pytest -q # without a database: DB tests skip export agentproof_TEST_DATABASE_URL=postgresql://user@localhost/agentproof_test pytest -q # everything (about 1 minute) pytest -m security -q # release-blocking adversarial tests PYTHON=python scripts/pg_recovery_drill.sh # encrypted point-in-time recovery PYTHON=python scripts/pg_failover_drill.sh # synchronous standby failover CI (.github/workflows/ci.yml) runs lint and type checks against recorded baselines (no new findings allowed), a dependency audit, the security suite, the whole suite on PostgreSQL 16 with a coverage floor, migration upgrade and rollback, and both drills. YugabyteDB runs as a non-blocking experimental job. Policy and baselines: TESTING_POLICY.md.
Done and tested: agent registry and delegation chains, hierarchical spend limits, atomic spend operations, the expiry worker, the evidence outbox and reconciliation, signed receipts with HSM-certified short-lived keys and shared revocation, event hash chains with external checkpoints, OAuth 2.1 with DPoP, encrypted backups, and point-in-time recovery and standby failover drills.
An independent security review.
Failover and restore drills on a production-sized deployment with production secrets and automatic failover (Patroni or a managed service).
VectorLedger evidence throughput: about 10 purchases per second per node. Batching needs atomic multi-entry posting in VectorLedger, which does not exist yet.
YugabyteDB support, which is experimental: the database tests pass on it but are about 100 times slower, and the recovery drills are PostgreSQL-only.
SPIRE workload attestation is a prototype. It passes against a real SPIRE server and agent (scripts/spire_test_env.sh, CI job test-spire).
Test coverage at the 80% target (currently 75.3%).
A VectorGuard Labs product. Website: agentproof.vectorguardlabs.com | PyPI: pypi.org/project/vectorguard-agentproof
Released: Nov 27, 2026
Author: Pavon Dunbar
MIT View SPDX License List
dev evm loadtest pg tracing
agent-identity ai-agents aml attestation blockchain credential-issuance credential-verification decentralized-identity delegation did http-message-signatures jwt kyc sd-jwt selective-disclosure trust-registry verifiable-credentials w3c
Development Status 4 - Beta
Intended Audience Developers
License OSI Approved :: MIT License
Programming Language Python :: 3
Topic Security :: Cryptography
Software Development :: Libraries :: Python Modules
Release files for vectorguard-agentproof 1.1.1
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: 659.6 kB
Release files / vectorguard_agentproof-1.1.1.tar.gz
Security for vectorguard-agentproof 1.1.1
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.
None of the files in this release were uploaded with provenance metadata.
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 28, 2026 2 release files No provenance
Nov 27, 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
Deployed from fc0d8e6











