maigp-langchain
AIGP governance for LangChain / LangGraph.
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 LangChain / LangGraph runs via a callback handler.
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-langchain
Pulls in maigp-agent-core (shared lifecycle) and, transitively, maigp-client.
Quick start
from aigp_langchain import AigpCallbackHandler
handler = AigpCallbackHandler(gov_url="https://gov.example.com",
app_id="my-chain", hmac_secret="secret")
# Pass as a callback to any chain / graph / LLM call
chain.invoke(inputs, config={"callbacks": [handler]})
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-langchain 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_langchain-1.0.1.tar.gz | 6.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| maigp_langchain-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.4 kB
Release files / maigp_langchain-1.0.1.tar.gz
| Download URL | maigp_langchain-1.0.1.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
46b13fa899490a55a7ec49f5de72c56c06e5b58702da1dd7c508f6da4ba7919f
|
|
BLAKE2b-256 checksum How to use checksums |
c4b7f14346bcb6050af328af19414277fe824403628f44ce49b3b8f563dd0c86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / maigp_langchain-1.0.1-py3-none-any.whl
| Download URL | maigp_langchain-1.0.1-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
34448959a8129572120bfa94df7c2e6dbf1117fb1e74e8c17417280d7d14959b
|
|
BLAKE2b-256 checksum How to use checksums |
0d5bd9c2a1586e4031c8f494eac9f26e1169d76b0f68bb5c141dcc0b1cc4e845
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|