Skip to main content

RealmForge

CI Passing Security Scan Passing Bandit License MIT

Build worlds, not one-off pipelines.

RealmForge cartoon concept graphic

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.md
  • examples/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.yaml
  • realms/<your_realm>/mappings/schema.md
  • realms/<your_realm>/pipelines/README.md
  • realms/<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.

Metadata

Release files for realmforge 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for realmforge 0.1.2
File Size Uploaded
realmforge-0.1.2.tar.gz 22.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for realmforge 0.1.2
File Interpreter ABI Platform
realmforge-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 51.5 kB

Release files / realmforge-0.1.2.tar.gz

Download URL realmforge-0.1.2.tar.gz
Size 22.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4839f8b47e76d5cf31060d713a574a2a9e7d66ccbc1655e66cc1097b5dc7886b
BLAKE2b-256 checksum
How to use checksums
6688695972db9d1180327f08dd4194580958a6ade887368633e08f3022f0c749
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.0

Release files / realmforge-0.1.2-py3-none-any.whl

Download URL realmforge-0.1.2-py3-none-any.whl
Size 29.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b3e93548e55ad2e39fbec334068bea8a4846c1fca09e62762a3ba20d563aacb0
BLAKE2b-256 checksum
How to use checksums
c6e558aaf88a04fc44d0fa57f2d4329c3348841c4d4901b48bcc8a985495de53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.0

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page