Skip to main content

Whole-repository Quality-Diversity optimization for real git codebases.

Project description

Loreley

Whole-repository Quality‑Diversity optimization for real git codebases.

Loreley is a distributed system that evolves entire git repositories (the unit of search is a git commit). It continuously samples base commits, asks external planning/coding agents to implement repo-wide changes, evaluates the result with your evaluator, and stores metrics plus a MAP‑Elites archive in Postgres for later sampling and reuse.

Why use it

  • Whole-repo evolution: cross-module refactors and “production-style” changes are first-class.
  • QD-native (MAP-Elites): keeps multiple high-performing but different solutions instead of a single champion line.
  • Learned behaviour space: behaviour descriptors come from repo-state code embeddings (cached by git blob SHA), not hand-crafted heuristics.
  • Production loop: scheduler + Redis/Dramatiq workers + Postgres, with preflight checks, logs, and reproducible git history.

Quick start (local)

Requirements: Python 3.11+, uv, Git (worktrees), PostgreSQL, Redis, and an OpenAI-compatible API for embeddings (OPENAI_API_KEY). You also need:

  • Planning/coding backend: default is the codex CLI on PATH (override via WORKER_PLANNING_BACKEND / WORKER_CODING_BACKEND).
  • Evaluator plugin: WORKER_EVALUATOR_PLUGIN=module:callable that runs unattended and returns structured metrics.
git clone <YOUR_FORK_OR_ORIGIN_URL> loreley
cd loreley
uv sync
docker compose up -d postgres redis

cp env.example .env
# Minimal required vars:
# - OPENAI_API_KEY
# - MAPELITES_EXPERIMENT_ROOT_COMMIT=<git commit hash>
# - SCHEDULER_REPO_ROOT=/abs/path/to/your/target-git-checkout
# - WORKER_REPO_REMOTE_URL=<git remote URL with push access>
# - WORKER_EVOLUTION_GLOBAL_GOAL="..."
# - WORKER_EVALUATOR_PLUGIN=module:callable
# - (optional) WORKER_EVALUATOR_PYTHON_PATHS=["/abs/path/to/plugin_dir"]
# - (optional) SCHEDULER_STARTUP_APPROVE=true  # skip interactive startup approval

uv run loreley doctor --role all
uv run loreley scheduler
uv run loreley worker

Optional UI (read-only)

uv sync --extra ui
uv run loreley ui

Documentation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

loreley-0.6.3a0.tar.gz (2.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

loreley-0.6.3a0-py3-none-any.whl (199.3 kB view details)

Uploaded Python 3

File details

Details for the file loreley-0.6.3a0.tar.gz.

File metadata

  • Download URL: loreley-0.6.3a0.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for loreley-0.6.3a0.tar.gz
Algorithm Hash digest
SHA256 5b931514984370b4e00ce2ab88e8c583f2fbc15013fc7a03d3b55e4734b59dc3
MD5 ee426d21eb63f8d06b12852ce76ad01f
BLAKE2b-256 20a53de54d42b3188c30f88c434c5eeeefcbb820f796d8da840b330b6a1fe744

See more details on using hashes here.

File details

Details for the file loreley-0.6.3a0-py3-none-any.whl.

File metadata

  • Download URL: loreley-0.6.3a0-py3-none-any.whl
  • Upload date:
  • Size: 199.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for loreley-0.6.3a0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc7b41fe3e849a3305291358a00fdb2044ccbd0ce4a40e89e148f45bef21b57f
MD5 fbc469be8ea93429894604692ba024fb
BLAKE2b-256 2a3d6898edd913dd1f0d7da76b5515ad52d4fd325b92d85c2a4e0b537d4b9d30

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page