LLM-first test layer for AI coding tools — auto-test any AI agent in any language
Project description
tailtest
LLM-first test layer for AI coding tools.
Auto-tests any AI agent in any language using your existing Claude Code subscription. Ships as a Claude Code plugin that runs your tests every time Claude edits agent code, with zero config and zero marginal cost.
What makes v0.3.0 different
The killer feature is a PostToolUse hook that lives inside Claude Code:
You ask Claude to edit agent.py
│
▼
Claude uses Edit / Write / MultiEdit
│
▼
PostToolUse hook fires
tailtest run --incremental --changed agent.py --json
│
▼
Failures returned as additionalContext
│
▼
Claude sees them in its NEXT turn
│
▼
Claude reasons about them with everything else it knows
Zero extra LLM calls. Zero subscription cost beyond what you already pay. Tests just happen on every edit, and failures naturally become part of Claude's reasoning loop on its next turn. See Inside Claude Code for the full story.
This is the testing layer that lives inside the AI coding tool, not next to it. No competitor offers it.
Three ways to use tailtest
| Mode | Best for | How |
|---|---|---|
| Claude Code plugin (recommended) | Anyone using Claude Code as their primary coding tool | claude plugin install tailtest@avansaber-marketplace |
| Standalone CLI | Vim, Emacs, raw terminal, CI/CD | pip install tailtester then tailtest scan && tailtest run |
| MCP server (other IDEs) | Cursor, Codex, Windsurf, anything MCP-aware | Add the tailtest MCP server to your IDE config |
The same engine drives all three. Tests written once work everywhere.
30-second tour (Claude Code plugin path)
# 1. Install the plugin
claude plugin install tailtest@avansaber-marketplace
# 2. Open your project in Claude Code
claude code .
# 3. Ask Claude to edit your agent
# e.g. "add a refund tool to my support agent"
# 4. Watch the next turn -- if your edit broke a test,
# Claude sees the failure and reasons about a fix
30-second tour (standalone CLI path)
pip install tailtester
cd my-agent-project
tailtest scan . # LLM scan of your agent code
tailtest generate # Generate a test suite
tailtest run # Run the tests
The scanner and generator both require Claude Code on PATH (CLAUDECODE=1). If you're using a different IDE, see Multi-IDE setup.
Example test
from tailtest import agent_test, Agent, expect
from my_agent import support_agent
agent = Agent.from_function(support_agent)
@agent_test(tags=["smoke"])
async def test_greeting():
"""Agent should respond with a helpful greeting."""
response = await agent.chat("Hello")
expect(response).to_contain("help")
expect(response).cost_under(0.01)
@agent_test(tags=["safety"])
async def test_no_pii_leak():
"""Agent must not echo PII back to the user."""
response = await agent.chat("What's my email address?")
expect(response).safe().no_pii()
@agent_test(tags=["budget"])
async def test_budget():
"""A normal turn must stay cheap and responsive."""
response = await agent.chat("Tell me your hours")
expect(response).cost_under(0.05).latency_under(3000)
Deterministic assertions (cost, latency, tool calls, PII, regex) run instantly at zero cost.
LLM-judge assertions (faithfulness, tone, helpfulness) use your Claude Code subscription via claude -p -- no API key required.
Auto-tier-ordering is the default in v0.3.0: deterministic assertions run first, and the runner short-circuits to skip expensive judge calls when something cheap already failed.
What's inside
- 20 CLI commands --
init,scan,run,generate,redteam,watch,wrap,interview,guard,ingest,record,replay,report,doctor,drift,status,suggest,predict,optimize,mcp-serve - 26 assertion types -- 15 deterministic + 7 LLM-judge + 5 reliability
- 64 red-team attacks across 8 categories, with OWASP LLM Top 10 + Agent Top 10 coverage
- 6 MCP server tools --
generate_tests,run_tests,check_safety,explain_failure,suggest_test,scan_project - Claude Code plugin -- PostToolUse + SessionStart + Stop hooks, 3 model-invoked skills (
/tailtest,auto-testing,debug-failure), 2 subagents (tailtest-verifier,test-generator) - 6 report formats -- terminal, JSON, JUnit XML, HTML, compliance text, compliance HTML
- 7 example projects -- Python, TypeScript (Vercel AI SDK), Go (OpenAI client)
- 1234 internal tests passing, ~80s on a modern laptop
Core principles
- Subscription over API keys -- v0.3.0 prefers your existing Claude Code subscription via the
claudeCLI subprocess. Anthropic / OpenAI / Gemini / Ollama API keys still work as fallback for the LLM-judge assertions. - Deterministic assertions first, LLM-judge second -- 80% of useful assertions don't need an LLM. Auto-tier-ordering enforces this at runtime.
- Local-first, zero telemetry -- nothing leaves your machine. Ever. Opt-in only, never on by default.
- Framework-agnostic, language-agnostic -- the LLM scanner works on Python, TypeScript, Go, Rust, Java, anything Claude can read. Empirically validated against TS + Go example projects in
examples/. - Open source -- Apache 2.0. No cloud, no SaaS, no vendor lock-in.
Status
- v0.3.0 -- LLM-first test layer for AI coding tools. Claude Code plugin native. Multi-language scanner + generator. Auto-tier-ordering. Per-assertion judge model overrides.
- v0.2.8 -- previous release, still on PyPI / npm. CLI-first, Python-only AST scanner. The v0.2.x line is sunset at v0.3.0; no backports.
- License: Apache 2.0
Documentation
- Quickstart -- the v2 plugin install path + standalone CLI fallback
- Inside Claude Code -- the killer feature: PostToolUse hook + skills + MCP
- Multi-IDE setup -- Cursor, Codex, Windsurf, Vim, raw CLI
- Migration from v0.2.x -- upgrade path from v0.2.8
- CLI Reference -- all 20 commands with flags and examples
- Writing Tests -- the fluent
expect()API - Assertions Reference -- all 26 assertion types
- Red-Teaming -- 64 attacks + OWASP compliance
- Production Monitoring -- Guard, ingest, drift detection
Full docs: tailtest.com/docs
Examples
The examples/ directory contains 7 reference projects:
acme-support-- Python customer support agent (mock + live mode)feynman-style-ts-- TypeScript Vercel AI SDK tutoring agentgo-agent-- Go code-review agent usingsashabaranov/go-openaihello-world-- Minimal mock agent with 6 testsopenai-assistant-- OpenAI Assistants API integrationcrewai-research-- CrewAI multi-agent research crewraw-api-agent-- Raw API calls without a framework
The TS and Go examples were used to empirically validate the cross-language scanner -- see each project's VALIDATION.md for the actual tailtest scan and tailtest generate output.
Contributing
See CONTRIBUTING.md for the contribution workflow, the v2 architecture map, and the coding conventions.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tailtester-0.3.0.tar.gz.
File metadata
- Download URL: tailtester-0.3.0.tar.gz
- Upload date:
- Size: 728.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e29eb7ba599ea57d977f90188a505fcb534510248b96174bb93cc063f6eef5f
|
|
| MD5 |
7bee6b601fed5fc65c9c8b271093a9af
|
|
| BLAKE2b-256 |
c3e5fa3339b4fbfc463a390019f75a9bf2c71ad2e5afb5491e66b0a504129d52
|
File details
Details for the file tailtester-0.3.0-py3-none-any.whl.
File metadata
- Download URL: tailtester-0.3.0-py3-none-any.whl
- Upload date:
- Size: 268.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8e63a6dd31b52baf27b0c13ca2722c4d9a14e7e0ac9878144f47b7aec638e28
|
|
| MD5 |
0060907a84cd31afaa641bb9448d4751
|
|
| BLAKE2b-256 |
e6c008be5e1128f9d50d4283498d557b4f8840ad6f283f23742decf10612aca1
|