Skip to main content

mintid-agent

The MintID agent client for Python: the agent runtime's side of an agent credential. An agent credential proves that a person, verified at an issuer, delegated this agent to pay this kind of counterparty within stated bounds, and nothing about who that person is. The client obtains the credential from an agent offer, keeps its witnesses current, answers a seller's identity requirement inside an x402 payment flow, and refuses, before anything is sent or paid, whatever the delegation does not cover.

It carries no cryptography of its own: proofs come from the MintID holder library (mintid-proof-core), signatures from a signer you inject.

Where it fits

MintID is a network for verifiable, human-backed identity. Accepted issuers verify people and issue the credentials; the chain publishes their status roots, their bonds and the registries; each verifier decides on its own service. MintID itself issues nothing, certifies nothing and verifies nobody.

The agent client runs in your own infrastructure, and its keys never leave it: the credential's private bytes go only to the credential store you inject (encryption at rest is yours), and the request-signing key stays behind the signer you inject. The operator who mints the agent, not the agent, decides the delegation.

Install

pip install mintid-agent              # Python 3.12 or later
pip install "mintid-agent[ed25519]"   # with the software Ed25519 signer

It depends on mintid-proof-core, which compiles the Rust proof core in; where no wheel matches your platform, pip builds it from source with a Rust toolchain. Version 0.1.0, published from the main repository, https://gitlab.com/mintid/mintid (sdk/python/mintid-agent).

Example

from mintid_agent import AgentClient
from proof_core.holder import urllib_transport

# offer: the agent offer the operator made; principal: the principal's
# identity credential (a proof_core.holder.Holder); store: your CredentialStore.
agent = AgentClient.issue_from_offer(offer, principal, transport=urllib_transport(), store=store)

agent.refresh()                        # the status witness, then the scope log
envelope = agent.present(challenge)    # or refuses, naming what the delegation cannot satisfy
result = agent.pay(url, payer=payer)   # one paid request; your payer builds the payment header

The same client renews the credential from a renewal offer and holds the agent's kill switch: holder self-revocation, submitted through a privacy relay and confirmed against the chain.

Where to test

On the public testnet and its KYC sandbox, and only there: check the status line of its page first. Nothing minted on it carries weight. The single-node production chain is not for third parties and is never a place to test.

Licence

Apache License 2.0 (LICENSE, NOTICE). Author: Marc Molas.


This repository

This is a read-only mirror of sdk/python/mintid-agent of the MintID source tree, https://gitlab.com/mintid/mintid, and is published from it: each publication replaces its content, and nothing is merged here. Issues and merge requests go to the main project, https://gitlab.com/mintid/mintid/-/issues; a vulnerability goes privately to the address in its SECURITY.md, never to a public issue. Licence: Apache License 2.0 (LICENSE and NOTICE); contributions follow the main project's CONTRIBUTING.md.

Package: mintid-agent (Python >= 3.12). It depends on mintid-proof-core, the Python bindings of the Rust proof core and holder library, whose source is identity-proof-core/python of the main repository. To work here against the proof core of the same revision, build it from a clone of the main repository (pip install ./identity-proof-core/python, with a Rust toolchain), then install this package (pip install -e ".[ed25519]").

Metadata

Release files for mintid-agent 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 mintid-agent 0.1.0
File Size Uploaded
mintid_agent-0.1.0.tar.gz 30.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mintid-agent 0.1.0
File Interpreter ABI Platform
mintid_agent-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 58.8 kB

Release files / mintid_agent-0.1.0.tar.gz

Download URL mintid_agent-0.1.0.tar.gz
Size 30.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3115a3a7295e07ae94278198a242080b17d0c67c1c56a6efc816c2a57d7e7ea7
BLAKE2b-256 checksum
How to use checksums
9afd68e635d5c0a2e8b607df8427b08542d53dcb75f30aaee63b06267f4d79b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.15

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

Download URL mintid_agent-0.1.0-py3-none-any.whl
Size 28.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c6f5094c3c6758add85ffd8f6bfa133c0c845381fa3e9e36f08f3f0cc82595c
BLAKE2b-256 checksum
How to use checksums
98af375052cac3d9ace1f42dbaddc9e7fc78fd62712b56c348e02db376da52b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.15

Release history Release notifications | RSS feed

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