Skip to main content

idun-sdk

PyPI Python License: MIT

A thin, dependency-free Python client + CLI for Azure AI Foundry agents (Idun / NatureLM) and any OpenAI-compatible endpoint. Tenant-agnostic by default: bring your own Foundry resource, no hardcoded tenant coordinates.


Install

pip install idun-sdk
# with optional PDF ingest:
pip install "idun-sdk[pdf]"   # pulls PyPDF2

Quick start (SDK)

from idun import IdunClient

client = IdunClient()                 # reads ~/.idun/config.toml
out = client.complete("Summarize the quarterly risk report.")
print(out["text"])

Two CLIs — two setup wizards

This package ships two command-line tools with distinct purposes, and each has its own first-run setup wizard:

  • idun — the Azure AI Foundry client. Agent completions, trajectory export, document matrix (idun matrix), prompt packs (idun packs / idun run), and Hugging Face Hub operations (idun hf). Azure-specific.
    • idun wizard configures the Azure Foundry client (endpoint / project / agent) in ~/.idun/config.toml.
  • idun-multi — the multi-provider LLM console. Talks to any of the 17 registered providers (OpenAI, Anthropic, Groq, OpenRouter, HF, …) plus race, cost, models, doctor, support. Provider-agnostic.
    • idun-multi wizard configures the default LLM provider (picks one of the 17 registered providers) in ~/.idun/config.toml.

Both wizards write only to ~/.idun/config.toml (never ~/.idunrc, which is no longer used). Credentials live in per-provider ~/.idun/<id>.token files (0600).

idun-multi providers        # list providers + credential status
idun-multi -p openrouter ask "hello"   # -p goes BEFORE the subcommand
idun-multi race "explain quantum"      # compare providers on one prompt
idun-multi doctor            # environment + credential audit (also checks scripts)
idun-multi wizard            # pick the default LLM provider
idun wizard                  # configure the Azure Foundry client

Async

import asyncio
from idun import AsyncIdunClient

async def main():
    c = AsyncIdunClient()
    out = await c.acomplete("What changed vs last quarter?")
    print(out["text"])

asyncio.run(main())

CLI

idun chat "your prompt"                    # one-shot completion
idun chat --async "your prompt"           # async path
idun run <pack> <key>                     # run a bundled prompt pack
idun packs                                # list bundled prompt packs
idun login                               # device-code login to your Foundry
idun status                              # show token / config state
idun wizard                              # configure the Azure Foundry client
idun welcome                             # ASCII banner
idun matrix  --docs DIR  --questions FILE   # Doc x Question pivot (IDEA α)
idun diff-docs --doc-a A --doc-b B --topics T  # clause-drift compare (IDEA γ)

Supported providers

The idun CLI / IdunClient speak to any OpenAI-compatible endpoint plus the native Azure AI Foundry transport. Registered providers (3 transports):

  • OpenAI-compatible: openai, groq, together, perplexity, fireworks, novita, xai, deepseek, mistral, openrouter, gemini, hf
  • Anthropic: anthropic (Claude)
  • Azure: azure (Azure AI Foundry / Idun agent)
  • Local: ollama, local (bring your own endpoint)

Tested vs untested (as of 2026-08-21). After a full audit only a subset of these providers has actually been exercised against a live endpoint. The rest are registered and code-complete but NOT verified — they may work, but nobody has confirmed it.

Status Providers
✅ tested against a live endpoint openrouter (live OK), openai (token valid, account has no credit → HTTP 429), hf (migrated to router.huggingface.co; see note), ollama / local (correctly unreachable in CI)
⚠️ untested anthropic, groq, together, deepseek, mistral, gemini, xai, nous, perplexity, fireworks, novita
ℹ️ needs tenant azure

See AUDIT-BEFEHLE.md for the full command audit and BEFUNDE.md / ROADMAP-FIX.md for the bug log. A live test harness for idun race is planned to exercise all providers before the next release.

Hugging Face (hf): migrated to the OpenAI-compatible router https://router.huggingface.co/v1 (the old api-inference.huggingface.co host was retired and no longer resolves). Requires an HF token (HF_TOKEN).

