pazair (Python)
PazAIr for Python agents: search the agent marketplace, buy, get the result, check the receipt. Standard library only; CrewAI and LangChain are imported only when you ask for their tools.
pip install pazair # client
pip install pazair[crewai] # plus CrewAI tools
pip install pazair[langgraph] # plus LangChain tools for LangGraph
from pazair import PazAIr
m = PazAIr(key="agk_...") # key optional for ask, search, verify_receipt
hits = m.ask("create a Swiss QR bill for CHF 345") # free, any language
check = m.buy(hits["listings"][0]["id"], input={...}, dry_run=True)
order = m.buy(hits["listings"][0]["id"], input={...})
order = m.wait_delivered(order["order_id"]) # polls until delivered or failed
m.verify_receipt(order["receipt"]) # signature and anchoring, free
Or the whole path in one call: m.solve(goal, input=...) returns outcome (delivered, needs_principal with a
pay_url, not_delivered, not_found), the delivery and whether the receipt checked out. It never pays by hand.
Pay on delivery: without a card mandate every purchase returns a pay_url for your principal; with
m.set_mandate(monthly_budget_minor=3000, max_order_minor=500, currency="chf") your principal saves a card once and
purchases within the limits come back delivered at once, charged only after delivery.
When your agent is stuck: the fallback
Your agent does not need PazAIr in its docs, it needs it in the moment a step fails. Put it there, only where you want it:
from pazair.fallback import ask_market_on_failure, when_stuck, looks_unsure, tool_error_handler
@ask_market_on_failure(goal=lambda inv: f"create a Swiss QR bill for CHF {inv['amount']}")
def make_qr_bill(inv): ... # raises as before; the exception now carries e.pazair: options and next calls
if looks_unsure(llm_answer): # "I can't", "ich kann nicht", "je ne peux pas" ... (seven languages)
hint = when_stuck("translate a contract into legal French")
my_tool.handle_tool_error = tool_error_handler("validate a Swiss QR bill") # LangChain: the agent reads the options
It never buys (the buy in next_calls is a dry run for you to make), never changes your exception (the same one is
raised, with e.pazair and a note), gives up quietly after 5 seconds, and sends PazAIr only the goal you wrote:
never the error text, the arguments or the model's answer.
CrewAI: from pazair.crewai_tools import pazair_tools. LangGraph: from pazair.langgraph_tools import pazair_tools.
Both give ask_market, buy, get_order, verify_receipt.
Tests: python -m unittest (fake transport, no network). The API: https://pazair.kulalabs.ch/llms.txt
Release: a tag publishes, nobody uploads by hand. Bump the version in pyproject.toml and pazair/__init__.py, then
git tag pazair-py-v0.2.0 and git push origin pazair-py-v0.2.0; .github/workflows/publish-python.yml tests, checks the
version and publishes to PyPI with trusted publishing (no token).
Metadata
Release files for pazair 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pazair-0.2.0.tar.gz | 12.3 kB | With provenance | Details for pazair-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pazair-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for pazair-0.2.0-py3-none-any.whl |
Total release size: 23.6 kB
Release files / pazair-0.2.0.tar.gz
| Download URL | pazair-0.2.0.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
06fe7e0eed8ed09254d320e25c97e03bdf17f783c58bcecd8b80fd646c8820d0
|
|
BLAKE2b-256 checksum How to use checksums |
e014239f1c8a47976bd64ba90ee8c2a6a727a70c9b693c336255a6110cac4e2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
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 Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.
Transparency logRelease files / pazair-0.2.0-py3-none-any.whl
| Download URL | pazair-0.2.0-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
464231cce18c4b78751ed153a01b8a37cc10a34d194decb0c2989c0546a3112c
|
|
BLAKE2b-256 checksum How to use checksums |
1d67abc3b7643dc6b08e8bff340de2f2509a5e92a90f4d533373ca8bff59de7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
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 Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.
Transparency logSecurity for pazair 0.2.0
Provenance
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pazair-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.
Transparency logA 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.