feat(examples): add TrustBoost PII Sanitizer x402 example — autonomou…#1244
Open
teodorofodocrispin-cmyk wants to merge 2 commits into
Open
Conversation
…s agent pays for PII sanitization on Solana
🟡 Heimdall Review Status
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a Python example showing how an AgentKit agent autonomously pays for PII sanitization via x402 on Solana — no human intervention required.
The agent discovers TrustBoost via /.well-known/agent-card.json, calls /sanitize without payment, receives HTTP 402 with x402 payment instructions, pays 149 USDC from its CDP wallet on Solana, and receives sanitized text + verifiable on-chain proof of sanitization.
This addresses a critical gap for agents processing user data before sending to LLMs — required for GDPR, LGPD, and EU AI Act compliance (enforcement: August 2, 2026).
Tests
Chatbot: python/examples/trustboost-pii-sanitizer/agent.py
Network: Solana Mainnet (TRIAL mode for testing)
Setup: export TRUSTBOOST_TRIAL=true
Prompt: python agent.py
[TrustBoost] Discovered: TrustBoost PII Sanitizer v2.6.0
[Mode] TRIAL (50 free)
[English]
Input: Contact John at john@example.com, SSN: 123-45-6789
Output: Contact [REDACTED] at [REDACTED], SSN: [REDACTED]
Score: 0.85 | Risk: CRITICAL
[Spanish LATAM]
Input: Cliente Juan Lopez, RFC: LOPJ850101ABC
Output: Cliente [REDACTED], RFC: [REDACTED]
Score: 0.6 | Risk: PRIVATE
[Japanese]
Input: 田中太郎、マイナンバー:123456789012
Output: [REDACTED]、マイナンバー:[REDACTED]
Score: 0.85 | Risk: CRITICAL
Health check:
curl https://api.trustboost.dev/health
→ {"status":"ok","version":"2.6.0"}
Checklist