idprova-agents
Verifiable, scope-gated tool execution for AI agent frameworks.
idprova-agents wraps your agent's tool calls with a scope gate (the agent
may only call tools its delegation token permits) and writes a signed,
hash-chained receipt for every call — allowed or denied. Receipts verify
independently with the idprova CLI (idprova receipt verify receipts.jsonl),
so the audit trail does not depend on trusting the agent or this library.
Part of the IDProva project.
Install
Not yet on PyPI. Install from the repository:
pip install "idprova-agents[langchain] @ git+https://github.com/techblaze-au/idprova#subdirectory=sdks/python-agents"
Or, from a clone:
pip install "./sdks/python-agents[langchain]"
Quickstart
See examples/langchain/quickstart.py
for a runnable end-to-end demo (allow an in-scope tool, block an out-of-scope
tool, emit verifiable receipts).
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey
from langchain_core.tools import Tool
from idprova_agents import ToolGuard, guarded_tool
SCOPES = {"knowledge_base_search": "mcp:tool:knowledge-base:read"}
guard = ToolGuard(
aid="did:aid:co:support-agent",
dat="dat-...",
signing_key=Ed25519PrivateKey.generate(),
scope_for_tool=lambda name: SCOPES.get(name, "mcp:tool:unknown:none"),
granted_scopes=["mcp:tool:knowledge-base:read"],
receipts_path="receipts.jsonl",
)
kb = guarded_tool(Tool.from_function(
func=your_kb_search, name="knowledge_base_search", description="Search the KB"), guard)
kb.invoke("quantum computing") # runs + writes a "success" receipt
What's included
ToolGuard— scope check + signed receipt emission.guarded_tool()— wrap a LangChainToolso its execution is scope-gated.IDProvaGuardCallbackHandler— LangChain callback handler (enforce or audit-only).
Adapters for additional frameworks (CrewAI, AutoGen) are planned as optional extras.
Licence
Apache-2.0.
Metadata
Release files for idprova-agents 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| idprova_agents-0.1.0.tar.gz | 10.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| idprova_agents-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.7 kB
Release files / idprova_agents-0.1.0.tar.gz
| Download URL | idprova_agents-0.1.0.tar.gz |
|---|---|
| Size | 10.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fec9236e21dad2f8887233e5074760db1731b5ffa28059e3d9a00b677d6cc1fa
|
|
BLAKE2b-256 checksum How to use checksums |
b1bc206109d81c8df4d06d6d8177ee946dd04c99e947821963ddfd4c10c60abc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / idprova_agents-0.1.0-py3-none-any.whl
| Download URL | idprova_agents-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ee5b036d8693daa2fa2286fba33b85c8f005b8f003af521ca2a9069809d7f6d0
|
|
BLAKE2b-256 checksum How to use checksums |
f8367019233cd8fa2aa143aacb2a67d10ad4300a53d4e6e42c1b0657c8ef96d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|