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.

Links


License: Proprietary. © Kanjani AI Research & Causum.

Metadata

Release files for maigp-agent-core 1.0.1

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.0.1
File Size Uploaded
maigp_agent_core-1.0.1.tar.gz 11.7 kB Details

Built distribution (wheel)

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

Total release size: 20.9 kB

Release files / maigp_agent_core-1.0.1.tar.gz

Download URL maigp_agent_core-1.0.1.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e03659089b83f3bb5e94b54132432876079758adab825777f4cb796b8fec8a33
BLAKE2b-256 checksum
How to use checksums
0d1a240a52d1f2010f32a51fa93942beae181313a6513a8120c19d61dedbb8ad
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.0.1-py3-none-any.whl

Download URL maigp_agent_core-1.0.1-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4b644d7999a46e3a55cdf401b31c0fb99124d798aaef284c8bfb5650862b5ab
BLAKE2b-256 checksum
How to use checksums
030c762940f05510b0f73f75dcb52f04392367e93b935cf872984fec28bea783
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

1.1.0

2 release files

This release

1.0.1 This release

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