Skip to main content

Auddax Python SDK

Official Python client for the Auddax API: governed clinical intakes with streaming turns, batch evaluation, webhooks, and typed handoffs.

The Auddax sandbox is a research preview. Do not use it for real patient care, and do not send real patient data.

Install

pip install auddax

Python 3.10+. The client reads AUDDAX_API_KEY from the environment.

Three calls to a handoff

from auddax import Auddax

client = Auddax()  # or Auddax(api_key="adx_sb_...")

intake = client.intakes.create(demographics={"age_years": 58, "sex": "male"})
turn = client.intakes.send_turn(intake.encounter_id, "I have chest pressure and I'm sweating.")
if turn.terminal:
    print(turn.handoff.soap.assessment)   # typed handoff, embedded on terminal turns
print(turn.turns_remaining)               # from the x-auddax-turns-remaining header

Blocking turns run a real clinical reasoning pass (20-40 s). The SDK attaches an Idempotency-Key automatically, so transient failures retry safely without re-driving the engine.

Streaming

Use streaming for anything a person watches: first tokens arrive in seconds:

with client.intakes.stream_turn(intake.encounter_id, "It started an hour ago.") as stream:
    for fragment in stream.text():
        print(fragment, end="", flush=True)
print()
print(stream.turn.disposition)  # the completed Turn, populated after the loop

Or iterate the raw events (MessageDelta, MessageCompleted, HandoffCompiling, HandoffProgress, TurnCompleted).

Batch evaluation

Run scripted scenarios as a background job and get full transcripts back:

batch = client.batches.create(
    scenarios=[
        {"label": "benign", "messages": ["Mild sore throat since yesterday. No fever."]},
        {"label": "cannot-miss",
         "messages": ["Chest pressure for an hour, sweating, short of breath."],
         "demographics": {"age_years": 58, "sex": "male"}},
    ],
    label="smoke-test",
)
result = client.batches.wait(batch.batch_id)
for scenario in result.scenarios:
    last = scenario.turns[-1]
    print(scenario.label, last.disposition, last.safety_status)

Webhooks

hook = client.webhooks.create("https://example.com/hooks/auddax",
                              events=["intake.escalated", "batch.completed"])
# hook.secret is shown once - store it.

Verify deliveries in your receiver:

from auddax import verify_signature

ok = verify_signature(request_body, request.headers["auddax-signature"], secret)

Configuration

Configure the engine per intake. Read the catalog with client.config(); today it lists locale (en-US, es-AR, pt-BR). Every result echoes the resolved config and a hash, so two runs are comparable when their hashes match.

catalog = client.config()

intake = client.intakes.create(config={"locale": "es-AR"})
print(intake.config, intake.config_hash)

Errors and limits

Errors are typed: RateLimitedError (with .retry_after), QuotaExceededError, IntakeClosedError, NotFoundError, AuthenticationError, and so on. The SDK retries 429s automatically. client.usage() returns today's turn and intake counts against your quota.

Metadata

Release files for auddax 0.2.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 auddax 0.2.0
File Size Uploaded Provenance Actions
auddax-0.2.0.tar.gz 16.3 kB Without provenance Details for auddax-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for auddax 0.2.0
File Interpreter ABI Platform Actions
auddax-0.2.0-py3-none-any.whl Python 3 none any Details for auddax-0.2.0-py3-none-any.whl

Total release size: 31.8 kB

Release files / auddax-0.2.0.tar.gz

Download URL auddax-0.2.0.tar.gz
Size 16.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f0c90cfb98c262e7987efa76c339f16d1f8df565e71e139b9a01d912245605ee
BLAKE2b-256 checksum
How to use checksums
e2f5b89e19f7b142a93c5008bcca1cce856f1a4b1373a5a9ac63b86c2447e2ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / auddax-0.2.0-py3-none-any.whl

Download URL auddax-0.2.0-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
00ac32beb1b7db0c92cf27aec34fe0140097dd7e12abdc2d301978d912df4c9f
BLAKE2b-256 checksum
How to use checksums
08e4450cd1a14b878b817e0680a464bebdcd3e635e47ed5c78e8bf77756324c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for auddax 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.

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.

Release history Release notifications | RSS feed

This release

0.2.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