Skip to content

feat(examples): add TrustBoost PII Sanitizer x402 example — autonomou…#1244

Open
teodorofodocrispin-cmyk wants to merge 2 commits into
coinbase:mainfrom
teodorofodocrispin-cmyk:feat/add-trustboost-pii-sanitizer-example
Open

feat(examples): add TrustBoost PII Sanitizer x402 example — autonomou…#1244
teodorofodocrispin-cmyk wants to merge 2 commits into
coinbase:mainfrom
teodorofodocrispin-cmyk:feat/add-trustboost-pii-sanitizer-example

Conversation

@teodorofodocrispin-cmyk
Copy link
Copy Markdown

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

  • Added documentation to all relevant README.md files

@cb-heimdall
Copy link
Copy Markdown

cb-heimdall commented May 22, 2026

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@github-actions github-actions Bot added documentation Improvements or additions to documentation example New example agent python labels May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation example New example agent python

Development

Successfully merging this pull request may close these issues.

2 participants