CI/CD verification pipeline for AI agent outputs — fact check, schema validation, diff verification
Project description
agent-ci
CI/CD verification pipeline for AI agent outputs.
Don't trust your agent's output — verify it.
Why agent-ci?
AI agents are entering production, but no one can answer "can I trust this output?"
Existing tools are all "eval libraries" — you import them and write tests yourself. That's self-review, not independent verification.
agent-ci is your agent's CI/CD pipeline — plug it in, and every agent output goes through an independent verification layer before it reaches your users.
Quick Start
pip install agent-ci-verify
agent-ci ./agent-output/
agent-ci v0.1.0
Output dir: ./agent-output/
Checkers: schema, fact, diff
📋 Schema Checker
┏━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ ✅ │ json_valid │ ┃
┃ ✅ │ yaml_valid │ ┃
┃ ✅ │ security_scan │ No secrets detected ┃
┗━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
🔍 Fact Checker
┏━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ ✅ │ fact:file_count │ 1 files for '*.json' ┃
┃ ✅ │ fact:content_contains│ 'success' found in result.json ┃
┗━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
╭────────────────────────────────── Verdict ────────────────────────────────╮
│ ✅ PASS │
╰───────────────────────────────────────────────────────────────────────────╯
Three Verification Layers
| Layer | What it checks | Example |
|---|---|---|
| Schema | Format, structure, security | Valid JSON? API key leaked? Required files present? |
| Fact | File existence, API reconciliation, LLM judging | Agent claimed result.json exists — does it? API returned 200? |
| Diff | Regression detection, semantic drift | Output changed vs baseline? Similarity below threshold? |
Configuration
Drop .agent-ci.yaml in your agent project root:
pipeline:
enabled_checkers: [schema, fact, diff]
fail_fast: false
schema:
security:
enabled: true
required_files:
- "output/result.json"
json_schemas:
schemas/output.schema.json: "output/**/*.json"
fact:
files:
- pattern: "output/**/*.json"
expected_count: 1
min_size_bytes: 10
content_checks:
- type: contains
value: "success"
- type: not_contains
value: "error"
api:
- endpoint: "https://api.example.com/health"
expected_status: 200
llm_judge:
- file: "output/answer.md"
rubric: "Is the answer factually correct?"
model: "gpt-4o-mini"
diff:
baseline: "./baseline-output/"
semantic_threshold: 0.7
max_changed_files: 5
Security Scanning
Built-in patterns detect:
- AWS Access Keys (
AKIA...) - GitHub Tokens (
ghp_...) - OpenAI API Keys (
sk-proj-...) - JWT Tokens
- Private Keys (RSA, EC, DSA, OpenSSH)
- Password/Secret assignments
CI Integration
# .github/workflows/agent-check.yml
- name: Verify agent output
run: |
pip install agent-ci
agent-ci ./output/
Development
git clone https://github.com/Lewis-404/agent-ci.git
cd agent-ci
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest tests/ -v
License
MIT — see 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 agent_ci_verify-0.1.0.tar.gz.
File metadata
- Download URL: agent_ci_verify-0.1.0.tar.gz
- Upload date:
- Size: 19.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c4325e9c5457d39a07c7f5f05e422cad1dec942af1d895b91e51c3a397da8b2
|
|
| MD5 |
3b9c18ed31d8461dc918fb663ba87d48
|
|
| BLAKE2b-256 |
df690a997600ea781a12ef5b51b8f0aaf935292325512bb160340c3cad013ef7
|
File details
Details for the file agent_ci_verify-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agent_ci_verify-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c81e40e89144864fa63fba6af6006c9ec8d6630f864334b133eb1cd9afd33322
|
|
| MD5 |
b224a800101bbaab1783a00e03e84697
|
|
| BLAKE2b-256 |
bb3226721ae9675c094860d20fcfe83aaaa298f97e47cf34169331a721a51cb5
|