babylon.models.entities.organization

Organization entity models for the Babylon simulation (Feature 031).

Defines the Organization base class and four frozen Pydantic subtypes: StateApparatus, Business, PoliticalFaction, CivilSocietyOrg. Also defines IntelMethodology (supporting model) and KeyFigure (separate graph node).

The OrganizationType discriminated union dispatches on org_type for automatic subtype selection during deserialization.

Module Attributes

OrganizationType

Discriminated union dispatching on org_type to the correct subtype.

Classes

Business(**data)

Business organization (Feature 031).

CivilSocietyOrg(**data)

Civil society organization (Feature 031).

IntelMethodology(**data)

Intelligence methodology capabilities (Sparrow-grounded).

KeyFigure(**data)

Individual node within organizational topology (Feature 031).

Organization(**data)

Base organization entity for the Babylon simulation.

PoliticalFaction(**data)

Political faction organization (Feature 031).

StateApparatus(**data)

State apparatus organization (Feature 031).

class babylon.models.entities.organization.IntelMethodology(**data)[source]

Bases: BaseModel

Intelligence methodology capabilities (Sparrow-grounded).

Defines which social network analysis techniques an intelligence agency can employ and the maximum fraction of true topology observable.

Parameters:
  • centrality_analysis (bool)

  • equivalence_analysis (bool)

  • template_matching (bool)

  • temporal_analysis (bool)

  • observation_ceiling (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

centrality_analysis

Can identify hub nodes and bridges.

equivalence_analysis

Can find structurally equivalent positions.

template_matching

Can match against known org templates.

temporal_analysis

Can detect activation pattern changes over time.

observation_ceiling

Max fraction of true topology observable [0, 1].

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

centrality_analysis: bool
equivalence_analysis: bool
template_matching: bool
temporal_analysis: bool
observation_ceiling: Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=quantize)]
classmethod local_pd(defines=None)[source]

Local PD preset: centrality only, low ceiling.

Parameters:

defines (OrganizationDefines | None) – Optional OrganizationDefines for tunable ceiling value.

Return type:

IntelMethodology

classmethod fusion_center(defines=None)[source]

Fusion Center preset: centrality + temporal, medium ceiling.

Parameters:

defines (OrganizationDefines | None) – Optional OrganizationDefines for tunable ceiling value.

Return type:

IntelMethodology

classmethod fbi(defines=None)[source]

FBI preset: all capabilities, FBI-level ceiling.

Parameters:

defines (OrganizationDefines | None) – Optional OrganizationDefines for tunable ceiling value.

Return type:

IntelMethodology

class babylon.models.entities.organization.Organization(**data)[source]

Bases: BaseModel

Base organization entity for the Babylon simulation.

All four subtypes (StateApparatus, Business, PoliticalFaction, CivilSocietyOrg) inherit these 15 fields. Frozen and immutable.

Parameters:
  • id (str)

  • name (str)

  • org_type (OrgType)

  • class_character (ClassCharacter)

  • cohesion (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • cadre_level (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • budget (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Non-negative economic value (wealth, wages, rent, GDP)', metadata=[Ge(ge=0.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • legal_standing (LegalStanding)

  • consciousness_tendency (ConsciousnessTendency)

  • territory_ids (list[str])

  • headquarters_id (str | None)

  • heat (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • is_institution (bool)

  • institutional_persistence (float | None)

  • member_node_ids (list[str])

id

Unique organization identifier.

name

Human-readable name.

org_type

Discriminator for subtype dispatch.

class_character

Which class this org serves.

cohesion

Internal unity and coordination [0, 1].

cadre_level

Leadership quality [0, 1].

budget

Available resources [0, inf).

legal_standing

Legal status of the organization.

consciousness_tendency

Ideological tendency pushed on communities.

territory_ids

Territories where org operates.

headquarters_id

Primary location (must be in territory_ids).

heat

State attention level [0, 1].

is_institution

Has crystallized into institution.

institutional_persistence

Resistance to dissolution (institutions only).

member_node_ids

Individual key figures and cadre.

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

id: str
name: str
org_type: OrgType
class_character: ClassCharacter
cohesion: Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=quantize)]
cadre_level: Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=quantize)]
budget: Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Non-negative economic value (wealth, wages, rent, GDP)', metadata=[Ge(ge=0.0)]), AfterValidator(func=quantize)]
legal_standing: LegalStanding
consciousness_tendency: ConsciousnessTendency
territory_ids: list[str]
headquarters_id: str | None
heat: Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=quantize)]
is_institution: bool
institutional_persistence: float | None
member_node_ids: list[str]
class babylon.models.entities.organization.StateApparatus(**data)[source]

