Dify Tool Plugin for recording and verifying signed, tamper-evident evidence around consequential AI-agent decisions.
The plugin exposes six tools:
loopgrid_record_decisionloopgrid_record_actionloopgrid_record_outcomeloopgrid_submit_reviewloopgrid_get_decisionloopgrid_verify_decision
LoopGrid records evidence. It does not execute payments, refunds, transfers, account changes, or other external business actions. Use the appropriate Dify/external tool for the action, then record the resulting action/outcome in LoopGrid.
Configure:
- LoopGrid Base URL — a reachable LoopGrid deployment. HTTPS is recommended.
- Workspace ID.
- LoopGrid API Key.
For all six tools in one credential, use only the ingest, read, and review scopes. Prefer least privilege if you only need a subset.
Agent / model
-> LoopGrid Record Decision
-> explicit approval/policy workflow when required
-> external action tool
-> LoopGrid Record Action
-> observe result
-> LoopGrid Record Outcome
-> LoopGrid Verify Decision
For reliable evidence capture, place the LoopGrid tools explicitly in a Workflow/Chatflow rather than relying on an LLM to decide whether logging is optional.
The plugin sends only the fields the Dify workflow supplies to the configured LoopGrid endpoint. It does not automatically read conversations, files, environment variables, or unrelated Dify data. Record Decision defaults to redacted privacy mode.
See PRIVACY.md for details.
Requires Python 3.12 for the current plugin SDK line.
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
Copy-Item .env.example .env
# Fill REMOTE_INSTALL_URL and REMOTE_INSTALL_KEY from Dify's plugin debug UI
python -m mainpython -m unittest discover -s tests -v
python -m compileall main.py provider toolsUse the official Dify plugin CLI, not a hand-made ZIP:
dify plugin package .Before Marketplace submission, validate the generated .difypkg with Dify's marketplace validator and inspect it to ensure it contains no .env, secrets, caches, virtualenv, tests, or local logs.
This plugin uses a user-configured LoopGrid Base URL so it can work with self-hosted LoopGrid deployments. Under current Dify Marketplace rules, that is a user-controlled network destination and must be disclosed conservatively in the Marketplace PR. Do not mark it low risk merely to speed review.
loopgrid_verify_decision performs service-side verification against the connected LoopGrid deployment. For independent/offline verification of an exported evidence bundle, use loopgrid-verify separately.
Source: https://github.com/loopgridio/loopgrid-dify
Support: https://github.com/loopgridio/loopgrid-dify/issues
LoopGrid core: https://github.com/cybertechsoft/loopgrid
Apache-2.0.