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

@codragraph/sdk

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/sdk

One-import surface for the CodraGraph platform — graph intelligence, dynamic harness, compression. Works with Claude Code, Codex, OpenCode, any inference.

Source
npmnpm
Version
0.1.2
Version published
Weekly downloads
1
-91.67%
Maintainers
1
Weekly downloads
 
Created
Source

@codragraph/sdk

One-import surface for the CodraGraph platform.

Developer preview. Single-import surface that re-exports the graph, harness, swarm, graphstore, recipes, and compression namespaces with subpath imports for selective bundling.

Install

npm i @codragraph/sdk

Use

import { harness, graph } from "@codragraph/sdk";

// In-process graph client — wraps the same LocalBackend the codragraph
// CLI uses, so you read from the registered repos without an HTTP hop.
const graphClient = await graph.createLocalGraphClient();

// Run a Meta-Harness search over a task family
const inference = await harness.makeInferenceProvider("claude");
const result = await harness.search({
  tasks: tasksFromJsonFile,
  iterations: 20,
  candidatesPerIteration: 2,
  inference,
  graph: graphClient,
  proposer: new harness.ClaudeCodeProposer({ contractPath: "..." }),
  store: new harness.CandidateStore("./runs/today/candidates"),
  evaluator: new harness.CodebaseQAEvaluator(),
  seeds: harness.ALL_SEEDS,
  budget: { maxInputTokens: 16000, maxOutputTokens: 1024 },
  loadCandidate: async (dir) => {
    /* dynamic import of dir/source/index.ts */
  },
});

console.log(result.frontier);

// Direct graph queries against the same in-process backend
const ctx = await graphClient.context({ name: "validateUser" });

Out-of-process / hosted access

For programmatic access to a running codragraph serve instance from another process or machine, talk to it over MCP using @modelcontextprotocol/sdk. The HTTP surface is intentionally narrow today (only /api/query is structured JSON); MCP-over-HTTP gives you the full toolset.

graph.HttpGraphClient is exported for forward compatibility but is a Phase 2 placeholder — calling its methods throws. Use graph.createLocalGraphClient() (in-process) or MCP for now.

Sub-namespaces

import { search, ALL_SEEDS } from "@codragraph/sdk/harness";
import { createLocalGraphClient, LocalGraphClient } from "@codragraph/sdk/graph";

Provider-agnostic inference

Built-in adapters: claude, openai (covers Codex), opencode. Any provider implementing InferenceProvider works:

import type { InferenceProvider } from "@codragraph/sdk";

class MyProvider implements InferenceProvider {
  readonly name = "my";
  async complete(input) {
    /* ... */
  }
}

Keywords

codragraph

FAQs

Package last updated on 29 Apr 2026

Related posts