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
codexCLI onPATH(override viaWORKER_PLANNING_BACKEND/WORKER_CODING_BACKEND). - Evaluator plugin:
WORKER_EVALUATOR_PLUGIN=module:callablethat 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
docs/index.md(local)- Online docs
- Key guides:
docs/loreley/config.md,docs/script/run_scheduler.md,docs/script/run_worker.md
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 loreley-0.6.4a0.tar.gz.
File metadata
- Download URL: loreley-0.6.4a0.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c375ac90894672852d65f6da59780e5afd28f0a0e19140c9ebc226f14687029
|
|
| MD5 |
4f6aa8854c103919c971b10e6558c6b7
|
|
| BLAKE2b-256 |
afb82e5823bcdb030890f71cf50e74da9675e84bcf0f9d7bae85c5f4d7f4a6d5
|
File details
Details for the file loreley-0.6.4a0-py3-none-any.whl.
File metadata
- Download URL: loreley-0.6.4a0-py3-none-any.whl
- Upload date:
- Size: 203.7 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eafdbe328fb1ea34aa448a528bc371a57a9c223a6e22727c63a1a4b4b306d58e
|
|
| MD5 |
b0bf193965990cd2d0de25722e5c7679
|
|
| BLAKE2b-256 |
40dadc839e0e77592b59b5331fafaad95343535e55b85acf31b8c00d421e4c54
|