Module: core/osint/company_intel.py
Last Updated: 2026-02-27
Use these prompts directly in the agent:
Analyze company Siemens AG
analysiere firma BMW AG vorstand und struktur
Research company Apple Inc ownership and risks
Investigate company NVIDIA Corporation country:US lang:en
Notes:
country:, region:, lang:.The Company Intelligence module builds a company-focused OSINT report from plain-language queries (without requiring explicit operators like domain: or site:).
It performs four category searches, deduplicates sources, extracts key signals (leadership, structure, risk), and enriches the likely company domain through DomainIntelligence.
Use this module when a query is clearly company-centric, for example:
Analyze company Siemens AGanalysiere firma BMW AG vorstand und strukturCompany Apple Inc ownershipThe module is integrated into the agent flow as follows:
ToolsFlow.check_company_osint_intent(query) calls CompanyIntelligence.is_company_intent(query).OSINTFlow.handle_company_query(query) is used.CompanyIntelligence.analyze_company(query) builds the structured intelligence payload.CompanyIntelligence.format_report(data) renders a human-readable report.Relevant files:
core/agent/tools_flow.pycore/agent/osint_flow.pycore/osint/company_intel.pyCompanyIntelligence(config: Dict | None = None)Initializes the module with optional application config.
Expected config keys:
search.region (default: de-de)search.ranking_profile (fallback if OSINT profile is missing)osint.context_max_results (clamped to 5..10, default effective value: 6)osint.safesearch (default: strict)osint.ranking_profile (default: osint)is_company_intent(query: str) -> boolDetects whether a query likely targets company intelligence.
Current heuristics:
analyze company ..., analysiere firma ...)AG, GmbH, Inc, LLC, …)company + board/ownership/holding/...)extract_company_name(query: str) -> strExtracts the company name from natural language by stripping:
the, die, das, den)company, firma, unternehmen)country:, region:, lang:)board, ownership, struktur, risks, …)Returns an empty string if no usable name remains.
analyze_company(query: str) -> DictBuilds structured intelligence from search and domain analysis.
Processing steps:
profile, leadership, structure, risk)DomainIntelligenceReturns a dictionary payload (see Output Schema).
format_report(data: Dict) -> strFormats analysis output as a readable report with:
If analysis contains an error, returns a warning string.
The module generates four fixed discovery queries using the extracted company name:
"<company>" official website company profile"<company>" CEO OR CFO OR Vorstand OR Geschäftsführung"<company>" subsidiaries OR holding OR Tochtergesellschaften"<company>" lawsuit OR fine OR sanction OR complianceEach query is executed through search_with_fallback(...).
analyze_company() returns this structure:
{
"query": "original user query",
"company_name": "Siemens AG",
"official_domain": "siemens.com",
"domains": ["reuters.com", "siemens.com"],
"leadership_signals": ["..."],
"structure_signals": ["..."],
"risk_signals": ["..."],
"sources_by_category": {
"profile": [{ "category": "profile", "title": "...", "url": "...", "snippet": "..." }],
"leadership": [],
"structure": [],
"risk": []
},
"source_count": 4,
"domain_intelligence": {}
}
Error case:
{ "error": "No company name could be extracted from query." }
Candidate domains are extracted from all result URLs and scored:
-2 if domain matches known generic platforms (linkedin.com, wikipedia.org, reuters.com, etc.)+4 if normalized company name matches normalized domain base+1 if domain base length is at least 4Best-scoring domain is selected as official_domain.
Signals are extracted from combined title + snippet text and deduplicated case-insensitively.
CEO, CFO, CTO, COO, Chairman/Chairwoman, Vorstand, Geschäftsführer(in)subsidiary, holding, group, tochter, beteiligung, ownershipkartell, geldstrafe, sanktion, ermittlung, …)from core.osint.company_intel import CompanyIntelligence
intel = CompanyIntelligence(
config={
"search": {"region": "de-de", "ranking_profile": "osint"},
"osint": {"context_max_results": 6, "safesearch": "strict"}
}
)
analysis = intel.analyze_company("Analyze company Siemens AG board and structure")
report = intel.format_report(analysis)
print(analysis["official_domain"])
print(report)
Current tests are in:
tests/osint/test_company_intel.pyRun only this test file:
pytest tests/osint/test_company_intel.py -q
Covered behaviors: