Skip to main content

maigp-agent-core

Shared agent-governance lifecycle for every MAIGP framework adapter.

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 AIGP agent loop itself — the primitive that all framework adapters build on.

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-agent-core

Quick start

from aigp_agent_core import AgentGovernance

gov = AgentGovernance(gov_url="https://gov.example.com",
                      app_id="my-agent", hmac_secret="...")

# Start of an agent run
gov.pre_invoke(agent_name="analyst", model_id="claude-opus-4", user_id="u1")

# Agentic control points (RFC-agentic): gate tools, plans, escalations
decision = await gov.on_tool_call("search", params={"q": "..."})
await gov.plan_submit(steps=[{"tool": "search"}, {"tool": "write"}])
await gov.escalate(reason="budget exceeded", action={"type": "pause"})

# Token accounting + completion
gov.on_model_call(input_tokens=500, output_tokens=200)
await gov.step_complete(step_number=1, status="SUCCESS")
await gov.post_invoke(status="SUCCESS")

Who should use this

You normally install a framework adapter (e.g. maigp-crewai, maigp-microsoft-agent-framework) which depends on this package. Install maigp-agent-core directly only when writing a custom adapter for a framework not yet covered.

Control points

pre_invoke · on_model_call · on_tool_call · plan_submit · escalate · attest_input · step_complete · post_invoke · on_error.


License: Proprietary. © Kanjani AI Research & Causum.

Metadata

Release files for maigp-agent-core 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for maigp-agent-core 1.1.0
File Size Uploaded
maigp_agent_core-1.1.0.tar.gz 13.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for maigp-agent-core 1.1.0
File Interpreter ABI Platform
maigp_agent_core-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.2 kB

Release files / maigp_agent_core-1.1.0.tar.gz

Download URL maigp_agent_core-1.1.0.tar.gz
Size 13.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ac8a0de935380b640307236b6c4399a5635d7cefb5b3070dce9683c4f0be9d35
BLAKE2b-256 checksum
How to use checksums
0dbc095c5ee2785274170645fbbfe54400735c45efae9d28801c3dd6f6a06126
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / maigp_agent_core-1.1.0-py3-none-any.whl

Download URL maigp_agent_core-1.1.0-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1b744d30a7b19000f6e2cf5f70a82f289e07f614d7a50de1139cf61038e227f
BLAKE2b-256 checksum
How to use checksums
d15d2b55991e6ff6b2c06d93c1e0b9ebfcd09419546b783b78a1de78b81d89e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page