Write regression tests for an AI agent's responses using simple YAML
Catch behavior shifts after changing a prompt or swapping a model
Use a local LLM as a judge to score response quality without API costs
Gate deployments in CI by failing the build when agent behavior regresses
| ozperium/agentspec | 000madz000/payload-test-api-route-handler | akash-sr/memobsidian | |
|---|---|---|---|
| Stars | 3 | 3 | 3 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | easy | easy | moderate |
| Complexity | 2/5 | 2/5 | 3/5 |
| Audience | developer | developer | general |
Figures from each repo's GitHub metadata at analysis time.
AgentSpec is a testing framework built specifically for AI agents, the way Jest is a testing framework for regular JavaScript code. The problem it solves is that AI agents behave differently every time you change a prompt, swap a model, or update a tool, and those shifts are hard to predict or catch before they reach production. AgentSpec lets you write tests in a YAML file that check the agent's behavior and catch regressions early. After installing it globally with npm, running agentspec init creates a starter YAML file with example tests, and agentspec run executes them. Because AI output is not exact text every time, the assertions are built for that reality: you can check that a response contains certain words, does not contain others, matches one of several possible phrases, matches a regular expression, calls a specific tool, or is semantically similar to an expected answer. It can also check JSON structure and response latency. One notable feature is an LLM as judge mode, where a local model such as one running through Ollama evaluates whether a response meets a written quality description, with no API costs and full privacy since nothing leaves your machine. AgentSpec also keeps the last passing output for each test, so when a test starts failing it can show you a behavior diff report of exactly what words were added or removed compared to the previous passing run. AgentSpec can test any agent reachable over HTTP by pointing it at an endpoint that accepts a JSON input and returns a JSON output. It fits into continuous integration with a CI flag that sets an exit code on failure, plus JUnit XML and JSON output formats, and there is an official GitHub Action for running it in a pipeline. The project is released under the MIT license.
A YAML-based testing framework that catches behavior regressions in non-deterministic AI agents, similar to Jest.
Mainly TypeScript. The stack also includes TypeScript, Node.js, YAML.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.