Sign In

harness-evolver

Package Overview
Dependencies
Maintainers
1
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

harness-evolver

LangSmith-native autonomous agent optimization for Claude Code

Source
npmnpm
Version
6.2.0
Version published
Weekly downloads
191
1491.67%
Maintainers
1
Weekly downloads
 
Created
Source

Harness Evolver

Harness Evolver

npm License: MIT Paper Built by Raphael Valdetaro

Point at any LLM agent codebase. Harness Evolver will autonomously improve it — prompts, routing, tools, architecture — using multi-agent evolution with LangSmith as the evaluation backend.

Install

/plugin marketplace add raphaelchristi/harness-evolver-marketplace
/plugin install harness-evolver

npx (first-time setup or non-Claude Code runtimes)

npx harness-evolver@latest

Works with Claude Code, Cursor, Codex, and Windsurf.

Quick Start

cd my-llm-project
export LANGSMITH_API_KEY="lsv2_pt_..."
claude

/harness:setup      # explores project, configures LangSmith
/harness:health     # check dataset quality (auto-corrects issues)
/harness:evolve     # runs the optimization loop
/harness:status     # check progress (rich ASCII chart)
/harness:deploy     # tag, push, finalize

What It Looks Like

xychart-beta
    title "Best Score Over Evolution Iterations"
    x-axis ["base", "v001", "v002", "v003", "v004", "v005", "v006", "v007", "v008", "v009"]
    y-axis "Correctness" 0 --> 1
    line [0.31, 0.48, 0.52, 0.52, 0.67, 0.71, 0.71, 0.71, 0.79, 0.84]
IterScoreMerged?What happened
baseline0.31Broken tool calls, hallucinations, no error handling
v0010.48YesFixed input parsing, added retry logic (+0.17)
v0020.52YesPrompt rewrite to reduce hallucinations (+0.04)
v0030.49NoAttempted retrieval change — regressed, rejected by gate
v0040.67YesArchitect triggered: chain → ReAct restructure (+0.15)
v0050.71YesOutput validation + citation grounding (+0.04)
v0060.68NoTried fewer tool calls — broke edge cases, rejected
v0070.70NoPrompt tweak — within noise margin, not merged
v0080.79YesEvolution memory insight: combined v003's retrieval with v005's validation (+0.08)
v0090.84YesFine-tuned rubric alignment from judge feedback (+0.05)

Real pattern: initial jump → plateau → architectural breakthrough → small gains → stagnation → memory-driven recovery. Regressions rejected automatically. Not every iteration improves — that's the point of gate checks.

How It Works

LangSmith-NativeNo custom scripts. Uses LangSmith Datasets, Experiments, and LLM-as-judge. Everything visible in the LangSmith UI.
Real Code EvolutionProposers modify actual code in isolated git worktrees. Winners merge automatically.
Self-Organizing ProposersTwo-wave spawning, dynamic lenses from failure data, archive branching from losing candidates. Self-abstention when redundant.
Rubric-Based EvaluationLLM-as-judge with justification-before-score, rubrics, few-shot calibration, pairwise comparison.
Smart GatingConstraint gates, efficiency gate (cost/latency pre-merge), regression guards, Pareto selection, holdout enforcement, rate-limit early abort, stagnation detection.

Full feature list

Evolution Loop

/harness:evolve
  |
  +- 1. Preflight  (validate state + dataset health + baseline scoring)
  +- 2. Analyze    (trace insights + failure clusters + strategy synthesis)
  +- 3. Propose    (spawn N proposers in git worktrees, two-wave)
  +- 4. Evaluate   (canary → run target → auto-spawn LLM-as-judge → rate-limit abort)
  +- 5. Select     (held-out comparison → Pareto front → efficiency gate → constraint gate → merge)
  +- 6. Learn      (archive candidates + regression guards + evolution memory)
  +- 7. Gate       (plateau → target check → critic/architect → continue or stop)

Detailed loop with all sub-steps

Agents

AgentRole
ProposerSelf-organizing — investigates a data-driven lens, decides own approach, may abstain
EvaluatorLLM-as-judge — rubric-aware scoring via langsmith-cli, few-shot calibration
ArchitectULTRAPLAN mode — deep topology analysis with Opus model
CriticActive — detects evaluator gaming, implements stricter evaluators
ConsolidatorCross-iteration memory — anchored summarization, garbage collection
TestGenGenerates test inputs with rubrics + adversarial injection

Requirements

  • LangSmith account + LANGSMITH_API_KEY
  • Python 3.10+ · Git · Claude Code (or Cursor/Codex/Windsurf)

Dependencies installed automatically by the plugin hook or npx installer.

LangSmith traces any AI framework: LangChain/LangGraph (auto), OpenAI/Anthropic SDK (wrap_*, 2 lines), CrewAI/AutoGen (OpenTelemetry), any Python (@traceable).

Companion: LangSmith Tracing

For full observability into what each proposer does during evolution (every file read, edit, and commit), install the LangSmith tracing plugin:

/plugin marketplace add langchain-ai/langsmith-claude-code-plugins
/plugin install langsmith-tracing@langsmith-claude-code-plugins

With both plugins installed, the evolution loop traces to LangSmith as a hierarchy: iteration → proposers → tool calls.

References

License

MIT

Keywords

claude-code

FAQs

Package last updated on 03 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts