ExigoTech-Beno rewrites the backend in Python and wires in AustLII for Australian legal search
A single 1,800-line commit replaces the TypeScript backend with a Python FastAPI service targeting Azure AI Foundry, and ships two Semantic Kernel plugins covering roughly 90 AustLII database paths across Commonwealth and state/territory courts. The Azure plumbing is all-in; the AU legal data is portable.
The commit (10b1c82e) adds a parallel backend-agent/ Python service built on FastAPI and Semantic Kernel. The upstream TypeScript backend stays untouched - this is an additive implementation, presumably the start of a planned cutover. The Azure stack is fully specified: AzureChatCompletion for the model layer, asyncpg against Azure PostgreSQL Flexible Server, Azure Blob Storage replacing Cloudflare R2, and Entra External ID handling JWT validation in backend-agent/app/auth/middleware.py. The agent.yaml declares two Foundry protocols: responses for OpenAI-compatible streaming chat and Teams, invocations for batch tabular extraction.
The interesting part for anyone not targeting Azure Foundry is the plugin layer. backend-agent/app/plugins/austlii.py builds a AUSTLII_DATABASES registry of ~90 SINO mask paths - HCA, FCA, FCAFC, AAT, FWC, OAIC, NCAT, VCAT, QCAT, plus consol_act, consol_reg, and bill paths per jurisdiction - and exposes four Semantic Kernel functions: search_austlii, get_austlii_document, browse_legislation, lookup_act. A companion australian_legislation.py adds the 13 Australian Privacy Principles with a compliance checker. That's roughly 700 lines of AU-legal reference data and query construction.
Before pulling anything, check three things. The AustLII plugin uses a hard-coded Chrome User-Agent to bypass a 403 - fragile, and the code itself notes it's a TOS grey area for bulk/commercial use. The AzureChatCompletion(... ad_token_provider=None) call in chat.py passes None for the AAD token provider, which disables token acquisition entirely and will either fall back to an API key or fail; almost certainly a bug. And there are no tests, no migrations, and pydantic-settings silently defaults every secret to "" on missing env vars.
The austlii.py and australian_legislation.py files are the portable piece. The AUSTLII_DATABASES constants and SINO query structure work fine outside Azure and outside Semantic Kernel with minimal adaptation. Everything else in this commit is Azure-Foundry-specific and only relevant if that's also your deployment target.
Spotted something wrong? Or know the PR text has fresher detail than the writeup above?