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

agent-sentinel

v0.1.1

Published

Test harness for AI agent workflows. pytest for AI agents.

Downloads

165

Readme

agent-sentinel

Test harness for AI agent workflows. pytest for AI agents.

Define multi-turn agent conversations as YAML test cases, run them against any HTTP endpoint, and validate responses with matchers (contains, regex, JSON schema, tool calls).

Install

npm install -g agent-sentinel

Quick Start

Create a test file tests/my-agent.yaml:

name: "booking-agent-happy-path"
description: "Agent books a reservation"
agent:
  endpoint: "http://localhost:3000/chat"
  method: "POST"

steps:
  - user: "Book me a table for 2 at Nobu tonight at 8pm"
    expect:
      contains: ["Nobu", "8pm"]
      tool_calls:
        - name: "create_booking"
    max_latency_ms: 5000

  - user: "Actually, make it 4 people"
    expect:
      contains: ["4", "updated"]
      not_contains: ["error"]
      tool_calls:
        - name: "update_booking"
          args_match:
            guests: 4

assertions:
  total_cost_max: 0.05
  total_latency_max_ms: 15000

Run it:

sentinel run tests/my-agent.yaml

Or run all tests in a directory:

sentinel run tests/

CLI Options

sentinel run <path> [options]

Options:
  -e, --endpoint <url>       Override agent endpoint
  -m, --method <method>      Override HTTP method (GET, POST, PUT, PATCH, DELETE)
  -H, --header <key=value>   Add HTTP headers (repeatable)
  -t, --timeout-ms <ms>      Override request timeout

Matchers

| Matcher | Description | |---------|-------------| | contains | Response includes all specified strings | | not_contains | Response excludes all specified strings | | regex | Response matches regex patterns (with optional flags) | | schema | Response body validates against JSON schema | | tool_calls | Agent invoked expected tools with matching args | | max_latency_ms | Per-step latency threshold |

Assertions

Test-level assertions checked after all steps complete:

  • total_cost_max - Maximum total cost across all steps
  • total_latency_max_ms - Maximum total latency across all steps

Agent Endpoint Contract

Your agent endpoint should accept POST requests with:

{
  "messages": [
    { "role": "user", "content": "..." },
    { "role": "assistant", "content": "..." }
  ]
}

And return:

{
  "content": "Agent response text",
  "tool_calls": [{ "name": "tool_name", "args": {} }],
  "cost": 0.001
}

Roadmap

  • [ ] CLI target adapter (test command-line agents)
  • [ ] SDK target adapter (test agents via code)
  • [ ] LLM-as-judge evaluator (semantic correctness)
  • [ ] Regression detection (baseline comparison)
  • [ ] JSON/JUnit/HTML reporters
  • [ ] Parallel test execution

License

MIT