Skip to main content

The Python Governance Platform for AI Agents — compliance middleware for LangGraph, CrewAI, AutoGen

Project description

AgentMesh SDK

The Trust Layer for AI Agents — Scan for governance gaps offline. Enforce policies in production via the AgentMesh platform.

PyPI Python License


Quick Start

1. Install

pip install useagentmesh

With framework-specific extras:

pip install useagentmesh[crewai]      # CrewAI support
pip install useagentmesh[langgraph]   # LangGraph support
pip install useagentmesh[autogen]     # AutoGen support
pip install useagentmesh[all]         # All frameworks

2. Scan Your Project (free, offline, no account needed)

agentmesh scan .
# → Governance Score: 35/100 | 8 findings | Agent BOM: 3 agents, 12 tools
# → Run `agentmesh auth login` to enable runtime governance

3. Connect to Platform (optional, enables runtime governance)

agentmesh init

This will:

  • Validate your API key
  • Generate .agentmesh.yaml config
  • Create a framework-specific middleware file
  • Enable runtime policy enforcement

4. Integrate Runtime Middleware

CrewAI

from agentmesh import with_compliance
from my_crew import MyCrew

crew = with_compliance(MyCrew())
result = crew.kickoff()

LangGraph

from agentmesh import with_langgraph_compliance

graph = with_langgraph_compliance(my_graph.compile())
result = graph.invoke(input)

AutoGen

from agentmesh import with_autogen_compliance

chat = with_autogen_compliance(my_group_chat)

Direct Client

from agentmesh import AgentMeshClient

client = AgentMeshClient.from_env()
result = client.verify_agent_identity_sync("my-agent", "researcher")

CLI Commands

Command Description Requires Account
agentmesh scan . Scan project for governance gaps No
agentmesh init Initialize runtime SDK in your project Yes
agentmesh status Check connection and quota status Yes
agentmesh verify Verify audit hash chain integrity Yes
agentmesh serve Start a local MCP compliance server Yes

Configuration

.agentmesh.yaml:

version: "1.0"
tenant_id: your_tenant_id
api_key_env: AGENTMESH_API_KEY
endpoint: https://api.useagentmesh.com
framework: crewai

tools:
  audit_log_action: true
  verify_agent_identity: true
  evaluate_policy: true

guardrails:
  prompt_injection_detection: true
  dlp_scanning: false

trust:
  enabled: true
  decay_half_life_hours: 168
  circuit_breaker_threshold: 3

Capabilities

Scan CLI (free, offline)

Capability Status Details
Governance Score ✅ Built-in 25 rules, 4 categories, deterministic evaluation
Agent BOM ✅ Built-in AST-based discovery, 6 frameworks
EU AI Act Gap Detection ✅ Built-in Art. 9, 11, 12, 14 mapping with fix snippets
SARIF 2.1.0 ✅ Built-in GitHub Code Scanning compatible
SVG Badge ✅ Built-in Embeddable governance badge

Runtime Platform (requires account)

Capability Status Details
Policy Enforcement ✅ Production Real-time evaluation on tool calls
DLP/PII Detection ✅ Production Presidio-based, 8+ entity types, anonymization
Circuit Breaker ✅ Production State machine + EigenTrust scoring
Audit Trail ✅ Production SHA-256/BLAKE3 hash chain + digital signatures
Trust Score ✅ Production 0-100 dynamic score per agent
OTEL Export 🔜 Next Sprint OpenTelemetry semantic conventions

Environment Variables

Variable Description Required
AGENTMESH_API_KEY Your API key (for runtime features) For platform
AGENTMESH_ENDPOINT Custom backend URL No
AGENTMESH_TENANT_ID Override tenant ID No

Development

git clone https://github.com/agentmesh/agentmesh-python.git
cd agentmesh-python
pip install -e ".[dev]"
pytest

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

useagentmesh-0.7.2.tar.gz (123.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

useagentmesh-0.7.2-py3-none-any.whl (113.0 kB view details)

Uploaded Python 3

File details

Details for the file useagentmesh-0.7.2.tar.gz.

File metadata

  • Download URL: useagentmesh-0.7.2.tar.gz
  • Upload date:
  • Size: 123.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for useagentmesh-0.7.2.tar.gz
Algorithm Hash digest
SHA256 94657fabaef3558c9c14cafb9b1843fe5f7c6008f4589202f0963b5ab9d157a0
MD5 671af487bb582a4889d6698cca74a74a
BLAKE2b-256 53deca9fee165294f99001e4d5ad6bddfed7c8d8c330d817e15ede59f2d96d29

See more details on using hashes here.

File details

Details for the file useagentmesh-0.7.2-py3-none-any.whl.

File metadata

  • Download URL: useagentmesh-0.7.2-py3-none-any.whl
  • Upload date:
  • Size: 113.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for useagentmesh-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0ae61485592029f4edf5925ec9d0d9eb6dd471fea8753e8b7e44376c78a1b35c
MD5 ed3884e496a68d9e5a3dbe01b3edf24a
BLAKE2b-256 ead3af294a12608c4b08e3930568a1ab17adefa6ac8df72921e7557fd0f5cc83

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page