Observed since 20 Oct, 17:26 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Deterministic policy evaluation engine for the ABI ecosystem
Deterministic policy evaluation engine for AI agent governance. Evaluate routing rules, tool allowlists, and budget thresholds against structured decision requests.
Zero required dependencies.
pip install abi-policy
Status: Not yet published to PyPI. Install from source:
pip install -e .from the repo root.
from abi_policy.engine import PolicyEngine
from abi_policy.models import DecisionRequest
# Load a policy bundle with tool allow/deny lists and escalation rules
bundle = {
"bundle_id": "default",
"rules": {
"tools": {"allow": ["web_search", "file_read"], "deny": ["rm_rf"]},
"escalation": {"risky_actions": {"override:*": "require_approval"}},
},
}
engine = PolicyEngine(bundle)
# Evaluate a decision
request = DecisionRequest(action="tool_call", resource="web_search", run_id="run-42")
response = engine.evaluate(request)
print(response.decision) # "allow" | "deny" | "require_approval"
print(response.reason_code) # e.g., "TOOL_ALLOWED"
print(response.explanation) # human-readable explanation
from abi_policy.capability_matrix import CapabilityMatrix, AgentProfile
# Define agent capabilities with per-task confidence scores
profile = AgentProfile(
agent_id="claude_code",
agent_version="claude-sonnet-4",
confidence_by_task={"code_write": 0.9, "test_run": 0.85},
failure_patterns=["timeout on large repos"],
)
matrix = CapabilityMatrix()
matrix.add_profile(profile)
best = matrix.get_best_agent("code_write") # "claude_code"
DecisionRequest/DecisionResponse modelsabi-policy works on its own for any AI agent governance scenario. Define policy bundles, load them into the engine, and evaluate decision requests. No ABI ecosystem integration needed.
Within the ABI ecosystem, it integrates with the orchestrator for pre-flight agent decisions.
Related packages:
Follows Semantic Versioning. Current version: 0.1.2. See CHANGELOG.md for release notes.
MIT License (see LICENSE file).
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.2 | 14 Mar 2026 | 3 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 17:26 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:b56ea354e429dcdb4ce299d1b413d7bcb39622deaf63c8e2d746359bba9c8273