Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Environment:AIScientists Dev WorldSeed Python 3 11 Engine

From Leeroopedia
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

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment