@codragraph/harness
v2.1.0
Published
Auto-tuned harnesses for AI agents — Meta-Harness algorithm with Pareto search over (accuracy, tokens, latency)
Downloads
500
Maintainers
Readme
@codragraph/harness
Auto-tuned harnesses for AI agents — Meta-Harness Algorithm 1 with Pareto search over (accuracy, tokens, latency).
Built on top of @codragraph/cli MCP tools (graph-aware code intelligence) and works with any inference provider (Claude, Codex, OpenCode, OpenAI, Anthropic, Gemini, ...).
Status
Developer preview. The package ships with single-proposer search, multi-role swarm search (Explorer + Exploiter + Critic), versioned recipe memory keyed on graph snapshots, and CLI / MCP entry points.
See RFC.md for the full design.
Concept
A harness is the code around a fixed base model that decides what to store, retrieve, and present at each step. Different harnesses produce different (accuracy, token-cost, latency) tradeoffs for the same task family.
codragraph-harness search runs an outer optimization loop:
- Start with seed harnesses (
zero-shot,few-shot,graph-aware). - Score each on a search-set of tasks → 3-vector
(accuracy, tokens, latencyMs). - An agentic proposer (Claude Code by default) reads the filesystem of all prior candidates' source + traces + scores and writes new harness variants.
- Each new harness is validated, scored, added to the Pareto frontier.
- Loop for N iterations.
- Return the non-dominated frontier.
Reference: Meta-Harness paper, arXiv 2603.28052.
Usage (planned)
codragraph-harness search \
--task ./tasks/codebase-qa/ \
--seeds zero-shot,few-shot,graph-aware \
--iterations 20 \
--proposer claude-code \
--output ./runs/2026-04-29/import { search } from "@codragraph/harness";
const frontier = await search({
taskSet: "./tasks/codebase-qa/",
iterations: 20,
proposer: "claude-code",
});Also exposed as a harness_run MCP tool and via @codragraph/sdk.
