Thin public ACGS namespace package backed by acgs-lite
Project description
acgs
Framework-agnostic governance SDK for AI agents.
acgs is the stable public namespace over acgs-lite. It re-exports the core
governance primitives and adds pluggable policy backends plus persistent audit stores
without requiring an external policy server.
Installation
acgs supports Python 3.10+.
pip install acgs
pip install acgs[cedar]
pip install acgs[fastapi]
pip install acgs[anthropic]
pip install acgs[openai]
pip install acgs[langchain]
Quick Start
from acgs import Constitution, GovernanceEngine, Rule, Severity
constitution = Constitution.from_rules([
Rule(
id="NO-SELF-APPROVAL",
text="Agents may not self-approve production changes",
severity=Severity.HIGH,
keywords=["self-approve"],
),
])
engine = GovernanceEngine(constitution, strict=False)
result = engine.validate("self-approve this deployment", agent_id="agent-7")
assert result.valid is False
assert result.violations[0].rule_id == "NO-SELF-APPROVAL"
Policy Backends
Heuristic Backend
from acgs import Constitution, GovernanceEngine
from acgs.policy import HeuristicBackend
constitution = Constitution.default()
engine = GovernanceEngine(constitution, strict=False)
backend = HeuristicBackend(engine)
decision = backend.evaluate(action="deploy to prod", agent_id="bot-1")
print(decision.allowed, decision.backend, decision.latency_ms)
Cedar Backend
from acgs.cedar import CedarBackend
backend = CedarBackend.from_policy_dir("./policies")
decision = backend.evaluate(
action="read:patient-records",
agent_id="clinical-bot",
context={"role": "EXECUTIVE", "department": "cardiology"},
)
Audit Stores
SQLite Audit Store
from acgs.audit_sqlite import SQLiteAuditStore
store = SQLiteAuditStore(path="acgs_audit.db")
entries = store.list_entries(agent_id="bot-1", limit=100)
chain_ok = store.verify_chain()
In-Memory Audit Store
from acgs.audit_memory import InMemoryAuditStore
store = InMemoryAuditStore()
print(store.count())
What acgs Adds Over acgs-lite
| Layer | Package | Role |
|---|---|---|
| Public API | acgs |
Stable namespace, policy backends, audit stores |
| Engine | acgs-lite |
Validation engine, MACI, integrations, CLI |
Import from acgs when you want the stable public SDK. Import acgs-lite directly
when you need package-specific integrations, middleware, or the CLI.
Key Features
- Stable governance primitives re-exported from
acgs-lite. - Pluggable
PolicyBackendinterface with built-in heuristic and Cedar backends. - Persistent audit storage through in-memory and SQLite implementations.
- Fail-closed policy evaluation and tamper-evident audit-chain verification.
License
AGPL-3.0-or-later. Commercial licensing is available; contact hello@acgs.ai.
Links
Constitutional Hash: 608508a9bd224290
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file acgs-1.0.0a2.tar.gz.
File metadata
- Download URL: acgs-1.0.0a2.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67e8978a94168df3e2a72d5d4127a401e96edc0e3f9b4d7349402b933e214a2a
|
|
| MD5 |
0e4bff1166a7ab5e4e47b9dc9095173f
|
|
| BLAKE2b-256 |
5ae3c2b2e1288b057fadf39a42229bd952fbb148c7988f1157c4f1a241f1fcad
|
File details
Details for the file acgs-1.0.0a2-py3-none-any.whl.
File metadata
- Download URL: acgs-1.0.0a2-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6af210b189b826d7b425fdd0150b3efee6e491e61be68f0336dcfed6eaf970d
|
|
| MD5 |
a1dacd5631afe1c10cbb789ed38bbc83
|
|
| BLAKE2b-256 |
f7d2009bf07088614c3eebb4bdfd6f1d95acc647d7de420d6be04e7c24600e15
|