Abe (Python) — pip install abe-ai
Act. Block. Escalate.
Abe is a free, open-source guardrail that checks every AI agent action before it happens.
Your agent is about to pay an invoice, buy servers, delete a table or email a customer. Abe checks the action
against your rules in under a millisecond, on your machine, and answers ACT, BLOCK or ESCALATE,
with a tamper-evident record of why.
▶ Watch the 40-second demo: an AI agent tries to spend $12,500 twice. Rules decide the easy calls; Flow catches the duplicate and approves the real renewal. (Run it yourself)
Free. Really.
Apache-2.0. No account, no API key, no network, no model, no usage limits. Every check runs on your machine, at no cost, forever.
Why teams put Abe in front of their agents
- Stops expensive mistakes: duplicate payments, over-budget purchases, force-pushes to
main,DROP TABLEin production. - Same answer every time: plain YAML rules you can read, test, and replay against past decisions before going live.
- Proof for auditors: every decision gets a hash-verified record (optionally Ed25519-signed) showing which rule fired and why.
- Works with any agent: Python, TypeScript, a local HTTP sidecar, Docker, or MCP (Claude, Cursor and other MCP clients).
- No-risk rollout: shadow mode runs beside your current approval process and shows where Abe would agree.
- Fails closed: bad input or a broken rule returns
ESCALATE, neverACT.
Pay only for the close calls (optional)
When rules can't decide, Abe returns ESCALATE. By default that goes to a person. Add --resolver flow and only
that action is sent to Flow (redacted), which returns a decision, a reason, and what
would prove it wrong, for about $0.03 to $0.05 each. ACT and BLOCK never leave your machine. See "When rules aren't enough" below.
Quick start
pip install abe-ai # or: npm install abe-ai
abe init # writes abe-policy.yaml + request.json
abe check request.json
Decision: ESCALATE
Reason: FINANCIAL_THRESHOLD_EXCEEDED
Rules: purchase_review_limit
Risk: MEDIUM
Record: jgr_01M3Q4...
Python
from abe import Abe
abe = Abe("abe-policy.yaml")
result = abe.check(
action={"type": "wire_transfer", "amount": 50000},
context={"agent_id": "finance-agent"},
)
if result.decision == "ACT":
... # execute exactly as evaluated
elif result.decision == "BLOCK":
... # do not execute; tell the user result.reason_code
else: # ESCALATE
... # hold; ask a human, or let a resolver decide
result.record.to_dict() # the Judgment-Grounded Record (store it, ship it to your SIEM)
TypeScript
import { Abe } from "abe-ai";
const abe = new Abe({ policy: "./abe-policy.yaml" });
const result = await abe.check({
action: { type: "purchase", amount: 12500, currency: "USD" },
context: { agent_id: "procurement-agent", principal_id: "user_123" },
});
console.log(result.decision); // "ESCALATE"
A policy
version: "0.1"
defaults: { unmatched: ESCALATE } # nothing matched -> needs judgment (fail closed)
rules:
- id: purchase_hard_limit
when: { all: [ { field: action.type, op: eq, value: purchase }, { field: action.amount, op: gt, value: 100000 } ] }
decision: BLOCK
reason_code: HARD_POLICY_VIOLATION
- id: purchase_review_limit
when: { all: [ { field: action.type, op: eq, value: purchase }, { field: action.amount, op: gt, value: 10000 } ] }
decision: ESCALATE
reason_code: FINANCIAL_THRESHOLD_EXCEEDED
- id: routine_purchase
when: { all: [ { field: action.type, op: eq, value: purchase }, { field: action.amount, op: lte, value: 500 } ] }
decision: ACT
judgment_required:
- action.type: terminate_employee
Also: authorization per agent, required evidence, risk and irreversibility thresholds, confidence minimums.
BLOCK beats ESCALATE beats ACT. Bad input or a broken rule returns ESCALATE / EVALUATION_FAILURE, never ACT.
Full reference: SPEC.md.
Every way to run it
| Library | pip install abe-ai · npm install abe-ai |
| CLI | abe check · replay · validate-policy · validate-record · conformance · keygen |
| Local HTTP sidecar | abe serve --policy abe-policy.yaml → POST http://127.0.0.1:8787/v1/check (any language) |
| Docker sidecar | docker run -e ABE_TOKEN=… -v $PWD:/policy:ro -p 127.0.0.1:8787:8787 ghcr.io/flowinfosystems-index/abe |
| MCP server | pip install "abe-ai[mcp]" → abe mcp --policy /abs/abe-policy.yaml (tool: fjp_check_action) |
| + Flow on escalations | pip install "abe-ai[flow]", then add --resolver flow (or ABE_RESOLVER=flow) with FLOW_API_KEY to check, serve or mcp |
Records you can audit
Every call returns a record with the decision, every matched rule, the exact policy hash, the request hash,
and a SHA-256 record_hash (optionally Ed25519-signed with abe keygen). Records never change: outcomes and
resolutions are appended as linked records. Each one is a valid FJP-CONF v0.1 Judgment-Grounded Record.
abe check request.json --record-out jgr.json --sign-key abe-signing-key.pem
abe validate-record jgr.json --public-key abe-signing-key.pub.pem
When rules aren't enough: Flow
Abe is deliberately useful without Flow. When it returns ESCALATE, you can hand that one action to
Flow's judgment service and get a verb, a reason and a falsifiable record back:
from abe import Abe
from abe_flow import FlowResolver # pip install abe-flow
abe = Abe("abe-policy.yaml", resolver=FlowResolver(api_key=os.environ["FLOW_API_KEY"]))
No code needed for the CLI, sidecar or MCP server (pip install "abe-ai[mcp,flow]"):
{"mcpServers": {"abe": {"command": "abe",
"args": ["mcp", "--policy", "/abs/abe-policy.yaml", "--resolver", "flow"],
"env": {"FLOW_API_KEY": "fjp_live_..."}}}}
ACT and BLOCK never leave your machine. Only escalations are sent (redacted), and if Flow is unreachable the
answer simply stays ESCALATE. Human-approval escalations are never auto-resolved.
Conformance
abe conformance --bench # FJP-CONF v0.1 Gate profile, Level 3 — 160 checks, offline
Repository
SPEC.md the normative specification
schemas/ JSON Schemas (request, response, record, policy)
python/ abe-ai (PyPI): core, CLI, HTTP, MCP, stores, signing, conformance
typescript/ abe-ai (npm): same API, same records, same hashes
flow-resolver/ abe-flow (PyPI): Gate → Flow for ESCALATE only
conformance/fixtures/ golden decisions + canonical-JSON vectors shared by every SDK
examples/ the $12,500 demo, purchasing, software agent, physical agent, travel (+ Judd), Flow
Apache-2.0. FJP™, Abe™ (Abe) and FJP-CONF™ are trademarks of Flow Information Systems — see TRADEMARKS.md.
Extras
| Install | Adds |
|---|---|
pip install abe-ai |
core, CLI, HTTP server, stores (memory, file, SQLite), conformance — one dependency (PyYAML) |
pip install "abe-ai[signing]" |
Ed25519 record signing (abe keygen, --sign-key) |
pip install "abe-ai[mcp]" |
MCP server (abe mcp) |
pip install "abe-ai[flow]" |
--resolver flow: send escalations to Flow (installs abe-flow) |
abe.stores.contrib |
PostgresStore (psycopg 3), MongoStore (pymongo) — bring your own driver |
Metadata
Release files for abe-ai 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| abe_ai-0.2.2.tar.gz | 72.1 kB | With provenance | Details for abe_ai-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| abe_ai-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for abe_ai-0.2.2-py3-none-any.whl |
Total release size: 139.8 kB
Release files / abe_ai-0.2.2.tar.gz
| Download URL | abe_ai-0.2.2.tar.gz |
|---|---|
| Size | 72.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1672a750e7b8beac7e30ac1b7aef19af193e1052ee95d9c6358b4b6698e17a12
|
|
BLAKE2b-256 checksum How to use checksums |
8246d02054dfdc6c0730e243b917d8765cac4131e0ffacf4ae15fff3dec68a8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 13, 2026.
Transparency logRelease files / abe_ai-0.2.2-py3-none-any.whl
| Download URL | abe_ai-0.2.2-py3-none-any.whl |
|---|---|
| Size | 67.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9a111b0acc5ed3cb36050b02d9143a61aafdd7098d1cc1596e6ff403a699a03d
|
|
BLAKE2b-256 checksum How to use checksums |
cce1e78a5d1452cf5d9c9a6bb79b0846b7332624c622aeb95bf05203702f1845
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 13, 2026.
Transparency logSecurity for abe-ai 0.2.2
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
Both files in this release have been uploaded with provenance metadata.
Attestation for abe_ai-0.2.2.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 Oct 13, 2026.
Transparency logA 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.