Observed since 20 Oct, 18:11 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Constitutional Token Governance for AI Agents — ACGS × Auth0 Token Vault
Constitutional token governance for AI agents.
acgs-auth0 bridges Auth0 Token Vault with ACGS MACI governance so the
constitution, not the agent, decides which OAuth scopes can be requested. It supports
offline pre-flight checks, step-up approval for elevated scopes, and audit logging
around every exchange.
acgs-auth0 supports Python 3.11+.
pip install acgs-auth0
pip install acgs-auth0[langchain]
# constitution.yaml
token_vault:
constitutional_hash: "608508a9bd224290"
connections:
github:
EXECUTIVE:
permitted_scopes: ["read:user", "repo:read"]
high_risk_scopes: []
IMPLEMENTER:
permitted_scopes: ["read:user", "repo:read", "repo:write"]
high_risk_scopes: ["repo:write"]
from acgs_auth0 import ConstitutionalTokenVault, MACIScopePolicy
from acgs_auth0.token_vault import TokenVaultRequest
policy = MACIScopePolicy.from_yaml("constitution.yaml")
vault = ConstitutionalTokenVault(policy=policy)
request = TokenVaultRequest(
agent_id="planner",
role="EXECUTIVE",
connection="github",
scopes=["repo:read"],
refresh_token="rt_example",
tool_name="list_issues",
)
validation = vault.validate(request)
assert validation.permitted is True
response = await vault.exchange(request)
print(response.access_token, response.scope)
request = TokenVaultRequest(
agent_id="builder",
role="IMPLEMENTER",
connection="github",
scopes=["repo:write"],
refresh_token="rt_example",
)
validation = vault.validate(request)
print(validation.step_up_required)
from acgs_auth0 import get_token_vault_credentials, with_constitutional_token_vault
with_github = with_constitutional_token_vault(
policy,
connection="github",
scopes=["read:user", "repo:read"],
)
@with_github
async def list_issues(repo: str) -> str:
creds = get_token_vault_credentials()
return f"using {creds['token_type']} for {repo}"
Set these environment variables for live Token Vault exchanges:
| Variable | Purpose |
|---|---|
AUTH0_DOMAIN | Auth0 tenant domain |
AUTH0_CLIENT_ID | Auth0 client ID |
AUTH0_CLIENT_SECRET | Auth0 client secret |
MACIScopePolicy and ConstitutionalTokenVault.validate().TokenAuditLog and TokenAccessAuditEntry.AGPL-3.0-or-later. Commercial licensing is available; contact hello@acgs.ai.
Constitutional Hash: 608508a9bd224290
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.1 | 5 Apr 2026 | 10 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 18:11 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:ad2f644e970182ad29023f8b9c75252b73f9bf496c8fd18068b3724b9dbdde8c