Bases: Organization

State apparatus organization (Feature 031).

Wields state violence and surveillance. Default legal standing is SOVEREIGN.

Parameters:
  • id (str)

  • name (str)

  • org_type (Literal[OrgType.STATE_APPARATUS])

  • class_character (ClassCharacter)

  • cohesion (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • cadre_level (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • budget (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Non-negative economic value (wealth, wages, rent, GDP)', metadata=[Ge(ge=0.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • legal_standing (LegalStanding)

  • consciousness_tendency (ConsciousnessTendency)

  • territory_ids (list[str])

  • headquarters_id (str | None)

  • heat (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • is_institution (bool)

  • institutional_persistence (float | None)

  • member_node_ids (list[str])

  • jurisdiction (JurisdictionLevel)

  • violence_capacity (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • surveillance_capacity (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • legal_authority (list[str])

  • intel_methodology (IntelMethodology)

  • factional_alignment (StateFaction)

jurisdiction

Scope of authority.

violence_capacity

Capacity for coercive force [0, 1].

surveillance_capacity

Capacity for surveillance [0, 1].

legal_authority

Specific authorities wielded.

intel_methodology

Intelligence capabilities (Sparrow-grounded).

org_type: Literal[OrgType.STATE_APPARATUS]
legal_standing: LegalStanding
jurisdiction: JurisdictionLevel
violence_capacity: Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=quantize)]
surveillance_capacity: Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=quantize)]
legal_authority: list[str]
intel_methodology: IntelMethodology
factional_alignment: StateFaction
model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class babylon.models.entities.organization.Business(**data)[source]

Bases: Organization

Business organization (Feature 031).

Accumulates capital and employs labor.

Parameters:
  • id (str)

  • name (str)

  • org_type (Literal[OrgType.BUSINESS])

  • class_character (ClassCharacter)

  • cohesion (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • cadre_level (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • budget (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Non-negative economic value (wealth, wages, rent, GDP)', metadata=[Ge(ge=0.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • legal_standing (LegalStanding)

  • consciousness_tendency (ConsciousnessTendency)

  • territory_ids (list[str])

  • headquarters_id (str | None)

  • heat (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • is_institution (bool)

  • institutional_persistence (float | None)

  • member_node_ids (list[str])

  • sector (str)

  • naics_2digit (str | None)

  • employment_count (int)

  • surplus_extraction_rate (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Formula parameter in range [0, 1]', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • revenue (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Non-negative economic value (wealth, wages, rent, GDP)', metadata=[Ge(ge=0.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • constant_capital (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Non-negative economic value (wealth, wages, rent, GDP)', metadata=[Ge(ge=0.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • variable_capital (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Non-negative economic value (wealth, wages, rent, GDP)', metadata=[Ge(ge=0.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • surplus_value (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Non-negative economic value (wealth, wages, rent, GDP)', metadata=[Ge(ge=0.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

sector

NAICS sector description.

employment_count

Number of employees.

surplus_extraction_rate

Rate of surplus value extraction [0, 1].

revenue

Annual revenue [0, inf).

org_type: Literal[OrgType.BUSINESS]
sector: str
naics_2digit: str | None
employment_count: int
surplus_extraction_rate: Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Formula parameter in range [0, 1]', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=quantize)]
revenue: Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Non-negative economic value (wealth, wages, rent, GDP)', metadata=[Ge(ge=0.0)]), AfterValidator(func=quantize)]
constant_capital: Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Non-negative economic value (wealth, wages, rent, GDP)', metadata=[Ge(ge=0.0)]), AfterValidator(func=quantize)]
variable_capital: Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Non-negative economic value (wealth, wages, rent, GDP)', metadata=[Ge(ge=0.0)]), AfterValidator(func=quantize)]
surplus_value: Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Non-negative economic value (wealth, wages, rent, GDP)', metadata=[Ge(ge=0.0)]), AfterValidator(func=quantize)]
model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class babylon.models.entities.organization.PoliticalFaction(**data)[source]

Bases: Organization

Political faction organization (Feature 031).

Contests political power. The player’s faction is marked with is_player.

Parameters:
  • id (str)

  • name (str)

  • org_type (Literal[OrgType.POLITICAL_FACTION])

  • class_character (ClassCharacter)

  • cohesion (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • cadre_level (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • budget (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Non-negative economic value (wealth, wages, rent, GDP)', metadata=[Ge(ge=0.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • legal_standing (LegalStanding)

  • consciousness_tendency (ConsciousnessTendency)

  • territory_ids (list[str])

  • headquarters_id (str | None)

  • heat (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • is_institution (bool)

  • institutional_persistence (float | None)

  • member_node_ids (list[str])

  • ideology (str)

  • is_player (bool)

  • relationship_to_player (str)

ideology

Ideological label (e.g., “Marxism-Leninism”).

is_player

Whether this is the player’s faction.

relationship_to_player

Relationship state.

org_type: Literal[OrgType.POLITICAL_FACTION]
ideology: str
is_player: bool
relationship_to_player: str
model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class babylon.models.entities.organization.CivilSocietyOrg(**data)[source]

Bases: Organization

Civil society organization (Feature 031).

Non-state, non-business collective providing community services. legitimacy doubles as the credibility factor in the consciousness effect formula.

Parameters:
  • id (str)

  • name (str)

  • org_type (Literal[OrgType.CIVIL_SOCIETY])

  • class_character (ClassCharacter)

  • cohesion (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • cadre_level (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • budget (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Non-negative economic value (wealth, wages, rent, GDP)', metadata=[Ge(ge=0.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • legal_standing (LegalStanding)

  • consciousness_tendency (ConsciousnessTendency)

  • territory_ids (list[str])

  • headquarters_id (str | None)

  • heat (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • is_institution (bool)

  • institutional_persistence (float | None)

  • member_node_ids (list[str])

  • service_type (ServiceType)

  • legitimacy (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

service_type

Domain of service provision.

legitimacy

Community trust/credibility [0, 1].

org_type: Literal[OrgType.CIVIL_SOCIETY]
service_type: ServiceType
legitimacy: Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=quantize)]
model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

babylon.models.entities.organization.OrganizationType

Discriminated union dispatching on org_type to the correct subtype.

alias of Annotated[StateApparatus | Business | PoliticalFaction | CivilSocietyOrg, FieldInfo(annotation=NoneType, required=True, discriminator=’org_type’)]

class babylon.models.entities.organization.KeyFigure(**data)[source]

Bases: BaseModel

Individual node within organizational topology (Feature 031).

Stored as a separate graph node (_node_type="key_figure"). COMMAND edges connect KeyFigure nodes within the same organization.

Parameters:
  • id (str)

  • name (str)

  • organization_id (str)

  • role (str)

  • structural_importance (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])

  • is_singleton (bool)

id

Unique key figure identifier.

name

Name.

organization_id

Parent organization.

role

Position title/function.

structural_importance

Topological criticality [0, 1].

is_singleton

No structural equivalent (Sparrow).

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

id: str
name: str
organization_id: str
role: str
structural_importance: Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=quantize)]
is_singleton: bool