Skip to main content

metamynd-client

The MetaMynd/AgentSafe authorize-gate client for Python — the supported reference implementation. MAGP is language-agnostic by design: the gate verifies an Ed25519 signature over a canonical string, and nothing about that is JavaScript-specific. This is the proof, and the shortest path for a Python team that doesn't want to read the Node guard to find out what the protocol actually expects.

pip install metamynd-client
from metamynd_client import MetaMyndClient

client = MetaMyndClient.from_env()  # reads METAMYND_API / AGENT_DID / AGENT_KEY

verdict = client.authorize(
    "flight-purchase", 150,
    merchant="skyward-air",
    context={"tool": "book-flight", "riskLevel": "low"},
)

if verdict.decision == "escalate":
    # ESCALATE is a HOLD, not a denial — poll until resolved, act only on may_proceed.
    state = client.escalation_status(verdict.escalation_id)
elif not verdict.permitted:
    raise RuntimeError(f"refused: {verdict.reason_code}")

Guard a tool

from metamynd_client import MetaMyndClient, guard_tool, GovernanceBlocked

client = MetaMyndClient.from_env()

def book_flight(amount, merchant):
    ...  # your real implementation

governed_book_flight = guard_tool(
    client, "flight-purchase", book_flight,
    lambda amount, merchant: {"amount": amount, "merchant": merchant},
)

try:
    governed_book_flight(amount=150, merchant="skyward-air")
except GovernanceBlocked as refused:
    print(f"refused: {refused.verdict.reason_code}")

Works with any framework — LangGraph, the OpenAI Agents SDK, or a plain function call — because the governed step is the same everywhere: ask the gate, act only on a permit. See the LangGraph guide and the OpenAI Agents SDK guide for framework-specific examples.

Scope

This is the entry price, not a full SDK: it signs and submits authorize requests, returns the verdict, wraps a tool (guard_tool), and follows up an escalate. Local bundle evaluation, two-phase capture/void, and evidence inclusion-proof fetch all exist in the protocol and in the Node guard and are deliberately not reimplemented here — see the full comparison.

Self-test

Checks the three details that cost a Python integration a day each — key encoding, number stringification, timestamp shape — without touching the network:

python -m metamynd_client --selftest

Links

MIT licensed.

Release files for metamynd-client 0.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 metamynd-client 0.1.0
File Size Uploaded
metamynd_client-0.1.0.tar.gz 12.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for metamynd-client 0.1.0
File Interpreter ABI Platform
metamynd_client-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.8 kB

Release files / metamynd_client-0.1.0.tar.gz

Download URL metamynd_client-0.1.0.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
987337fe1728a76c118b087ce4766d707ac1f33f41505a39809a851fa6520c7d
BLAKE2b-256 checksum
How to use checksums
8b92ce89354e22cc868bdbe51dc09f3534fbf0d21828c06152ba9506d5eb630b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.

Transparency log

Release files / metamynd_client-0.1.0-py3-none-any.whl

Download URL metamynd_client-0.1.0-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5d2b24d9bfef62a8651f7bdc51627ae67656c58de2dcd9649ad1e705410f3959
BLAKE2b-256 checksum
How to use checksums
99ec7a6b402eaa86e24d2693f5d1a1813248d83b0f799f1077323427eddc100c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.1

2 release files

0.2.0

2 release files

This release

0.1.0 This release

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