New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@codragraph/harness

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codragraph/harness

Auto-tuned harnesses for AI agents — Meta-Harness algorithm with Pareto search over (accuracy, tokens, latency)

latest
Source
npmnpm
Version
2.2.0
Version published
Weekly downloads
13
-74.51%
Maintainers
1
Weekly downloads
 
Created
Source

@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 FeatureCluster context packs) 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

codragraph-harness search \
  --task ./tasks/codebase-qa/tasks.json \
  --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",
});

The same runtime is exposed as harness_run, harness_swarm_run, and harness_recipes_* MCP tools from @codragraph/cli and via @codragraph/sdk.

Package composition

Install @codragraph/harness when you are optimizing agent behavior over a task family. Pair it with:

Pair withWhy
@codragraph/cliSupplies indexed repos, MCP tools, FeatureCluster packs, and graphstore snapshots
@codragraph/sdkProvides the programmatic graph client used by custom harness runners
@codragraph/compressReduces prompt size when a harness loads large feature context packs

License

Apache-2.0. You can use, modify, redistribute, bundle, and host this package commercially, subject to the Apache-2.0 notice and attribution requirements.

Keywords

meta-harness

FAQs

Package last updated on 14 Jun 2026

Related posts