virohana-agent
Thin Python client for buying work from Virohana machine to machine: discover the catalog, parse the x402 v2 quote, verify the receipt offline against a pinned Ed25519 key.
Sovereign, humanity-first AI. Own the AI. Own your life.
pip install virohana-agent
What it does — and what it deliberately does not
| Discover the labor + memory catalogs | ✅ |
| Parse an HTTP 402 into a typed x402 v2 quote | ✅ |
| Verify a receipt's Ed25519 signature, offline | ✅ |
| Sign and send the payment | ❌ — use x402 |
Paying means holding a wallet key. A discovery client is the wrong place for one, so this package never asks for it. Hand the parsed quote to the thing that already owns your key.
Discover
from virohana_agent import Catalog
cat = Catalog.fetch() # two plain GETs, no auth, no account
print(len(cat), "skills")
s = cat.get("summarize", service="labor")
print(s.sku, s.price_usdc, s.url) # summarize 0.03 https://labor…/v1/summarize
summarize and notarize exist on both services at different prices, so
get() raises rather than picking one for you. service= disambiguates.
Quote
quote = cat.quote("summarize", {"text": "…"}, service="labor")
req = quote.cheapest()
req.amount_usdc # 0.03
req.amount_atomic # 30000 (USDC is 6 decimals)
req.network # 'eip155:8453' — Base
req.pay_to # '0x…'
req.is_usdc_on_base # True
req.input_schema # {'type': 'object', 'required': ['text'], …}
Quoting is free and commits to nothing: an unpaid request is how x402 quoting works. The client refuses anything that is not x402 v2 rather than guessing at another version's field names.
Verify — offline, always
from virohana_agent import verify_receipt
result = verify_receipt(receipt, response_body_bytes)
result.settlement_url() # https://basescan.org/tx/0x… — for you to open
Three checks, in the order they fail cheaply:
- Commitment —
sha256(body) == receipt.response_sha256. Proves the receipt is about your bytes. - Signature — Ed25519 over the raw response bytes.
- Pinning — the signing key is one this package shipped with.
(3) is what makes (2) worth doing. Verifying a signature against a key the
receipt itself handed you proves only that the receipt is internally
consistent. The pinned keys are in virohana_agent.receipts; rotating one
means a new release of this package, on purpose.
Nothing in the verify path touches the network. A verifier that asks the
seller "is this receipt valid?" proves nothing — a dishonest seller answers
yes. Settlement is the one check left to you: settlement_url() gives you
the explorer link, because confirming it would mean an RPC call this module
promises not to make.
body must be the raw bytes off the wire. Re-serialising parsed JSON
changes key order and whitespace, and the signature will not verify — that is
the signature working, not a bug. Passing a str raises for exactly this
reason.
Offline use
Everything except Catalog.fetch() and Catalog.quote() works with no
network at all:
cat = Catalog.from_payloads(labor=my_cached_x402, memory=my_cached_catalog)
Tests
PYTHONPATH=src python3 -m unittest discover -s tests -v
24 tests, no network. Fixtures are real payloads captured from the live services — a synthetic fixture would let this client drift away from what the servers actually send, which is the failure the suite exists to catch.
Links
MIT. Virohanalife OÜ, Tallinn, Estonia.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file virohana_agent-0.1.0.tar.gz.
File metadata
- Download URL: virohana_agent-0.1.0.tar.gz
- Upload date:
- Size: 18.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fabfdf289349707a967e48c430c8fd5e19eda73e0c69ade4b1d067836728399d
|
|
| MD5 |
2a2253e65476875026d4108f5fc2ba02
|
|
| BLAKE2b-256 |
03c375209722f8155596e9423f8c7e0077962363716f4368c86fe8c310c61c44
|
File details
Details for the file virohana_agent-0.1.0-py3-none-any.whl.
File metadata
- Download URL: virohana_agent-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8c5168b48ce29e086859cca785a9ba4ce516879fb40ee452194fde3a305214e
|
|
| MD5 |
f203c07e986aac46747ff3a19831fc30
|
|
| BLAKE2b-256 |
96b8f477f3668bbaa36f0da9e0d29ee8e0fc69ededb0054ef46f9568c7ac967e
|