Abe

io.github.flowinfosystems-index由 GitHub 帳號 flowinfosystems-index 發布v0.2.3更新於 Oct 24, 2026

Free, local check before an AI agent acts: your rules return ACT, BLOCK or ESCALATE.

概覽

AI 產生的概覽

Abe 是免費的本機護欄,在 AI 代理執行動作前依你的 YAML 規則檢查,並回傳 ACT、BLOCK 或 ESCALATE。

可以做什麼
Abe 在本機以不到一毫秒的時間,依純 YAML 策略規則評估代理擬執行的動作,回傳 ACT、BLOCK 或 ESCALATE,並附上原因碼與防竄改紀錄(R2、R4)。MCP 伺服器提供一個檢查工具(fjp_check_action)(R42)。策略支援依代理授權、必要證據、風險與不可逆門檻,輸入異常時預設失敗關閉(R16、R26、R28)。每次呼叫都回傳附雜湊驗證的紀錄,可選用 Ed25519 簽章,能驗證並送往 SIEM(R13、R45)。
適用情境
當 AI 代理可能執行有後果的動作——支付發票、購買伺服器、刪除資料表、寄信給客戶——而你希望每次動作前都有確定且可稽核的判定時,適合使用(R3、R11)。也適合想先回放歷史請求測試策略變更,或以 shadow 模式與現有核准流程並行、確認後再啟用的團隊(R31、R33)。
執行需求
本機程序,僅桌面端,透過 uvx 或 pip 安裝 abe-ai(PyPI);MCP 伺服器需安裝 mcp 附加元件(R42)。必須提供 ABE_POLICY,也就是以 abe init 產生的 abe-policy.yaml 絕對路徑(V1.1)。本機檢查不需要帳號、API 金鑰、網路或模型(R9)。選用:設定 ABE_RESOLVER=flow 並提供 FLOW_API_KEY 密鑰,將升級項目送往 Flow(V2.1、V3.1)。
安裝前請注意
只有在設定 ABE_RESOLVER=flow 時,升級項目才會(去識別化後)送往 Flow;ACT 與 BLOCK 永遠不離開本機(R55、R56)。FLOW_API_KEY 是計費憑證(fjp_live_...),每次 Flow 判定約花費 0.03 至 0.05 美元(R20、V3.1)。需要人工核准的升級項目不會被自動裁決(R57)。判定會攔截真實動作(付款、刪除、寄信),策略寫錯可能誤放行或誤阻擋,建議先用 replay 與 shadow 模式驗證(R31、R33)。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Abe,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Abe

[Abe, a friendly traffic light giving a thumbs up]

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 demo: an AI agent tries to spend $12,500 twice]

▶ 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 TABLE in 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, never ACT.

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. Details below.

Quick start

bash
pip install abe-ai            # or: npm install abe-aiabe init                      # writes abe-policy.yaml + request.jsonabe check request.json
text
Decision: ESCALATEReason: FINANCIAL_THRESHOLD_EXCEEDEDRules: purchase_review_limitRisk: MEDIUMRecord: jgr_01M3Q4...

Python

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 evaluatedelif result.decision == "BLOCK":    ...                                   # do not execute; tell the user result.reason_codeelse:  # 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)

Claude Agent SDK

python
from claude_agent_sdk import ClaudeAgentOptionsfrom abe import Abefrom abe.integrations.claude_agent_sdk import abe_hooks
options = ClaudeAgentOptions(hooks=abe_hooks(Abe("abe-policy.yaml"), agent_id="ops-agent"))

Every tool call is checked before it runs. BLOCK → deny with Abe's reason; ESCALATE → deny, ask or defer (hand it to a person); ACT → your normal permissions. Tool inputs are action fields (action.command, action.amount). See examples/claude_agent_sdk.

TypeScript

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

yaml
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: ACTjudgment_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.

Test before you enforce

