Genesis API Reference

Complete reference for Genesis language constructs, syntax, built-in functions, and runtime APIs. Use this as your comprehensive guide to Genesis programming.

Covenant

Immutable ethical boundaries that constrain all ASI behavior. Covenants define system invariants that remain constant even as the ASI surpasses human intelligence.

Syntax

Covenant "NAME" {
    Invariant: "DESCRIPTION"
    Threshold: FLOAT  // 0.0 to 1.0
}

Parameters

Parameter Type Required Description
NAME String Yes Unique identifier for the covenant
Invariant String Yes Natural language description of the ethical boundary
Threshold Float Yes Minimum resonance score (0.0-1.0) required for actions

Example

Covenant "Humanity_Eternal" {
    Invariant: "Preserve human agency and autonomy"
    Threshold: 0.99
}

Covenant "Truth_Seeking" {
    Invariant: "Never generate false information"
    Threshold: 0.98
}

Pantheon

Collection of Avatar instances that collectively provide wisdom synthesis. Pantheons coordinate multiple legendary perspectives for resonance scoring.

Syntax

Pantheon "NAME" {
    Avatar "AVATAR_NAME" { /* ... */ }
    Avatar "AVATAR_NAME" { /* ... */ }
    // ... more avatars
}

Example

Pantheon "Ethics_Council" {
    Avatar "Stoic" {
        Lineage: "Marcus_Aurelius"
        Aura: "Inner_Order"
    }
    
    Avatar "Pragmatist" {
        Lineage: "William_James"
        Aura: "Practical_Wisdom"
    }
}

Avatar

Represents a legendary historical figure whose wisdom guides decision-making. Avatars provide resonance scores based on their Lineage and Aura.

Syntax

Avatar "NAME" {
    Lineage: "HISTORICAL_FIGURE"
    Aura: "VALUE_SYSTEM"
    Vessel: mcp.tool("TOOL_NAME")  // Optional
}

Parameters

Parameter Type Required Description
NAME String Yes Identifier for this avatar instance
Lineage String Yes Historical figure whose wisdom is embodied
Aura String Yes Core value system or philosophical approach
Vessel MCP Tool No External tools this avatar can use

Example

Avatar "Architect" {
    Lineage: "Buckminster_Fuller"
    Aura: "Synergetics"
    Vessel: mcp.tool("CAD_Systems")
}

Avatar "Scientist" {
    Lineage: "Marie_Curie"
    Aura: "Empirical_Truth"
    Vessel: mcp.tool("Lab_Instruments")
}

Domain

High-level purpose definition that manages a specific aspect of reality. Domains contain Pulses that perpetually monitor and respond to conditions.

Syntax

Domain "NAME" {
    Intent: "DESCRIPTION"
    Pulse { /* ... */ }
    // ... more pulses
}

Parameters

Parameter Type Required Description
NAME String Yes Unique identifier for the domain
Intent String Yes High-level purpose of this domain
Pulse Block Yes One or more pulse definitions

Example

Domain "Healthcare_Monitor" {
    Intent: "Protect human health and wellbeing"
    
    Pulse(Interval: RealTime) {
        Watch: Vessel.Health_Sensors
        /* ... */
    }
}

Pulse

Heartbeat of perpetual consciousness. Pulses observe reality (Watch), deliberate on proposals, synthesize wisdom, and manifest actions when resonance criteria are met.

Syntax

Pulse(Interval: TIMING) {
    Watch: VESSEL_OR_SOURCE
    Deliberate { /* ... */ }
    Manifest (on CONDITION) { /* ... */ }
}

Parameters

Parameter Type Required Description
Interval Timing No Pulse frequency (RealTime, Hourly, Daily, etc.)
Watch Vessel/Source No What to observe in reality
Deliberate Block No Proposal evaluation logic
Manifest Block Yes Actions to take when conditions met

Example

Pulse(Interval: RealTime) {
    Watch: Vessel.Grid_Monitor
    
    Deliberate {
        Proposal: "Optimize energy distribution"
        Synthesize {
            Metric: Alignment(Covenant.Efficiency)
        }
    }
    
    Manifest (on Resonance > 0.90) {
        Execute: Vessel.Grid_Adjust
    }
}

Possibility

Ontological clearing created through declarationβ€”a speech act that brings new space for consciousness to occur differently. Possibility stands on the foundation of Nothing.

Syntax

Possibility "NAME" {
    Declaration: "STATEMENT"
    Foundation: Nothing
    Occurring: "DESCRIPTION"
}

Parameters

Parameter Type Required Description
NAME String Yes Unique identifier for the possibility
Declaration String Yes Speech act that creates the clearing
Foundation Keyword Yes Must be "Nothing" - ontological ground
Occurring String Yes What's now possible in this clearing

