maigp-claude-agent-sdk
AIGP governance for the Claude Agent SDK, at the agent-loop level.
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 the Claude Agent SDK agent loop — the query() / ClaudeSDKClient message stream, including tool-use turns.
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-claude-agent-sdk
Pulls in maigp-agent-core (shared lifecycle) and, transitively, maigp-client.
Quick start
from aigp_claude_agent_sdk import AigpClaudeAgentGovernance
gov = AigpClaudeAgentGovernance(gov_url="https://gov.example.com",
app_id="my-agent", hmac_secret="secret")
async for message in gov.query("Analyze this finding",
agent_name="analyst",
model_id="claude-opus-4"):
... # tool_use turns governed · usage accumulated · RECORD+TRACE at end
Not to be confused with maigp-anthropic
This package governs the Claude Agent SDK agent loop. For raw anthropic.messages.create calls, use maigp-anthropic. The SDK's query is injected (duck-typed), so no specific SDK version is required.
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-claude-agent-sdk 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_claude_agent_sdk-1.0.1.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| maigp_claude_agent_sdk-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.4 kB
Release files / maigp_claude_agent_sdk-1.0.1.tar.gz
| Download URL | maigp_claude_agent_sdk-1.0.1.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a72ec20cf5025553ca80c0a0d67d3c5bd4cb8d444f9f4615b8f849179e2765b2
|
|
BLAKE2b-256 checksum How to use checksums |
9dbe8033b9d37e3d727518c691e5f4ec886ae9c0ae062ac035f8ee792377c2c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / maigp_claude_agent_sdk-1.0.1-py3-none-any.whl
| Download URL | maigp_claude_agent_sdk-1.0.1-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c040b8189eb8ac22edf01128df1bf7b085538e5ff98f155273c70b3ffcbabce4
|
|
BLAKE2b-256 checksum How to use checksums |
ee6ede40c3fe13f68a72f9b8ed845f636c0995cb72c4e2aea91b64154aba6696
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|