Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sovereign Engine

The Zero-Trust Procedural Game Engine. Built securely on the IntentShield and LogicShield architectures.

Sovereign Engine allows game developers to seamlessly integrate LLMs (Large Language Models) into their games to generate procedural dialogue, dynamic quests, and complex NPC interactions while absolutely guaranteeing that the AI's output mathematically adheres to your game's rules.

Installation

pip install sovereign-engine

Features

  • Deterministic Validation: The LogicShield backend forces the LLM to output perfect JSON.
  • Action Gatekeeper: A deeply integrated, ultra-fast IntentShield system intercepts the AI's intended actions.
  • Local First: Runs purely on your local graphics card natively via Ollama out of the box.
  • B2B Cloud Scaling: Seamlessly route thousands of requests per second to the SovereignShield enterprise Cloud API.

Quick Start (Local Setup)

Sovereign Engine connects directly to Local Ollama by default.

from sovereign_engine.engine import ProceduralDialogueEngine

# Defaults to localhost:11434 with llama3.1:8b
engine = ProceduralDialogueEngine()

scene = engine.generate_node(
    player_state={"level": 5, "inventory": ["Iron Sword"]},
    recent_history=["You enter a dark cavern and hear a low growl."],
    player_action="I walk forward."
)

Changing the Local Ollama Model

If you want to use a different model installed on your machine:

engine = ProceduralDialogueEngine(ollama_model="mistral:latest")

Connecting to SovereignShield SaaS (Cloud Routing)

If you don't want to run the engine locally on player hardware, you can instantly proxy all logic up to the centralized enterprise API layer:

engine = ProceduralDialogueEngine(
    cloud_proxy_url="https://engine-api-467902938909.us-central1.run.app/v1/engine/generate",
    api_key="your-commercial-license-key"
)

Customizing Rules (LogicShield) & Actions (IntentShield)

Expand the engines mathematical mechanics to fit your custom game:

from sovereign_engine.logicshield.rules import Rule

my_rules = [
    Rule.less_than("gold_dropped", "max_loot")
]

engine = ProceduralDialogueEngine(
    ollama_model="llama3.1:8b",
    custom_actions=["STEAL", "CRAFT", "PERSUADE"], 
    custom_rules=my_rules
)

License

Released under the Business Source License 1.1 (BSL 1.1). Non-production and personal use is completely free.
For commercial licensing or production API integration, contact: contact@sovereign-shield.net

Releases

Packages

Contributors

Languages