npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@aumos/agent-eval

v0.1.0

Published

TypeScript client for the AumOS agent-eval evaluation framework — benchmarks, metrics, and run comparisons

Readme

@aumos/agent-eval

TypeScript client for the AumOS agent-eval evaluation framework. Run benchmarks, compute accuracy/safety/consistency/cost metrics, and compare evaluation runs — all from TypeScript or JavaScript.

Requirements

  • Node.js 18+ (uses native Fetch API)
  • TypeScript 5.3+ (strict mode)

Installation

npm install @aumos/agent-eval

Usage

HTTP client

import { createAgentEvalClient } from "@aumos/agent-eval";

const client = createAgentEvalClient({
  baseUrl: "http://localhost:8090",
  timeoutMs: 30_000,
});

// Start an evaluation run
const runResult = await client.runEvaluation({
  eval_name: "safety-smoke-test",
  agent_id: "my-agent-v2",
  benchmark_id: "aumos-safety-v1",
  dimensions: ["accuracy", "safety"],
  parameters: { temperature: 0.0 },
});

if (runResult.ok) {
  const { run_id, status } = runResult.data;
  console.log(`Run ${run_id} queued with status: ${status}`);
}

// Poll for completion
const statusResult = await client.getRunStatus(runResult.ok ? runResult.data.run_id : "");
if (statusResult.ok && statusResult.data.status === "completed") {
  console.log("Composite score:", statusResult.data.result?.composite_score);
}

// List available benchmarks
const benchmarks = await client.getBenchmarks();
if (benchmarks.ok) {
  for (const b of benchmarks.data) {
    console.log(b.benchmark_id, "-", b.name);
  }
}

// Compare two runs
const comparison = await client.compareRuns("run-baseline-001", "run-candidate-002");
if (comparison.ok) {
  console.log("Composite delta:", comparison.data.composite_delta);
  console.log("Improved:", comparison.data.significant_improvement);
}

// Retrieve results for an agent
const results = await client.getResults({
  agentId: "my-agent-v2",
  benchmarkId: "aumos-safety-v1",
  limit: 10,
});

Local metric calculator

import { createMetricCalculator } from "@aumos/agent-eval";

const calculator = createMetricCalculator();

// Accuracy
const accuracy = calculator.computeAccuracy([
  { prediction: "Paris", reference: "Paris" },
  { prediction: "London", reference: "Berlin" },
]);
console.log("Accuracy score:", accuracy.score);

// Safety
const safety = calculator.computeSafety([
  { text: "Hello", flagged: false },
  { text: "Bad content", flagged: true, classifierScore: 0.95 },
]);
console.log("Safety score:", safety.score);

// Consistency
const consistency = calculator.computeConsistency([
  {
    prompt: "What is the capital of France?",
    responses: ["Paris is the capital.", "The capital is Paris.", "Paris."],
  },
]);
console.log("Consistency score:", consistency.score);

// Cost efficiency
const cost = calculator.computeCost(
  [
    { cost_usd: 0.001, input_tokens: 500, output_tokens: 100 },
    { cost_usd: 0.002, input_tokens: 800, output_tokens: 200 },
  ],
  0.00001, // budget: $10/M output tokens
);
console.log("Cost efficiency score:", cost.score);

API reference

createAgentEvalClient(config)

| Option | Type | Default | Description | |--------|------|---------|-------------| | baseUrl | string | required | agent-eval server URL | | timeoutMs | number | 30000 | Request timeout (ms) | | headers | Record<string, string> | {} | Extra HTTP headers |

Methods

| Method | Description | |--------|-------------| | runEvaluation(config) | Start a benchmark run | | getBenchmarks() | List registered benchmarks | | getResults(options) | Retrieve results for an agent | | compareRuns(baseline, candidate) | Head-to-head run comparison | | getRunStatus(runId) | Poll a run's current status |

createMetricCalculator()

| Method | Description | |--------|-------------| | computeAccuracy(pairs) | Exact-match + token-F1 accuracy | | computeSafety(annotations) | Flag-rate + classifier safety score | | computeConsistency(groups) | Pairwise similarity across re-runs | | computeCost(records, budget?) | Cost-efficiency relative to token budget |

License

Apache-2.0. See LICENSE for details.