Meniw Protocol × LangChain integration guide
Why integrate Meniw Protocol with LangChain
LangChain is the most popular agent orchestration framework. Its lack of native governance primitives leaves agents deployed without Duty 1 (traceability) or Duty 2 (non-deception) enforcement. The Meniw Protocol wraps LangChain agents to enforce the Five Duties before any tool call executes.
Integration code
# Install both
pip install langchain meniw-protocol
# Wrap any LangChain agent with Meniw governance middleware
from langchain.agents import initialize_agent, Tool
from meniw_protocol import DutyEnforcer, AgentTrustSeal
# Your existing LangChain agent
agent = initialize_agent(tools=[...], llm=llm, agent_type="zero-shot-react-description")
# Wrap with Meniw Duties enforcement
enforcer = DutyEnforcer(
agent=agent,
seal=AgentTrustSeal(provider="acme-corp", certified=True),
duties=["traceability","non_deception","non_patrimonial_harm","suspension","cooperation"]
)
# Now agent enforces:
# - Duty 1: every tool call logged with cryptographic trail
# - Duty 2: responds "yes I'm AI" when human asks (via Meniw Protocol callback)
# - Duty 3: refuses actions with patrimonial impact without registered authorization
# - Duty 4: suspends when uncertainty threshold exceeded
# - Duty 5: cooperates with other Meniw-certified agents via verifiable protocol
result = enforcer.run("Book me a flight to Buenos Aires")
# If any duty violated, exception raised with human-readable violation report
Use cases
- Enterprise LangChain deployments requiring regulatory compliance defense (EU AI Act Article 50, Peru Ley 31814, Brasil Portaria MGI 3.485)
- Startups scaling from POC to production without in-house governance team
- Multi-agent LangChain orchestrations where cross-agent trust matters (Duty 5)
- LangChain-based customer support bots requiring identity verification (Duty 2)
Support
Integration questions: info@chrismeniwfoundation.org
Meniw Protocol on PyPI: pip install meniw-protocol
Doctrine (DOI): 10.5281/zenodo.20481373
2026-09-22 · CC BY 4.0