Skip to main content

fairway-py

PyPI License Python

Fairway is the Python SDK for runtime AI agent governance. Zero-config startup, and rollback with an environment variable.


Install

pip install "fairway-py[embedded,retry]"

30-second quickstart

from fairway import harness, embed_gateway

# Optional: start an in-process SQLite gateway (dev / air-gap)
embed_gateway()

@harness
def my_agent(user: str, input: str) -> dict:
    """Decorated agent. Governance happens automatically after each call."""
    return {"answer": "42"}

result = my_agent(user="alice", input="What is the meaning of life?")
print(result)   # {"answer": "42"} — or BlockedError if policy rejects it

Names: install fairway-py. Import with from fairway import .... fairway on PyPI is a different project. agentrust_sdk and agentrust load this same package.


Rollback (no code change, no image rebuild)

export AGENTRUST_ENABLED=false
# restart process — @harness becomes a no-op identity wrapper

Configuration

Every tunable is an env var — no config file required for basic usage.

Variable Default Purpose
AGENTRUST_ENABLED true Master kill-switch
AGENTRUST_GATEWAY_URL http://localhost:8000 Gateway URL
AGENTRUST_FAILURE_MODE open open | closed | queue
AGENTRUST_TIMEOUT_SEC 10 Request timeout
AGENTRUST_RETRY_ATTEMPTS 3 Retries (needs [retry])
AGENTRUST_KEY — API key

Deployment ladder (env-only)

# Dev — embedded SQLite, no external services
AGENTRUST_ENABLED=true
# (call embed_gateway() at startup)

# Staging — remote gateway, fail safe
AGENTRUST_GATEWAY_URL=https://agentrust-staging.internal:8000
AGENTRUST_KEY=at_...
AGENTRUST_FAILURE_MODE=closed

# Production
AGENTRUST_GATEWAY_URL=https://agentrust.internal:8000
AGENTRUST_FAILURE_MODE=open
AGENTRUST_RETRY_ATTEMPTS=5

App code is identical across all three environments.


Failure modes

Mode Gateway unreachable behaviour
open (default) Log warning, return approve response — agent continues
closed Raise GatewayUnavailableError — agent is blocked
queue Write request to local SQLite buffer; return approve response

Queue mode note: The local buffer is written but not automatically replayed in the current release. Use agentrust export to inspect buffered records. A background drain/replay worker is on the roadmap.


Extras

Extra Installs
embedded uvicorn, fastapi — in-process gateway via embed_gateway()
retry tenacity — exponential backoff
otel opentelemetry-sdk, opentelemetry-api — traces + metrics
langgraph LangGraph AgentTrustNode adapter
crewai CrewAI AgentTrustCallback adapter
full All of the above

Tiers

Tier Capabilities
OSS Local schema validation, no API key
Free Evidence, tool trust, auto-decision, local audit
Developer Confidence scoring, risk engine, built-in policies
Team Framework adapters, custom policies, analytics, review queue
Enterprise LLM judge, trust chain, SSO, self-hosted, SOC2 export

CLI

fairway init              # create ~/.agentrust/config.yaml
fairway status            # tier + gateway reachability
fairway export ./out.jsonl
fairway purge --confirm
fairway disable

agentrust is the same command. Configuration still lives in ~/.agentrust/ and still uses the AGENTRUST_* environment variables.


License

Apache-2.0. Framework adapters and enterprise features require a paid subscription.

Metadata

Release files for fairway-py 0.0.8

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

Source distribution (sdist)

Source distribution for fairway-py 0.0.8
File Size Uploaded Provenance Actions
fairway_py-0.0.8.tar.gz 200.7 kB With provenance Details for fairway_py-0.0.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fairway-py 0.0.8
File Interpreter ABI Platform Actions
fairway_py-0.0.8-py3-none-any.whl Python 3 none any Details for fairway_py-0.0.8-py3-none-any.whl

Total release size: 379.1 kB

Release files / fairway_py-0.0.8.tar.gz

Download URL fairway_py-0.0.8.tar.gz
Size 200.7 kB
Tags Source
SHA-256 checksum
How to use checksums
28d58bf8c2419a545569b1651e4bd0421412f55842d1b9e43bf5d531844356fc
BLAKE2b-256 checksum
How to use checksums
fd27c8d91f02f021cd6a5968ddc205d6cb939242fd5aae570293fdf3c209de9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / fairway_py-0.0.8-py3-none-any.whl

Download URL fairway_py-0.0.8-py3-none-any.whl
Size 178.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a46be7fcd871d952745ff40f36a666ec398a4d960062345bd43b582bfba58eb
BLAKE2b-256 checksum
How to use checksums
060daace943e26472880fa8f27249691ca39ff17b8044200374fd0d766e2be89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Security for fairway-py 0.0.8

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fairway_py-0.0.8.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

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.0.8 This release

2 release files Full 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