Skip to content

feat: DE/EU locale support with German data source connectors#3

Open
10fra wants to merge 2 commits intoShinMegamiBoson:mainfrom
10fra:main
Open

feat: DE/EU locale support with German data source connectors#3
10fra wants to merge 2 commits intoShinMegamiBoson:mainfrom
10fra:main

Conversation

@10fra
Copy link

@10fra 10fra commented Feb 20, 2026

Summary

Adds --locale de flag that switches the agent to German/EU data sources, entity resolution rules, and political context. US remains the default. No new dependencies.

Four free-tier connectors:

  • Lobbyregister Bundestag — lobbying org search via public REST API (expenditure, clients, fields of interest)
  • abgeordnetenwatch.de — MP profiles, roll-call votes, side income (Nebeneinkünfte) via CC0 API v2
  • OffeneRegister — ~5.1M German company registrations from bulk JSONL (CC0)
  • EU Transparency Register — EU-level lobbying orgs from bulk CSV/XML download

German entity normalization layer handles umlaut folding (ä↔ae, ß↔ss), legal form extraction (GmbH, KGaA, e.V., etc.), title stripping (Dr., Prof., von/zu), and court alias resolution. Composite entity matcher scores register-number matches at 1.0, normalized-name+form+city at 0.85, officer-overlap+city at 0.6.

System prompt gains two locale-gated sections: German entity resolution guidance (HRB numbering, umlaut matching, title stripping) and political/legal context (Bundestag structure, key terminology like Karenzzeit/Drehtür/Nebeneinkünfte, available vs restricted data sources).

Changes

  • agent/config.pylocale, lobbyregister_api_key fields
  • agent/__main__.py--locale CLI arg
  • agent/connectors/ — new package: shared HTTP helper + 4 connectors
  • agent/normalizers/ — new package: german.py (name/court/legal form normalization), entity_resolver.py (composite matching)
  • agent/tool_defs.py — 4 DE tool schemas, locale param on get_tool_definitions()
  • agent/engine.py — dispatch branches for DE tools, locale threading
  • agent/tools.py — connector wrappers + bulk data file finder
  • agent/prompts.pyDE_ENTITY_RESOLUTION_SECTION, DE_CONTEXT_SECTION
  • agent/builder.py — passes locale/api_key to WorkspaceTools

Test plan

  • python3 -m agent --locale de --task "Search the Lobbyregister for Deutsche Bank" exercises full chain
  • Existing test suite passes (105/105 engine/tool/defs tests)
  • --locale us (default) exposes no DE tools
  • German normalizer: Müller GmbH & Co. KGmueller
  • Entity resolver: exact register match → 1.0, name+form+city → 0.85

- Add --locale flag (us|de) to CLI and AgentConfig
- Create agent/connectors/ package with shared HTTP helper
- Add Lobbyregister Bundestag API connector
- Add abgeordnetenwatch.de API v2 connector
- Add OffeneRegister bulk JSONL search connector
- Add EU Transparency Register bulk CSV/XML connector
- Create agent/normalizers/ with German entity normalization
  (umlauts, legal forms, titles, courts) and composite entity resolver
- Wire 4 DE-locale tools into tool_defs, engine dispatch, and WorkspaceTools
- Add DE prompt localization (entity resolution + political context sections)
feat: DE/EU locale support with German data source connectors
@10fra
Copy link
Author

10fra commented Feb 20, 2026

Vibe coded mostly. Careful. I've tested and run it myself on a couple of tasks and it works but minimal code review from me. Should have no impact on US locale. Just close if not wanted. I'll keep working on my fork anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant