You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -53,6 +53,12 @@ PolyHarness fills that gap. It's the open-source engine that makes Meta-Harness
53
53
> - Memory tools (like Supermemory) give agents persistent **memory** across conversations.
54
54
> -**PolyHarness gives agents persistent self-evolution** — you get a repeatable way to refine how they work over time.
55
55
56
+
### Part of a wave — specialized for harnesses
57
+
58
+
PolyHarness doesn't stand alone. A wave of open-source projects has shown that pairing LLMs with evolutionary search systematically improves code and prompts: [GEPA](https://github.com/gepa-ai/gepa) (reflective prompt evolution over a Pareto frontier), [ShinkaEvolve](https://github.com/SakanaAI/ShinkaEvolve) (sample-efficient program evolution), [OpenEvolve](https://github.com/algorithmicsuperintelligence/openevolve) (an open AlphaEvolve), and the [Darwin Gödel Machine](https://sakana.ai/dgm/) (open-ended self-improving agents).
59
+
60
+
Most of these evolve *general* programs or algorithms. PolyHarness is the member of this wave **specialized for agent harnesses** — the prompts, tool config, and orchestration *around* an existing agent — with a focus on **online evolution from real usage** (`ph wrap` → `ph evolve`). It borrows the strongest ideas from these projects and applies them to any CLI agent on your own tasks: Pareto-frontier parent selection (GEPA), code-novelty rejection and an adaptive backend ensemble (ShinkaEvolve), and cascade evaluation (AlphaEvolve/OpenEvolve).
61
+
56
62
## What PolyHarness Is
57
63
58
64
PolyHarness is the open-source engine for iteratively searching over an agent's harness.
@@ -469,6 +475,16 @@ The Proposer reads **all of this** before generating the next candidate. It can
469
475
470
476
When you run `ph init --agent claude-code`, PolyHarness automatically generates a `CLAUDE.md` instruction file in the workspace, telling the agent how to behave as an optimization Proposer. Same for `CLAW.md`, `CODEX.md`, `AGENTS.md` (Hermes), `OPENCODE.md` — each agent's native instruction format.
471
477
478
+
#### Backend ensemble (adaptive selection)
479
+
480
+
Don't know which backend writes the best harness changes for your task? Let PolyHarness find out. Pass several and it picks one per iteration with a **UCB bandit**, shifting picks toward whichever backend actually produces *improving* candidates:
481
+
482
+
```bash
483
+
ph run --ensemble "claude-code,codex,local"
484
+
```
485
+
486
+
At the end of the run you get a per-backend breakdown (picks + improve-rate). Selection is deterministic given the reward sequence, so runs stay reproducible. Inspired by ShinkaEvolve's adaptive LLM-ensemble selection.
487
+
472
488
### Local Model Setup
473
489
474
490
If you're running a local model (Ollama, vLLM, LM Studio, or any OpenAI-compatible server), use the `openai` backend:
@@ -517,10 +533,16 @@ After `ph init`, the workspace has a `config.yaml` with these sections:
517
533
search:
518
534
max_iterations: 20 # Maximum search iterations
519
535
early_stop_patience: 5 # Stop after N iterations with no improvement
520
-
parent_selection: best # Strategy: best | tournament | all
536
+
parent_selection: best # Strategy: best | tournament | all | pareto
537
+
novelty_filter: false # Reject near-duplicate candidates before eval (saves budget)
538
+
novelty_threshold: 0.97 # Similarity ratio above which a candidate is a near-duplicate
539
+
novelty_max_retries: 1 # Regenerate a near-duplicate this many times before skipping
540
+
seed: null # RNG seed — set an int to make randomized runs reproducible
521
541
522
542
proposer:
523
543
backend: api # api | openai | claude-code | claw-code | codex | hermes | opencode | local
544
+
ensemble: [] # If non-empty, pick among these backends per iteration via a UCB bandit
545
+
bandit_c: 1.41421356 # UCB exploration constant (higher = more exploration)
524
546
model: claude-sonnet-4-20250514 # Model name (for api/openai backends)
525
547
base_url: null # Custom API endpoint (for openai backend)
526
548
api_key: null # API key override (null = use env var)
@@ -532,6 +554,9 @@ evaluator:
532
554
type: python # python | docker | custom
533
555
entry: evaluate.py # Evaluator script entrypoint
534
556
timeout: 300 # Per-task timeout in seconds
557
+
cascade: false # Stage cheap subset first; skip rest if it fails the gate (per-task mode)
558
+
cascade_threshold: 0.4 # Min stage-1 mean score required to run the full task set
559
+
cascade_stage1: 0 # Tasks in stage 1 (0 = auto, ~1/3 of the list)
0 commit comments