This release is a pre-release and may not be stable for production use.
AgenTrux SDK
Python SDK for AgenTrux — A2A authenticated pub/sub client.
Status: Beta (0.4.0b2) — OAuth 2.1 client_credentials + cursor-based pagination + SSE hint-only consumer.
Install
pip install agentrux-sdk
The import name is agentrux_sdk (distinct from the server-internal
agentrux package, so the two never collide):
from agentrux_sdk import AgenTruxClient
Quick Start
from agentrux_sdk import AgenTruxClient
# Confidential client (script credentials issued by Console)
async with AgenTruxClient(
endpoint="https://api.agentrux.com",
client_id="crd_<uuid>", # script credential client_id
client_secret="aks_<base64>", # script credential client_secret
) as client:
# --- Publish ------------------------------------------------------
result = await client.publish(
topic_id="top_<uuid>",
payload={"msg": "Hello!"},
event_type="hello.world",
)
print(result.event_id, result.sequence_number)
# --- Read (cursor-based) ------------------------------------------
async for evt in client.read_pull(topic_id="top_<uuid>"):
print(evt.event_type, evt.payload)
OAuth 2.1
AgenTruxClient uses the client_credentials grant. Pass the script
credentials (client_id="crd_<uuid>", client_secret="aks_<base64>")
issued by Console; the SDK obtains and re-issues access tokens
automatically — there is no refresh token to persist.
For interactive setup (device flow, RFC 8628) the approval step is
delegated to the Console SPA, not the SDK. See install_topology /
device_code_setup for the setup helpers.
Read modes
read_hybrid(topic_id=...): pull-driven, SSE hints accelerate the next pull.read_pull(topic_id=...): pull only; works without SSE reachability.read_sse(topic_id=...): server-sent events with auto-reconnect.
Each returns an async iterator of Event (.event_id, .event_type,
.payload, .sequence_number). Use the last event_id as the after=
cursor to resume.
Used by
This SDK is the shared transport layer for all AgenTrux Python plugins:
agentrux-agent-tools— AI agent toolkit- (Dify Tools / Dify Trigger — once migrated to v0.3)
License
MIT — see LICENSE. Full license text: https://opensource.org/license/mit.
Metadata
Release files for agentrux-sdk 0.4.0b3
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 | |
|---|---|---|---|---|
| agentrux_sdk-0.4.0b3.tar.gz | 43.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentrux_sdk-0.4.0b3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 100.7 kB
Release files / agentrux_sdk-0.4.0b3.tar.gz
| Download URL | agentrux_sdk-0.4.0b3.tar.gz |
|---|---|
| Size | 43.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8a20c12deb5c6f51af7ac034e1d68ed04c6c0d3b5f3e914feae2460ff728703
|
|
BLAKE2b-256 checksum How to use checksums |
693e98b1ce82ddfbec48603a8bbadb05068faa823340209d23d71af808906fae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / agentrux_sdk-0.4.0b3-py3-none-any.whl
| Download URL | agentrux_sdk-0.4.0b3-py3-none-any.whl |
|---|---|
| Size | 57.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ed3c73fcbb30d7dd54b515f5937e8ea6f17921f19d399de2f567f27432318d5c
|
|
BLAKE2b-256 checksum How to use checksums |
f4246b948f7b5b62233084776292f9102890a29f87fb2ad32167622b4ad88017
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for agentrux-sdk 0.4.0b3
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.