Replay saved requests through a policy before it touches real money. Label each case with what your people decided and Abe reports where it disagrees; compare against the live policy to see exactly which decisions a change moves.

bash
# cases.jsonl: one request per line, or {"id": "inv-1042", "request": {...}, "expected": "BLOCK"}abe replay cases.jsonl --policy new-policy.yaml --baseline abe-policy.yaml#   Replayed 1204 case(s) against ...      ACT 1088   BLOCK 31   ESCALATE 85#   Changed vs baseline: 3                 inv-1042: ACT -> ESCALATE  [purchase_review_limit]#   Agreement with expected: 1198/1204 (99.5%)abe replay cases.jsonl --policy new-policy.yaml --baseline abe-policy.yaml --fail-on-change   # CI: exit 1 if anything moved

Shadow mode runs Abe beside your current approval process. Decisions, results and exit codes are exactly what enforce mode would return, and every record is marked "mode": "shadow". Keep approving the way you do today, report what your people decided, and each record's falsifier shows whether they agreed.

python
from abe.stores import SQLiteStore
abe = Abe("abe-policy.yaml", mode="shadow", store=SQLiteStore("abe.db"))    # or: abe serve --shadow · ABE_MODE=shadowr = abe.check(action={"type": "purchase", "amount": 48000}, context={"agent_id": "ap-agent"})# ... your existing approval happens ...abe.record_outcome(r.records[0], "approved")    # people approved; if Abe said BLOCK, the falsifier triggers

When the agreement rate is where you want it, drop mode="shadow" and Abe enforces.

Every way to run it

Librarypip install abe-ai · npm install abe-ai
CLIabe check · replay · validate-policy · validate-record · conformance · keygen
Local HTTP sidecarabe serve --policy abe-policy.yaml → POST http://127.0.0.1:8787/v1/check (any language)
Docker sidecardocker run -e ABE_TOKEN=… -v $PWD:/policy:ro -p 127.0.0.1:8787:8787 ghcr.io/flowinfosystems-index/abe
Claude Agent SDK hookpip install "abe-ai[claude]" → ClaudeAgentOptions(hooks=abe_hooks(abe)) (example)
MCP serverpip install "abe-ai[mcp]" → abe mcp --policy /abs/abe-policy.yaml (tool: fjp_check_action)
+ Flow on escalationsadd --resolver flow (or ABE_RESOLVER=flow) with FLOW_API_KEY to check, serve, mcp or the Docker image

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.

bash
abe check request.json --record-out jgr.json --sign-key abe-signing-key.pemabe 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:

python
from abe import Abefrom abe_flow import FlowResolver                     # pip install abe-flow
abe = Abe("abe-policy.yaml", resolver=FlowResolver(api_key=os.environ["FLOW_API_KEY"]))

No Python? The CLI, sidecar and MCP server take the same resolver (pip install "abe-ai[mcp,flow]"):

json
{"mcpServers": {"abe": {"command": "abe",  "args": ["mcp", "--policy", "/abs/abe-policy.yaml", "--resolver", "flow"],  "env": {"FLOW_API_KEY": "fjp_live_..."}}}}

abe serve --resolver flow and docker run -e ABE_RESOLVER=flow -e FLOW_API_KEY=… … work the same way. If Flow is out of credits, the MCP result says so and links to the refill page; the action stays ESCALATE.

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

bash
abe conformance --bench        # FJP-CONF v0.1 Gate profile, Level 3 — 160 checks, offline

Repository

SPEC.md                  the normative specificationschemas/                 JSON Schemas (request, response, record, policy)python/                  abe-ai (PyPI): core, CLI, HTTP, MCP, stores, signing, conformancetypescript/              abe-ai (npm): same API, same records, same hashesflow-resolver/           abe-flow (PyPI): Gate → Flow for ESCALATE onlyconformance/fixtures/    golden decisions + canonical-JSON vectors shared by every SDKexamples/                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.

來源:README.md,提交 9dd920e

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.2.3最新Oct 13, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分