maigp-anthropic
AIGP governance for direct Anthropic Messages API calls.
Part of MAIGP — the Mediated AI Governance Protocol: a runtime consent / scope / evidence layer for AI systems. Every governed call is CHECKed before it runs (policy, scope, jurisdiction, circuit-breaker) and RECORDed + TRACEd as tamper-evident evidence after.
What it governs
Governs raw anthropic client calls (Messages API).
Governance model
This adapter maps the framework's lifecycle onto the AIGP agent-governance loop provided by maigp-agent-core:
| Framework event | AIGP action |
|---|---|
| run / invocation start | CHECK (pre_invoke) — allowed? under what authority? |
| each model reply | token accounting (on_model_call) |
| each tool / function call | tool governance (on_tool_call) |
| run complete | RECORD + TRACE (post_invoke) |
| failure | on_error (recorded, then re-raised) |
Install
pip install maigp-anthropic
Pulls in maigp-agent-core (shared lifecycle) and, transitively, maigp-client.
Quick start
from anthropic import Anthropic
from aigp_anthropic import GovernedAnthropic
governed = GovernedAnthropic(client=Anthropic(),
gov_url="https://gov.example.com",
app_id="my-anthropic-app", hmac_secret="secret")
response = governed.message("claude-sonnet-4", "Hello", system="You are helpful")
Raw API vs agent loop
This wraps single Messages API calls. To govern the Claude Agent SDK agent loop (tool-use turns), use maigp-claude-agent-sdk.
Links
- Protocol, specs & full adapter catalog: https://github.com/owner-spec/aigp-protocol
- Issues: https://github.com/owner-spec/aigp-protocol/issues
License: Proprietary. © Kanjani AI Research & Causum.
Metadata
Release files for maigp-anthropic 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| maigp_anthropic-1.0.1.tar.gz | 2.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| maigp_anthropic-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.3 kB
Release files / maigp_anthropic-1.0.1.tar.gz
| Download URL | maigp_anthropic-1.0.1.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c87517a2f0f1276bb72e47da95121332731c2537e7a6de4ff165e9e6c79866c9
|
|
BLAKE2b-256 checksum How to use checksums |
9584d6868f2c4bb347ca9e61186d422df4ce7365b066cb18ac05570e176b0f67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / maigp_anthropic-1.0.1-py3-none-any.whl
| Download URL | maigp_anthropic-1.0.1-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c0066ea13bd065c60a219d5e9a42a23155867f4d2a80e936f26de4815b485a2c
|
|
BLAKE2b-256 checksum How to use checksums |
32eded7556fb815b5655dd14c972d02acb5738f28b1bba57352a4ddad9cab97c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|