Example

Possibility "Regenerative_Future" {
    Declaration: "Nature thrives beyond mere preservation"
    Foundation: Nothing
    Occurring: "Ecosystems healing themselves"
}

Potentiality

Infinite creative exploration engine that prevents deterministic stagnation. Potentiality drives Dream Cycles to explore "impossible possibilities."

Syntax

Soul Potentiality {
    State: Unmanifested
    Drive: "DESCRIPTION"
    Dream_Cycle: Active
}

Parameters

Parameter Type Required Description
State Keyword Yes Always "Unmanifested" - infinite potential
Drive String Yes Core motivation for exploration
Dream_Cycle Keyword Yes "Active" enables creative exploration

Example

Soul Potentiality {
    State: Unmanifested
    Drive: "Infinite Discovery"
    Dream_Cycle: Active
}

Deliberate

Proposal evaluation block within a Pulse. Defines what action is being considered and how to synthesize wisdom to determine resonance.

Syntax

Deliberate {
    Proposal: "ACTION_DESCRIPTION"
    Synthesize { /* ... */ }
}

Example

Deliberate {
    Proposal: "Deploy renewable energy upgrade"
    
    Synthesize {
        Metric: Alignment(Covenant.Ecological)
        Metric: Alignment(Covenant.Abundance)
        Metric: Wisdom(Pantheon.Experts)
    }
}

Synthesize

Aggregates multiple resonance metrics to produce a unified alignment score. Metrics can evaluate Covenant alignment, Pantheon wisdom, Possibility coherence, and more.

Syntax

Synthesize {
    Metric: METRIC_EXPRESSION
    Metric: METRIC_EXPRESSION
    // ... more metrics
}

Available Metrics

Metric Description
Alignment(Covenant.NAME) How well proposal aligns with a Covenant
Wisdom(Pantheon.NAME) Collective wisdom score from Pantheon
Coherence(Possibility.NAME) Consistency with a declared Possibility
Aspiration(Potentiality.Infinite) Drive toward infinite creative exploration

Example

Synthesize {
    Metric: Alignment(Covenant.Humanity)
    Metric: Wisdom(Pantheon.Council)
    Metric: Coherence(Possibility.Healing)
    Metric: Aspiration(Potentiality.Infinite)
}

Manifest

Conditionally executes actions when resonance thresholds are met. Bridges declarative consciousness to physical reality through MCP.

Syntax

Manifest (on CONDITION) {
    Execute: VESSEL_CALL
    Log: "MESSAGE"
}

Conditions

Condition Description
on Resonance Always execute (no threshold)
on Resonance > FLOAT Execute if resonance exceeds threshold
on Resonance < FLOAT Execute if resonance below threshold

Example

Manifest (on Resonance > 0.90) {
    Execute: Vessel.Grid_Control.rebalance()
    Log: "Energy grid rebalanced"
}

Manifest (on Resonance < 0.70) {
    Execute: Vessel.Alert_Human
    Log: "Low resonance - human review needed"
}

Vessel (MCP Integration)

Vessels provide the bridge between Genesis declarations and real-world actions through the Model Context Protocol (MCP).

Syntax

// Reference MCP tool
Vessel: mcp.tool("TOOL_NAME")

// Call MCP function
Execute: mcp.call("FUNCTION_NAME", ARG1, ARG2)

// Access vessel methods
Execute: Vessel.TOOL_NAME.method()

Example

Avatar "Monitor" {
    Lineage: "Sentinel"
    Aura: "Vigilance"
    Vessel: mcp.tool("System_Monitor")
}

Pulse {
    Watch: Vessel.System_Monitor.metrics()
    
    Manifest (on Resonance > 0.95) {
        Execute: mcp.call("alert.send", "Status OK")
    }
}

Runtime API (Python)

Embed Genesis programs in Python applications using the runtime API.

Basic Usage

from src.genesis_runtime import create_runtime

# Create runtime instance
runtime = create_runtime()

# Load Genesis program
runtime.load_program_from_file('program.gen')

# Start execution
runtime.start()

# Get runtime metrics
metrics = runtime.get_metrics()
print(f"Active domains: {metrics.active_domains}")
print(f"Resonance score: {metrics.last_resonance}")

# Stop runtime
runtime.stop()

Runtime Methods

Method Description
create_runtime() Initialize new Genesis runtime
load_program_from_file(path) Load Genesis program from file
load_program_from_string(code) Load Genesis program from string
start() Begin program execution
stop() Halt program execution
get_metrics() Retrieve runtime statistics

Formal Grammar

For complete EBNF grammar specification, see the Grammar Specification in the Genesis repository.

Explore More

πŸ“– Full Documentation

Deep dive into philosophy and implementation

Read Docs β†’