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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file auddax-0.2.0.tar.gz.
File metadata
- Download URL: auddax-0.2.0.tar.gz
- Upload date:
- Size: 16.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0c90cfb98c262e7987efa76c339f16d1f8df565e71e139b9a01d912245605ee
|
|
| MD5 |
9fdf3a98bb39e32049cce33531af099e
|
|
| BLAKE2b-256 |
e2f5b89e19f7b142a93c5008bcca1cce856f1a4b1373a5a9ac63b86c2447e2ac
|
File details
Details for the file auddax-0.2.0-py3-none-any.whl.
File metadata
- Download URL: auddax-0.2.0-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00ac32beb1b7db0c92cf27aec34fe0140097dd7e12abdc2d301978d912df4c9f
|
|
| MD5 |
70d053b09c16e84a8555516f57152b46
|
|
| BLAKE2b-256 |
08e4450cd1a14b878b817e0680a464bebdcd3e635e47ed5c78e8bf77756324c5
|