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

@scoutqa/ananke

v0.1.1

Published

Assertion-based testing tool for AG-UI applications

Downloads

169

Readme

ananke

Assertion-based testing tool for AG-UI applications.

Features

  • Run scripted multi-turn conversations against AG-UI endpoints
  • Observe tool calls and assistant responses
  • Evaluate deterministic assertions (no LLM-as-judge)
  • CI-friendly with exit codes and JSON output

Installation

npm install -g @scoutqa/ananke

Or run directly with npx:

npx @scoutqa/ananke run

Quick Start

1. Create a config file

Create ananke.config.yaml in your project root:

target:
  endpoint: "https://your-app.com/ag-ui"
  headers:
    Authorization: "Bearer ${ENV.AGUI_TOKEN}"

2. Write a test file

Create tests/example.test.yaml:

name: basic conversation

turns:
  - user: "Hello, can you help me?"
    assert:
      text:
        must_match: "help|assist"

  - user: "What's 2 + 2?"
    assert:
      text:
        must_match: "4"

3. Run tests

ananke run

CLI Usage

Usage: ananke run [options] [patterns...]

Run test files

Arguments:
  patterns             Test file patterns (glob)

Options:
  -c, --config <path>  Path to config file
  -v, --verbose        Verbose output
  -d, --dry-run        Validate tests without executing
  --json               Output results as JSON
  -h, --help           display help for command

Configuration

Project Config (ananke.config.yaml)

target:
  endpoint: "https://app.example.com/ag-ui"
  headers:
    Authorization: "Bearer ${ENV.AGUI_TOKEN}"
    X-Custom-Header: "value"
  agentId: "my-agent"  # Optional, for CopilotKit transport

Variables:

  • ${ENV.NAME} - Environment variable
  • ${VAR} - Variable from hooks

Test File Format

name: test name

hooks:  # Optional setup scripts
  - cmd: ["bash", "scripts/setup.sh"]
    timeout_ms: 10000

turns:
  - user: "User message"
    assert:  # Turn-level assertions
      tools:
        require:
          - name: tool_name
            count: { exact: 1 }
            args_match:
              arg_name: "regex"
            result_match: "regex"
            after: other_tool
        forbid:
          - forbidden_tool
      timing:
        max_duration_ms: 30000
      text:
        must_match: "regex"
        must_not_match: "error"

assert:  # Test-level assertions (after all turns)
  tools:
    forbid:
      - dangerous_tool
  timing:
    max_duration_ms: 120000
    max_gap_ms: 60000

Assertions

Tool Assertions

| Assertion | Description | |-----------|-------------| | forbid | List of tools that must not be called | | require.name | Tool must be called | | require.count | { exact: N } or { min: N, max: N } | | require.args_match | Regex patterns for arguments | | require.result_match | Regex that must match result | | require.result_not_match | Regex that must NOT match result | | require.after | Tool must be called after another tool | | forbid_calls | Forbid calls matching args/result patterns |

Timing Assertions

| Assertion | Description | |-----------|-------------| | max_duration_ms | Maximum duration for turn/test | | max_gap_ms | Maximum gap between tool calls |

Text Assertions

| Assertion | Description | |-----------|-------------| | must_match | Regex that must match assistant text | | must_not_match | Regex that must NOT match |

Hooks

Hooks run before test execution. They must output JSON to stdout:

#!/bin/bash
echo '{"THREAD_ID": "th_123", "USER_ID": "user_456"}'

Variables from hooks are available as ${VAR} in the test.

CI Integration

GitHub Actions

- name: Run AG-UI tests
  run: npx @scoutqa/ananke run --json > results.json
  env:
    AGUI_TOKEN: ${{ secrets.AGUI_TOKEN }}

- name: Upload results
  uses: actions/upload-artifact@v4
  with:
    name: test-results
    path: results.json

Exit Codes

  • 0 - All tests passed
  • 1 - One or more tests failed

License

MIT