Skip to main content

Checks-as-code for AI agents: define invariants once, enforce them in replay, simulation, and at runtime.

Project description

spolm-checks

Checks-as-code for AI agents. Define an invariant once — enforce it in replay (CI regression), simulation (certification), and inline at runtime (action gate).

Deterministic first: predicate (CEL — sandboxed, guaranteed-terminating), schema (JSON Schema), and policy (trajectory patterns: never X, X only after Y, X at most N, tool allow/deny lists). No LLM-as-judge in the core engine, by design.

Example check

check:
  id: refund-within-order-total
  version: 1
  severity: block
  scope:
    workflow: refunds-agent
    target: tool_call
    tool: refund
  assert:
    type: predicate
    expr: "args.amount <= context.order.total && args.currency == context.order.currency"
  provenance:
    source: mined
    cluster_id: c_8842
  on_fail:
    runtime: block
    simulation: record_violation
    replay: fail_regression

CLI

spolm-check lint ./checks
spolm-check run ./checks --traces traces.jsonl

run exits non-zero if any block-severity check has violations — wire it straight into CI.

Python

from spolm_checks import load_suite, IRTrace, run_replay

checks = load_suite("./checks")
report = run_replay(checks, traces)   # traces: list[IRTrace]

Apache-2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spolm_checks-0.1.0.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spolm_checks-0.1.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file spolm_checks-0.1.0.tar.gz.

File metadata

  • Download URL: spolm_checks-0.1.0.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for spolm_checks-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d21d88dac19afbfd3e25a685f727259b4d39b7a0d89352ba572f234347013b6c
MD5 ccf19a73a109ed9f06db7598dd3ea7d4
BLAKE2b-256 f47e610367b8160a087341146623ecb7319edd749afd237ea3e197447871bd7a

See more details on using hashes here.

File details

Details for the file spolm_checks-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: spolm_checks-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for spolm_checks-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 53cb3416cf4cae3c2b1ea50f58f77af7fa803708c9e3add017e5e72176763b67
MD5 798763341d47e93066a51cce1f444edf
BLAKE2b-256 e5a9cfa9c2a705245df05709a410fb07bee9ac20b438075117b4e5461223ede1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page