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

@verial-ai/sdk

v1.0.0

Published

TypeScript SDK and CLI for Verial, the healthcare agent simulation and testing platform

Downloads

644

Readme

@verial-ai/sdk

npm version License: MIT

TypeScript SDK and CLI for Verial, the healthcare agent simulation and testing platform.

Installation

npm install @verial-ai/sdk

Requirements

  • Node.js 18+
  • ESM only ("type": "module" in your package.json)

Quick Start

Create an environment, add a simulator, define a benchmark with evals, run it, and check results:

import { Verial } from "@verial-ai/sdk";

const verial = new Verial({ apiKey: process.env.VERIAL_API_KEY });

// 1. Create an environment (a simulated health system)
const env = await verial.environments.create({
  name: "Cardiology Clinic",
});

// 2. Add a FHIR simulator to the environment
const sim = await verial.simulators.create({
  type: "FHIR",
  name: "Primary EHR",
});
await verial.environments.addSimulator({
  environmentId: env.id,
  simulatorId: sim.id,
});

// 3. Create a benchmark with a task and eval
const benchmark = await verial.benchmarks.create({
  name: "Prior Auth Workflow",
  environmentId: env.id,
});

const task = await verial.tasks.create({
  benchmarkId: benchmark.id,
  name: "Submit prior auth for MRI",
  instruction: "Submit a prior authorization request for a brain MRI",
});

await verial.evals.create({
  taskId: task.id,
  label: "Prior auth submitted",
  assert: "A prior authorization request was successfully submitted for the MRI",
});

// 4. Run the benchmark
const run = await verial.runs.create({ benchmarkId: benchmark.id });

// 5. Check results
const result = await verial.runs.get({ id: run.id });
console.log(result.verdict, result.score);

Authentication

Get your API key from the Verial dashboard, then pass it to the client:

const verial = new Verial({ apiKey: "your-api-key" });

Or set it via the CLI:

verial auth set-key your-api-key

Common Use Cases

Run a benchmark

const run = await verial.runs.create({ benchmarkId: "bench_abc123" });
const result = await verial.runs.get({ id: run.id });

// Inspect individual task results
const { data: taskRuns } = await verial.taskRuns.list({ runId: run.id });
for (const tr of taskRuns) {
  const { data: evalRuns } = await verial.evalRuns.list({ taskRunId: tr.id });
  console.log(tr.name, evalRuns.map((e) => e.verdict));
}

Create a playground for manual testing

const playground = await verial.playgrounds.create({
  environmentId: "env_abc123",
});

// Access provisioned sandboxes (FHIR stores, voice lines, etc.)
const pg = await verial.playgrounds.get({ id: playground.id });
console.log(pg.sandboxes);

// Clean up when done
await verial.playgrounds.teardown({ id: playground.id });

Generate synthetic data

const dataset = await verial.datasets.create({ name: "Diabetic cohort" });
await verial.datasets.generate({
  id: dataset.id,
  prompt: "10 patients with Type 2 diabetes, ages 45-70",
});

Error Handling

All API errors throw VerialApiError with structured fields:

import { Verial, VerialApiError } from "@verial-ai/sdk";

try {
  await verial.environments.get({ id: "nonexistent" });
} catch (err) {
  if (err instanceof VerialApiError) {
    console.error(err.status);  // 404
    console.error(err.code);    // "NOT_FOUND"
    console.error(err.message); // "Environment not found"
  }
}

CLI

The package includes a CLI for managing resources from the terminal.

# Install globally
npm install -g @verial-ai/sdk

# Authenticate
verial auth set-key your-api-key

# Manage resources
verial environments list
verial benchmarks list
verial runs create --benchmark-id bench_abc123
verial runs get run_abc123
verial playgrounds create --environment-id env_abc123

Run verial --help or verial <command> --help for all available commands.

Configuration

| Option | Default | Description | | --------- | ------------------------ | ----------------- | | apiKey | (required) | Your Verial API key | | baseUrl | https://api.verial.ai | API base URL |

Documentation

For complete API reference and guides, visit docs.verial.ai.

Contributing: three-tier rebuild

The SDK is one link in a three-tier chain:

  1. Handlers in apps/verial/api/src/** register OpenAPI metadata via per-resource openapi.ts files.
  2. apps/verial/api/openapi.json is regenerated from those registrations.
  3. apps/verial/packages/sdk/src/generated/ is regenerated from the spec via @hey-api/openapi-ts; resource facades in src/resources/ wrap those generated classes.

To add or change a public endpoint:

# 1. Edit the handler and its sibling openapi.ts
# 2. Rebuild the whole chain
cd apps/verial
npm run sdk:build

# 3. Review the diff to openapi.json and packages/sdk/src/generated/, commit it
# 4. If the change is breaking, add a major changeset
npm run changeset

CI runs npm run sdk:check on every PR and fails if openapi.json or src/generated/ would change when sdk:build is re-run, or if the spec breaks without a major changeset.

License

MIT