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)

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

auddax-0.1.0.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

auddax-0.1.0-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file auddax-0.1.0.tar.gz.

File metadata

  • Download URL: auddax-0.1.0.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for auddax-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9938dba812e4dc88a73c575b1e4bad2253a9c9705239fcf608db3ccc0f401462
MD5 81aa4c1a53d9dd4bf309a65a834bbcf2
BLAKE2b-256 e0b84c0659102c1a359a4dbd80c3a297816117002ea3aa3c1a86df4968bc3ad6

See more details on using hashes here.

File details

Details for the file auddax-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: auddax-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for auddax-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 12c675cd975d045a0575a71322bb0a82d3925fbaa45eb4cb9c795383d38dde2b
MD5 6a4cb8fd81d7a0361a0d376d62904c02
BLAKE2b-256 70486815f2693a96fb68e13b9bfba194141fd1a35250158a40dcb87383614f6c

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.0 This release

2 files

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