Skip to main content

AIGP Governance Server — agentic governance engine (scope envelopes, circuit breakers, delegation)

Project description

aigp-server — AIGP Governance Engine

Server-side governance engine for the AI Governance Protocol (AIGP). Provider-based architecture following OOP/SOLID principles.

Install

pip install aigp-server>=0.2.0

Quick Start (Config-Driven)

from aigp_server import ServerConfig, GovernanceEngine, AigpRouter

# Configure providers
config = ServerConfig(
    storage={"provider": "memory"},          # or "dynamodb"
    pii={"provider": "regex"},               # or "presidio", "comprehend"
    key_store={"provider": "local"},          # or "kms", "vault"
    mode="ENFORCE",
)
components = config.build()

# Wire up engine + router
engine = GovernanceEngine(components.store, components.scope_mgr, components.circuit_breaker, mode="ENFORCE")
router = AigpRouter(engine, hmac_secret="your-secret")

# Handle requests (framework-agnostic)
status, resp = await router.handle_tool_request(headers, body)

Provider Architecture

aigp_server/
├── providers/
│   ├── storage/         StorageProviderBase → memory, dynamodb
│   ├── scope/           ScopeEnvelopeManager, CircuitBreakerService
│   ├── enforcement/     EnforcementAdapterBase → bedrock, azure, gcp
│   ├── pii/             PiiDetectorBase → regex, presidio, comprehend
│   ├── key_store/       KeyStoreBase → local, kms, vault
│   └── consent/         ConsentEngine (tier-aware tokenization)
├── governance_engine.py
├── routes.py
├── config.py
└── hmac_auth.py

Adding a Provider

from aigp_server.providers.pii import PiiDetectorBase, register

@register("my_detector")
class MyPiiDetector(PiiDetectorBase):
    async def detect(self, text: str) -> list[PiiEntity]: ...
    async def supported_entities(self) -> list[str]: ...

Then use it: ServerConfig(pii={"provider": "my_detector", ...})

Consent Tiers

Tier Behavior
NONE Block if PII detected
ANONYMOUS Hash PII (irreversible)
REDACTED Tokenize PII (reversible with key)
STANDARD Pass through, store with access controls
FULL Pass through, no restrictions

Handlers

Handler RFC §15 Decision
handle_tool_request §15.6 ALLOW / DENY
handle_plan_submit §15.8 APPROVED / REJECTED
handle_step_complete Budget decrement
handle_escalate §15.9 Creates pending task
handle_delegate §15.10 Scope narrowing
handle_memory_write §15.13 Classification check

License

Proprietary — © 2025-2026 Evan Erwee. All rights reserved.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aigp_server-0.2.0.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aigp_server-0.2.0-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

Details for the file aigp_server-0.2.0.tar.gz.

File metadata

  • Download URL: aigp_server-0.2.0.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aigp_server-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9b7d2393086181c1d3cde8846ce8daffcd07278a10a2b298726499aff4ef550a
MD5 be0f1563c5868224318929eb78867297
BLAKE2b-256 231724770d6bb32f6b56f4a70f66f1a1536b5db9af1ba0b01df2c21a321b985a

See more details on using hashes here.

File details

Details for the file aigp_server-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: aigp_server-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 29.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aigp_server-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e44c7d65900230d626e38fdb5d600fc22db5264cc6e6ae40fb6daf7fdcfec57
MD5 2dd275163b76d8dcdba8d8fe58ea711a
BLAKE2b-256 06c24fb28bab97e718f0a4db3842692cb7b1b0a8706c4b27e6337698c049154d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page