Domain-agnostic energy-based world model backbone with BYOC domain overlays
Project description
RealmForge
Build worlds, not one-off pipelines.
RealmForge is for teams who want to simulate decisions over time without rewriting infrastructure every time they switch realms. You bring the domain logic; RealmForge gives you a reusable backbone for state, actions, plausibility constraints, and rollouts.
In plain English:
- If you can describe your domain as "things changing over time"
- And you want to run "what if we do X instead of Y?"
- RealmForge helps you turn that into repeatable simulations.
Why build on RealmForge?
Most simulation projects start fast and then get messy:
- domain code gets tightly coupled to model code
- experiments become hard to reproduce
- every new use-case needs custom plumbing
RealmForge keeps those concerns separated:
- a shared backbone in
app/wm_app/ - domain overlays in
realms/ - repeatable configs and quality gates for CI/CD
So your clinical, finance, logistics, or policy teams can all use the same engine with different "Realms."
Naming and concepts
- RealmForge = the framework/repo
- Realm = a domain-specific scaffold (example: HealthRealm, FinanceRealm)
- World = the environment, entities, rules, and dynamics
- Campaign = a goal-driven journey/problem in that world
- Scenario = a concrete setup or counterfactual in a campaign
- Timeline / Run = one sampled rollout of what could happen
Project structure
app/wm_app/shared backbone (encoding, transition, energy, rollout interfaces)realms/realm overlays (schemas, mappings, concepts, actions)configs/backbone/default backbone configuration.github/CI/CD workflows, templates, and governance
Quick start (simple)
python3 -m venv .venv
source .venv/bin/activate
pip install -e .[dev]
realm --build
realm --start
Quick start (developer workflow)
pre-commit install
pre-commit run --all-files
make ci
pytest -q
Examples
Start with the data-free hello world:
uv run python examples/hello-world/run.py
Or run a trivial real-world domain example (inventory planning):
uv run python examples/supply-chain-mini/run.py
See:
examples/hello-world/README.mdexamples/supply-chain-mini/README.md
Create a new Realm (boilerplate)
cp -R realms/_realm_template realms/<your_realm>
Then edit:
realms/<your_realm>/configs/domain.yamlrealms/<your_realm>/mappings/schema.mdrealms/<your_realm>/pipelines/README.mdrealms/<your_realm>/concepts/seed_concepts.yaml
Load merged config in Python:
from app.wm_app.core.config_loader import load_domain_config
cfg = load_domain_config("realms/<your_realm>/configs/domain.yaml")
Minimal realm modeling checklist
- define observed variables (
o_t) - define latent state (
z_t) or proxies - define actions (
a_t) - define outcomes (
y_t) - define plausibility factors/constraints (
E_i) - train: encoder -> JEPA -> transition -> energy -> outcomes
- simulate: campaign -> scenario -> timeline/run sampling
Safety
Clinical realms are for retrospective research and medical education simulation only. Do not present outputs as treatment recommendations.
License
MIT — see LICENSE.
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 realmforge-0.1.2.tar.gz.
File metadata
- Download URL: realmforge-0.1.2.tar.gz
- Upload date:
- Size: 22.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4839f8b47e76d5cf31060d713a574a2a9e7d66ccbc1655e66cc1097b5dc7886b
|
|
| MD5 |
e91c3cb0c11af9dd4fc1b99be76c2d2f
|
|
| BLAKE2b-256 |
6688695972db9d1180327f08dd4194580958a6ade887368633e08f3022f0c749
|
File details
Details for the file realmforge-0.1.2-py3-none-any.whl.
File metadata
- Download URL: realmforge-0.1.2-py3-none-any.whl
- Upload date:
- Size: 29.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3e93548e55ad2e39fbec334068bea8a4846c1fca09e62762a3ba20d563aacb0
|
|
| MD5 |
c7c0efe2edd646352055c837e6541ea7
|
|
| BLAKE2b-256 |
c6e558aaf88a04fc44d0fa57f2d4329c3348841c4d4901b48bcc8a985495de53
|