Author: Ghassan Alhamoud
AI-powered insolvency intelligence for Berlin. Monitors official insolvency filings, extracts structured facts, scores investment opportunities, and produces a ranked weekly newsletter — all through a typed MCP API.
Berlin sees 60–180 actionable corporate insolvencies per year. Investors, turnaround professionals, and analysts currently sift through raw court notices manually. BIRADAR automates the pipeline: scrape, extract, enrich, score, review, and export — with deterministic guardrails, full audit trails, and fail-closed safety.
- Scrapes the official Berlin insolvency portal with JSF session management
- Extracts structured facts from raw notices via a provider-neutral OpenAI-compatible LLM adapter
- Enriches candidates with registry-style public-source adapters
- Scores opportunities deterministically across 5 weighted dimensions (1–5 scale)
- Reviews for legal, compliance, and evidence risks with self-correcting retry logic
- Exports ranked Markdown newsletter drafts with audit trails and disclaimers
git clone https://github.com/ghassan-ai-projects/berlin-insolvency-radar.git
cd berlin-insolvency-radar
uv sync --extra dev
cp .env.example .env
# Edit .env with your BIRADAR_LLM_API_KEY or DEEPSEEK_API_KEYmake check # pre-commit, format, lint, typecheck, unit + acceptance + e2e testsNo .env or API key needed — tests use fixtures and stubs exclusively.
A production run scrapes the live official Berlin insolvency portal
(neu.insolvenzbekanntmachungen.de), calls a live OpenAI-compatible model
backend for fact extraction and risk review, hits live enrichment sources
(Bundesanzeiger, GitHub, company websites, North Data, Wikidata), and persists
everything to data/radar.duckdb.
cp .env.example .env
# Set BIRADAR_LLM_API_KEY=sk-... and BIRADAR_LLM_MODEL=... in .env
# Or keep using the backward-compatible DEEPSEEK_* variables
# Verify config/sources.yaml has official_insolvency_berlin.enabled: true
uv sync --extra dev# Scrape the last 7 days, extract, enrich, score, review, export
uv run biradar pipeline-run \
--start-date 2026-06-09 \
--end-date 2026-06-16This connects to the live portal and the live DeepSeek API. It produces:
data/radar.duckdb— persisted state with audit traildata/exports/issue_draft_*.md— ranked Markdown newsletterdata/exports/issue_data_*.json— structured JSON packagedata/checkpoints.sqlite— LangGraph checkpoint for resume
uv run biradar serve # stdio MCP server with full tool catalogThese commands use fixtures and stubs — no .env, no API key, no network:
# Deterministic pipeline validation (fixture HTML + stub extractor/reviewer/enricher)
uv run biradar pipeline-check
# Individual test tiers
make test # unit tests
make test-acceptance # acceptance tests
make test-e2e # e2e tests (non-live only)pipeline-check runs the full workflow against a temporary DuckDB using fixture
data and deterministic stubs, then verifies database counts. It never touches
the live portal or any external API.
- Product Overview — What it is, who it's for
- Getting Started — Setup and first pipeline run
- How It Works — Pipeline flow and data lifecycle
- Architecture — 6-layer design and key decisions
- MCP API — Tool catalog and result envelope contract
- Configuration — YAML config and environment variables
- Scoring Model — Weighted 5-dimension formula
- Data Sources — Official portal and enrichment sources
- Legal & Compliance — GDPR, press law, corporate-only filtering
- Testing Standards — Test tiers and coverage targets
- Security Model — Threat model and hardening measures
MIT was chosen because the core value is the data pipeline and intelligence output, not the code. The project benefits from community contributions to scrapers, agents, and export formats.
Pre-release development with a production-oriented local workflow. The repository includes full local validation, a live portal path, and export-only workflow execution without external publishing.