🚀 -> Project on GitHub <-

Company Intelligence Module - Developer Documentation

Module: core/osint/company_intel.py
Last Updated: 2026-02-27

LLM Agent Commands (Quick Start)

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:

Overview

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.

Main Use Case

Use this module when a query is clearly company-centric, for example:

Integration Flow

The module is integrated into the agent flow as follows:

  1. ToolsFlow.check_company_osint_intent(query) calls CompanyIntelligence.is_company_intent(query).
  2. If intent is detected and no explicit OSINT operators are present, OSINTFlow.handle_company_query(query) is used.
  3. CompanyIntelligence.analyze_company(query) builds the structured intelligence payload.
  4. CompanyIntelligence.format_report(data) renders a human-readable report.
  5. The likely official domain is persisted in memory for follow-up queries.

Relevant files:

Public API

CompanyIntelligence(config: Dict | None = None)

Initializes the module with optional application config.

Expected config keys:

is_company_intent(query: str) -> bool

Detects whether a query likely targets company intelligence.

Current heuristics:

extract_company_name(query: str) -> str

Extracts the company name from natural language by stripping:

Returns an empty string if no usable name remains.

analyze_company(query: str) -> Dict

Builds structured intelligence from search and domain analysis.

Processing steps:

  1. Extract company name
  2. Resolve search region from inline operators and defaults
  3. Run category queries (profile, leadership, structure, risk)
  4. Deduplicate URLs across categories
  5. Extract domains and pick likely official domain
  6. Run domain enrichment via DomainIntelligence
  7. Extract signal snippets for leadership, structure, and risk

Returns a dictionary payload (see Output Schema).

format_report(data: Dict) -> str

Formats analysis output as a readable report with:

If analysis contains an error, returns a warning string.

Discovery Queries

The module generates four fixed discovery queries using the extracted company name:

Each query is executed through search_with_fallback(...).

Output Schema

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." }

Domain Selection Logic

Candidate domains are extracted from all result URLs and scored:

Best-scoring domain is selected as official_domain.

Signal Extraction

Signals are extracted from combined title + snippet text and deduplicated case-insensitively.

Example Usage

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)

Testing

Current tests are in:

Run only this test file:

pytest tests/osint/test_company_intel.py -q

Covered behaviors:

Limitations

Security and Compliance Notes