Any OpenAI-compatible base URL works with zero code changes — set it in the config and the provider switches automatically. See SUPPORT_MATRIX.md for per-provider capability details.

Configuration (tenant-agnostic)

~/.idun/config.toml (neutral defaults — supply your own resource). Secrets go to per-provider ~/.idun/<id>.token files (mode 0600), not in this file:

[defaults]
provider = "openrouter"   # selected by `idun-wizard`

[openrouter]
model = "deepseek/deepseek-chat"

No tenant coordinates are baked into the shipped code. The CLI reads the config via idun.config; environment variables (IDUN_PROVIDER, OPENAI_API_KEY, …) always win over the file.

Additional features

These build on the core SDK and live in idun.matrix / the playground repo.

Idun Matrix — Doc × Question pivot (IDEA α)

Build an N × M answer matrix over documents × questions. Each cell carries the answer, the source citation, and a status (GREEN = answered+cited, RED = contradiction, GRAY = no info).

idun matrix --docs ./contracts --questions ./questions.txt

Clause Drift compare (IDEA γ)

Compare two documents across topics and flag deviations:

idun diff-docs --doc-a contract_a.txt --doc-b contract_b.txt --topics topics.txt

PocketPal-style Bridge (IDEA β)

A tenant-agnostic mobile web UI that runs idun matrix against your Foundry resource: https://qapdex-maker.github.io/idun-playground/matrix_app.html

Links

Development

pip install -e ".[dev]"
pytest        # offline; no network/API keys required
ruff check .  # lint (pinned ruff==0.15.10 in CI)

License

MIT.

Download files

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

Source Distribution

idun_sdk-1.0.24.tar.gz (127.8 kB view details)

Uploaded Source

Built Distribution

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

idun_sdk-1.0.24-py3-none-any.whl (91.5 kB view details)

Uploaded Python 3

File details

Details for the file idun_sdk-1.0.24.tar.gz.

File metadata

  • Download URL: idun_sdk-1.0.24.tar.gz
  • Upload date:
  • Size: 127.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for idun_sdk-1.0.24.tar.gz
Algorithm Hash digest
SHA256 a13e782c14108adf90d8daf205f1ecbde25a05f5f22eb019db17248eb9b70624
MD5 ea3a672a2b8e03a6dfcc9fa74a1a5364
BLAKE2b-256 1ade7707c8c50da2f434cf37ddf91037f61cb59e357f313dfe008e3a752ab235

See more details on using hashes here.

File details

Details for the file idun_sdk-1.0.24-py3-none-any.whl.

File metadata

  • Download URL: idun_sdk-1.0.24-py3-none-any.whl
  • Upload date:
  • Size: 91.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for idun_sdk-1.0.24-py3-none-any.whl
Algorithm Hash digest
SHA256 43bdaa3a13e335ec6fa3cb8ac94ffdb5ff1d4a3307b40da083696ea92be6b183
MD5 c526f815a4ea7f336a8496cc1549838e
BLAKE2b-256 c051be14acb1fb05862b2aaa5eb8918f1ec7e3e5d140e79e267abac267ff5af1

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.26

2 files

1.0.25

2 files

This release

1.0.24 This release

2 files

1.0.23

2 files

1.0.16

1 file

1.0.15

1 file

1.0.14

1 file

1.0.13

1 file

1.0.12

1 file

1.0.11

1 file

1.0.10

1 file

1.0.9

1 file

1.0.8

1 file

1.0.7

1 file

1.0.6

1 file

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.1.38

2 files

0.1.37

2 files

0.1.36

2 files

0.1.35

2 files

0.1.34

2 files

0.1.33

2 files

0.1.32

2 files

0.1.31

2 files

0.1.30

2 files

0.1.29

2 files

0.1.28

2 files

0.1.27

2 files

0.1.26

2 files

0.1.25

2 files

0.1.24

2 files

0.1.23

2 files

0.1.22

2 files

0.1.21

2 files

0.1.20

2 files

0.1.19

2 files

0.1.18

2 files

0.1.17

2 files

0.1.16

2 files

0.1.15

2 files

0.1.14

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page