Procedural Game Engine powered by IntentShield and LogicShield (BSL 1.1)
Project description
# 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
LogicShieldbackend forces the LLM to output perfect JSON. - Action Gatekeeper: A deeply integrated, ultra-fast
IntentShieldsystem intercepts the AI's intended actions. - Local First: Runs purely on your local graphics card natively via
Ollamaout of the box. No internet or API keys required.
Quick Start (Zero Config)
Sovereign Engine connects directly to Local Ollama by default. If Ollama is currently running on your machine, just initialize the engine.
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", "Shield"]},
recent_history=["You enter a dark cavern and hear a low growl."],
player_action="I walk forward with my shield raised."
)
print(scene)
Changing the Local Ollama Model
If you want to use a different model installed on your machine (like mistral, gemma, or deepseek), you simply pass the ollama_model parameter directly into the engine:
# Tell the engine exactly which local model to hit!
engine = ProceduralDialogueEngine(ollama_model="mistral:latest")
# Or an uncensored narrative model
engine = ProceduralDialogueEngine(ollama_model="hf.co/HauhauCS/Qwen3.5-27B-Uncensored")
Customizing Rules (LogicShield) & Actions (IntentShield)
You can easily expand the engine to enforce your own custom mechanics mathematically, or allow new verbs for the AI to take (like CRAFT or STEAL).
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
)
Cloud API Fallbacks
If you don't want to run locally via Ollama, you can fallback to the OpenRouter enterprise cloud by passing your key string directly:
# The Engine immediately routes to the cloud if a key is detected
engine = ProceduralDialogueEngine(api_key="sk-or-your-developer-key")
License
This project is licensed under the Business Source License 1.1 (BSL 1.1). For production or commercial use, you must obtain a separate commercial license from SovereignShield.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sovereign_engine-1.0.6.tar.gz.
File metadata
- Download URL: sovereign_engine-1.0.6.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
916fbe4cc704e0d2380f76f258c179346f79fb92d6ee4e507a4987fce8346849
|
|
| MD5 |
58558c63e6b25eb8f8651a5515e2936b
|
|
| BLAKE2b-256 |
28331b67f18d8d71857276a265c369bcb995611756d7074221c47a576911c6db
|
File details
Details for the file sovereign_engine-1.0.6-py3-none-any.whl.
File metadata
- Download URL: sovereign_engine-1.0.6-py3-none-any.whl
- Upload date:
- Size: 14.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba1333acb4d6ec7196c8499d51b3d45eb218df84b2c58b0e301a5ec336b16429
|
|
| MD5 |
1af99d6db08d2487853331b828f93b80
|
|
| BLAKE2b-256 |
ac79afbaed614f23dbc7f838d54e279cc1444100c268f2f89224ffecea0e01b6
|