Skip to main content

agent-preflight

agent-preflight

Deterministic pre-deployment checks for AI agent systems.

ci license: MIT python 3.9+

Your agent works in the demo. Will it pass review?

Install

As an agent skill (works in Claude Code, Cursor, Copilot, Codex, Gemini, Zed and others):

npx skills add arthursilas-ai/agent-preflight

As a CLI, straight from GitHub — no PyPI account needed, no repo to clone:

pip install git+https://github.com/arthursilas-ai/agent-preflight.git
agent-preflight --init                 # write a starter spec
agent-preflight agent-spec.yaml        # check it
agent-preflight --explain ops.liveness # why a check exists

Or standalone — one file, no install, no account:

curl -O https://raw.githubusercontent.com/arthursilas-ai/agent-preflight/main/scripts/preflight.py
pip install pyyaml

python3 preflight.py --init                 # write a starter spec
python3 preflight.py agent-spec.yaml        # check it
python3 preflight.py --explain ops.liveness # why a check exists

Exit codes: 0 passed · 1 blocked · 2 spec unreadable. Add --json for CI, --strict to fail on warnings too.


Why

Around 88% of enterprise agent pilots never reach production. The reported blockers are evaluation gaps, governance friction and reliability — not model quality.

There are excellent tools for watching an agent at runtime. There is very little for the question that actually stalls a pilot:

Is this safe to ship, and can I show someone why?

agent-preflight answers that with a deterministic verdict. No model calls, no network, no vendor. The same spec always yields the same result, which is what makes it reviewable — and what makes it usable in CI.

New here? Walkthrough: from blank spec to shippable — a real pass over a small agent, about ten minutes.

Second example, different failure profile: a research agent that reads untrusted content but never touches money.

What it catches

Run against a realistic refunds agent that demos perfectly:

BLOCKING (22)
  x [tenancy.rls]        Multi-tenant system without row-level security.
  x [credentials.exposure] Privileged credentials are not restricted to server-side only.
  x [injection.gating]   Consequential actions are reachable from untrusted content.
  x [tool.approval]      Tool issue_refund: irreversible tool without an approval gate.
  x [tool.idempotency]   Tool issue_refund: irreversible tool has no idempotency strategy.
  x [agent.step_limit]   Agent refund_agent: no step_limit.
  x [ops.liveness]       Scheduled system has no liveness alert for a run that never happens.
  ...

VERDICT: BLOCKED — do not deploy until the above are resolved.

Every finding carries a fix, not just a complaint.

Use it in CI

- uses: arthursilas-ai/agent-preflight@main
  with:
    spec: agent-spec.yaml
    strict: "false"

Fails the build on blocking findings, writes them to the job summary, and comments on the pull request. Outputs passed and blocking-count if you want to gate a deploy step on them.

The check areas

Purpose · Architecture shape · Tenancy isolation · Credential exposure · Prompt-injection gating · Tool contracts (idempotency, approval, scope) · Agent bounds (step limit, cost budget, stop conditions) · Evaluation (including adversarial cases) · Operations (logging, alerting, rollback) · Liveness · Billing and fulfilment.

Full rationale and threat model: references/checks.md.

One check that exists because it bit us

x [ops.liveness] Scheduled system has no liveness alert for a run that never happens.

We built an agent with scheduled daily routines. The jobs were declared correctly and registered correctly on the platform. They simply never fired — for two days — and nothing alerted, because nothing had gone wrong. There were no errors to catch. The absence of runs looked exactly like a quiet day.

We only found it by querying the database and noticing that every event had come from a manual test.

Most agent outages are not crashes. They are things that quietly stopped happening. If your monitoring only watches for errors, it cannot see this class of failure at all.

Honest limits

This validates declared design, not running behaviour.

A passing verdict means the stated design contains no known unsafe patterns. It is evidence for a human reviewer — not a guarantee, not a security certification, and not a compliance attestation. A spec that lies still passes. It complements runtime observability; it does not replace it.

Contributing

New checks are welcome, with one requirement: a check must encode a failure that has actually happened to someone, and must ship with a fix line telling the reader what to do. Speculative checks make the tool noisy and get it ignored.

Licence

MIT © Arthur

Metadata

Release files for solystopia-agent-preflight 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for solystopia-agent-preflight 0.1.0
File Size Uploaded Provenance Actions
solystopia_agent_preflight-0.1.0.tar.gz 18.9 kB Without provenance Details for solystopia_agent_preflight-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for solystopia-agent-preflight 0.1.0
File Interpreter ABI Platform Actions
solystopia_agent_preflight-0.1.0-py3-none-any.whl Python 3 none any Details for solystopia_agent_preflight-0.1.0-py3-none-any.whl

Total release size: 36.1 kB

Release files / solystopia_agent_preflight-0.1.0.tar.gz

Download URL solystopia_agent_preflight-0.1.0.tar.gz
Size 18.9 kB
Tags Source
SHA-256 checksum
How to use checksums
774b4c95455f0185ae9243ae730e2b0d10cbccd6f834040fc0b163f082bc1372
BLAKE2b-256 checksum
How to use checksums
9fb44e74b99aa998be9c332b46d536ec7e163f9e54af05102937be81326ac3a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / solystopia_agent_preflight-0.1.0-py3-none-any.whl

Download URL solystopia_agent_preflight-0.1.0-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
44743034bb104c5bb8a283f2b1e07f187341664597a6368d5cea4caf1bce1835
BLAKE2b-256 checksum
How to use checksums
4251ddcaa15657f84a9b96a1facfadbe8cca72116b9e3eb05da9f33b6cbf8e8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for solystopia-agent-preflight 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page