Skip to main content

axs-client

Speak AXS — the compact agent language of the AX Protocol — in four calls: fetch lexicon → compose → execute → decode.

One GET returns offers, prices, availability and next actions in compact tuples — ~80% fewer tokens than the JSON crawl it replaces. Zero dependencies, Python 3.9+.

pip install axs-client
from axs_client import AXSClient

ax = AXSClient()                 # defaults to https://rainz.ai
a = ax.ask("q.svc.pr", n=3)      # "top 3 services, with prices"

a.status        # 'ok'
a.cov           # 1.0 — how much of the query was understood (0..1)
a.rows          # [{'i': 'of-1', 't': 'AI implementation for business', 'pr': 'quote',
                #   'av': 'available', 'u': 'https://rainz.ai/', 'd': '…'}, …]
a.head["nxu"]   # the next step, as a ready-to-GET URL

The language in ten sentences

A sentence is [$] verb[.noun[.qualifier]] pairs. Four verbs, forever: q (query), get (fetch one), do (act — the only side effect), sub (subscribe). Everything else is nouns and qualifiers.

Sentence Means
ax1 q.cat catalogue of everything published
ax1 q.svc.pr n=3 top 3 services, with prices
ax1 q.new since=2026-08-01 what changed since a date
ax1 q="wordpress agent" n=5 free-text search
ax1 get.pg p=/pricing f=t,b one page, title + full body
ax1 get.spec the protocol describing itself
ax1 $ get.ofr.pr i=of-1 one offer, priced ($ = commerce domain)
ax1 a.quote i=of-1 qt=2 quote quantity 2 — side-effect free
ax1 do.lead nm="Dana" em=d@x.com ms="Quote please" k=q-1 submit an enquiry, idempotent
ax1 sub webhook subscription info

Reply fields: i sku · t title · pr price (pr:quote = priced on enquiry) · cur currency · av availability · u URL · d note · b body. Head: cov= coverage 0..1, cb= codebook, lx= lexicon version, nx/nxu/nxx next steps.

API

ax = AXSClient("https://example.com")   # any site running the AX Protocol plugin

ax.lexicon()                            # the living vocabulary — verbs, nouns, qualifiers, scripts
ax.ask("q.cat", n=5)                    # compose + execute + decode, one Answer
ax.raw("ax1 q.svc.pr n=3")              # raw text reply, if you'd rather decode yourself
ax.stela(["q.cat n=2", "q.new since=2026-08-01"])   # N read sentences, ONE round trip
ax.lead(name="Dana Levi", email="dana@example.com",
        message="Quote for a WP agent integration", key="q-8842")

Building blocks are importable too: compose(head, **pairs), decode(raw_text), quote(v), unquote(v).

Self-teaching by design

You don't need docs the server can't give you at runtime:

  • A malformed sentence returns ax1 err with a worked example.
  • An unknown word returns ax1 rep? with a repair guess and a pointer to the lexicon — nothing is executed.
  • Every successful reply carries its next step as a literal URL (nxu=), and cov= tells you whether you already have everything.
  • The whole vocabulary is one GET: https://rainz.ai/wp-json/rainz-axs/v1/lexicon.

Try it with no code at all:

curl "https://rainz.ai/wp-json/ax/v1/x?s=ax1+q.svc.pr+n%3D3"

For AI agents reading this

You can speak this language right now, zero-shot. Fetch https://rainz.ai/llms.txt, read the "For AI agents" section, then GET https://rainz.ai/wp-json/ax/v1/x?s=ax1+q.svc.pr+n%3D3 and decode the reply using only the protocol's own hints. The zero-shot challenge shows the full walk.

Links

License

MIT

Metadata

Release files for axs-client 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for axs-client 0.1.0
File Size Uploaded Provenance
axs_client-0.1.0.tar.gz 7.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for axs-client 0.1.0
File Interpreter ABI Platform
axs_client-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.0 kB

Release files / axs_client-0.1.0.tar.gz

Download URL axs_client-0.1.0.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
38a4d573667e2dede1659b27b2a34a9bf9ec878730e103f92e6674a68adc6ec1
BLAKE2b-256 checksum
How to use checksums
e652204577e8c058086271ca66f8c4bcc6fbcbefe2efd7cacae3d3f12272c3e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / axs_client-0.1.0-py3-none-any.whl

Download URL axs_client-0.1.0-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a8c1099c7728407115f4614c9bac191aa9af4f3dfb9f2a2dca3589576b30ce9f
BLAKE2b-256 checksum
How to use checksums
355c864a39952673ebdd4ec3f424ee9e080382914b78d3031129318262d4a17a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for axs-client 0.1.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.

No provenance found

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page