Environment:AIScientists Dev WorldSeed Python 3 11 Engine
Appearance
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, Backend |
| Last Updated | 2026-10-26 19:00 GMT |
Overview
Python 3.11+ environment with FastAPI, uvicorn, pydantic v2, and structlog for running the WorldSeed engine and HTTP/WebSocket server.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Linux / macOS / WSL2 | Cross-platform; tested on Linux 7.0+ |
| Python | >= 3.11 | Required by pyproject.toml; ruff target py311 |
| Hardware | CPU only (no GPU needed) | GPU only required for autoresearch training |
| Disk | 100MB+ SSD | Run data stored under WORLDSEED_HOME |
| Git | >= 2.20 | Required for workspace bootstrap and experiment branches |
Dependencies
System Packages
- `python3` >= 3.11
- `git` >= 2.20
- `git-lfs` (optional, for large asset repos)
Python Packages
- `pydantic` >= 2.10, < 3
- `PyYAML` >= 6.0.2, < 7
- `structlog` >= 25.1, < 26
- `fastapi` >= 0.115, < 1
- `uvicorn[standard]` >= 0.34, < 1
- `httpx` >= 0.28, < 1
- `deepdiff` >= 7.0, < 9
- `lunar-python` >= 1.4.8
- `anthropic` >= 0.86.0
Dev Dependencies
- `pytest` >= 8.3, < 9
- `pytest-asyncio` >= 1.3.0
- `pytest-xdist` >= 3.8.0
- `playwright` >= 1.58.0
- `pytest-playwright` >= 0.7.2
- `ruff` >= 0.4, < 1
- `mypy` >= 1.10, < 2
- `pre-commit` >= 4.0, < 5
Credentials
The following environment variables are used by the engine:
- `WORLDSEED_HOME`: Data directory path (default: `~/.worldseed`)
- `WORLDSEED_DM_MODEL`: Default DM model ID (e.g. `openai/gpt-4o`)
- `WORLDSEED_DEMO`: Demo mode flag
- `OPENCLAW_DIR`: OpenClaw session directory (default: `~/.openclaw`)
- `WORLDSEED_CODEX_TICK_MODE`: Codex tick mode (`manual` or `auto`)
- `WORLDSEED_CODEX_ASYNC_WAIT_TIMEOUT`: Codex async wait timeout (default: 900)
- `WORLDSEED_CODEX_ASYNC_POLL_INTERVAL`: Codex poll interval (default: 10)
Quick Install
# Core engine dependencies
pip install "pydantic>=2.10,<3" "PyYAML>=6.0.2,<7" "structlog>=25.1,<26" \
"fastapi>=0.115,<1" "uvicorn[standard]>=0.34,<1" "httpx>=0.28,<1" \
"deepdiff>=7.0,<9" "lunar-python>=1.4.8" "anthropic>=0.86.0"
# Dev dependencies (optional)
pip install "pytest>=8.3,<9" pytest-asyncio pytest-xdist playwright pytest-playwright \
"ruff>=0.4,<1" "mypy>=1.10,<2" pre-commit
Code Evidence
Python version requirement from `pyproject.toml:5`:
requires-python = ">=3.11"
Ruff target version from `pyproject.toml:44`:
[tool.ruff]
target-version = "py311"
Data directory resolution from `src/worldseed/paths.py:15`:
return Path(os.environ.get("WORLDSEED_HOME", "~/.worldseed")).expanduser()
Default DM model from `src/worldseed/server/routes/settings.py:20`:
return os.environ.get("WORLDSEED_DM_MODEL", DEFAULT_DM_MODEL)
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `ModuleNotFoundError: No module named 'pydantic'` | pydantic not installed | `pip install "pydantic>=2.10,<3"` |
| `ImportError: cannot import name 'BaseModel' from 'pydantic'` | pydantic v1 installed | Upgrade: `pip install "pydantic>=2.10,<3"` |
| `RuntimeError: This event loop is already running` | Sync call in async context | Use `asyncio.to_thread()` or await properly |
| `yaml.YAMLError` | Malformed scene config YAML | Validate with `worldseed validate <config.yaml>` |
Compatibility Notes
- Python 3.10 and below: Not supported — pydantic v2 and modern type syntax (`X | None`) require 3.11+.
- Windows: Not officially tested; use WSL2.
- pytest-xdist: Enabled by default (`-n auto` in `pyproject.toml`). Sequential mode triggers cross-test pollution from module-level singletons. Override with `pytest -p no:xdist`.
- mypy strict mode: Enabled globally; the `autoresearch/baseline_template/` module is excluded from type checking.
Related Pages
- Implementation:AIScientists_Dev_WorldSeed_WorldEngine
- Implementation:AIScientists_Dev_WorldSeed_play_CLI
- Implementation:AIScientists_Dev_WorldSeed_TickEngine_step_async
- Implementation:AIScientists_Dev_WorldSeed_RunRecorder
- Implementation:AIScientists_Dev_WorldSeed_RulesEngine
- Implementation:AIScientists_Dev_WorldSeed_dm_resolver
- Implementation:AIScientists_Dev_WorldSeed_ConsequenceScanner_scan
- Implementation:AIScientists_Dev_WorldSeed_HighlightScanner_scan
- Implementation:AIScientists_Dev_WorldSeed_Perceiver_deliver
- Implementation:AIScientists_Dev_WorldSeed_DirectorRuntime_observe_attention
- Implementation:AIScientists_Dev_WorldSeed_director_routes
- Implementation:AIScientists_Dev_WorldSeed_director_resolver_resolve
- Implementation:AIScientists_Dev_WorldSeed_load_config
- Implementation:AIScientists_Dev_WorldSeed_validate_scene
- Implementation:AIScientists_Dev_WorldSeed_SceneConfig
- Implementation:AIScientists_Dev_WorldSeed_populate
- Implementation:AIScientists_Dev_WorldSeed_dsl_effects_execute
- Implementation:AIScientists_Dev_WorldSeed_dsl_preconditions_evaluate
- Implementation:AIScientists_Dev_WorldSeed_DMContextBuilder_build
- Implementation:AIScientists_Dev_WorldSeed_build_dm_prompt
- Implementation:AIScientists_Dev_WorldSeed_LiteLLMDMProvider_judge
- Implementation:AIScientists_Dev_WorldSeed_GazetteContext
- Implementation:AIScientists_Dev_WorldSeed_generate_gazette
- Implementation:AIScientists_Dev_WorldSeed_GazetteCache
- Implementation:AIScientists_Dev_WorldSeed_DirectorQueue
- Implementation:AIScientists_Dev_WorldSeed_bootstrap_workspace
- Implementation:AIScientists_Dev_WorldSeed_propose_hypothesis_handle
- Implementation:AIScientists_Dev_WorldSeed_run_experiment_handle
- Implementation:AIScientists_Dev_WorldSeed_write_paper_handle
- Implementation:AIScientists_Dev_WorldSeed_review_paper_handle
- Implementation:AIScientists_Dev_WorldSeed_render_paper
- Implementation:AIScientists_Dev_WorldSeed_checkpoint_evaluate
- Implementation:AIScientists_Dev_WorldSeed_EC2Runner
- Implementation:AIScientists_Dev_WorldSeed_AutoresearchWorker
- Implementation:AIScientists_Dev_WorldSeed_create_world_skill
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment