mycelium-agt
Community plugin for the Agent Governance Toolkit (AGT) EvidenceAnchor SPI, backed by Mycelium Trails on Arbitrum.
Evidence hashes are written as immutable trail records via the public argentum.rgiskard.xyz API. Once anchored, records cannot be modified or deleted.
Install
pip install mycelium-agt
Usage
from mycelium_agt import MyceliumAnchor
anchor = MyceliumAnchor(agent_id="my-agent")
# Anchor an evidence hash
receipt = anchor.anchor(
evidence_hash="sha256:abc123...",
metadata={"action_type": "file:write", "scope": "audit"},
)
print(receipt.anchor_id) # trail_id in Mycelium Trails
print(receipt.anchored_at) # RFC 3339 UTC timestamp
# Verify later
result = anchor.verify("sha256:abc123...", receipt)
print(result.status) # AnchorVerifyStatus.VERIFIED
print(result.inclusion_proof.proof_data["tx_hash"])
How it works
MyceliumAnchor implements the AGT EvidenceAnchor abstract class:
-
anchor(evidence_hash, metadata)— POSTs a trail record tohttps://argentum.rgiskard.xyz/trails. Returns anAnchorReceiptwith atrail_idand deterministicaction_ref(RFC 8785 JCS + SHA-256). -
verify(evidence_hash, receipt)— Confirms the hash viaGET /trails/verify?action_ref=...(or falls back toGET /trails/{trail_id}). Returns anAnchorVerifyResultwith statusVERIFIED | NOT_FOUND | HASH_MISMATCH | BACKEND_UNAVAILABLEand an Arbiscan inclusion proof.
Registration with AGT
from mycelium_agt import MyceliumAnchor
# Register with the AGT evidence registry
agt_registry.register("mycelium", MyceliumAnchor(agent_id="my-agent"))
Metadata keys
All optional:
| Key | Default | Description |
|---|---|---|
agent_id |
instance agent_id |
Override per-call |
action_type |
"agt:evidence_anchor" |
Semantic label for the action |
scope |
"agt-evidence" |
Trail scope |
parent_trail_id |
— | Link to parent trail |
root_trail_id |
— | Link to root of a trail chain |
action_ref
Each anchored record gets a deterministic action_ref:
SHA-256(JCS({"agent_id": ..., "action_type": ..., "scope": ..., "timestamp": ...}))
This allows re-derivation and cross-system verification without trusting the receipt alone.
Failure semantics
anchor() raises RuntimeError on network failure. The AGT runtime applies mode semantics (enforce / queue / best_effort). verify() never raises — it returns BACKEND_UNAVAILABLE on network errors.
License
Apache 2.0
Metadata
Release files for mycelium-agt 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mycelium_agt-0.1.1.tar.gz | 11.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mycelium_agt-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.6 kB
Release files / mycelium_agt-0.1.1.tar.gz
| Download URL | mycelium_agt-0.1.1.tar.gz |
|---|---|
| Size | 11.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
079f0f22d77ff3b6f0b7ffcf1ceec149d6f5201b8b4fa247349f77097299a37d
|
|
BLAKE2b-256 checksum How to use checksums |
17dbe74c00719de3dc49b3a6ab258932a56389ddfdcaa1c4a1db1c2fa9f7552a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / mycelium_agt-0.1.1-py3-none-any.whl
| Download URL | mycelium_agt-0.1.1-py3-none-any.whl |
|---|---|
| Size | 13.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a543185554e977e4090d9371f0575b382aa9a7fa151368f9c5dc3eaecb90c816
|
|
BLAKE2b-256 checksum How to use checksums |
fe60619f264fbe2f5c58bd1e20acbe34327c0aa5b9a40fb8270a3d5ff3b3777f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|