xEcho: AI Influence Provenance Tracking
Cryptographically attributable decision audit trails you can integrate into your applications. Track every influence, verify every decision, satisfy every regulator.
AI decisions are opaque. xEcho makes them auditable.
When an AI agent makes a decision—approve a loan, flag fraud, recommend treatment—regulators ask: How did it reach that conclusion? xEcho answers with cryptographic proof.
xEcho creates a hash-chained, Ed25519-signed audit trail linking each AI decision to every influence that contributed to it:
- User inputs — what the human asked
- System prompts — instructions given to the AI
- Tool calls — external APIs invoked
- Retrieval — knowledge base queries
- Model outputs — what the LLM suggested
- External APIs — third-party data sources
- Human feedback — approval or override
AI Decision Opacity Creates Regulatory Risk
AI agents make thousands of decisions daily. Without provenance tracking, compliance teams cannot answer basic regulatory questions.
Regulatory Failures Without Provenance
What Regulators Demand
| Requirement | Regulation | Without xEcho |
|---|---|---|
| Audit trail of AI decisions | SOC 2 (CC6.1) | No record of influences |
| Electronic signatures | FDA 21 CFR Part 11 | No cryptographic attribution |
| Event logging with integrity | ISO 27001 (A.12.4.1) | Logs can be tampered |
| Right to explanation | GDPR Article 22 | Cannot explain decision path |
How It Works
xEcho uses three cryptographic layers to create tamper-evident audit trails: content hashing, hash chain linking, and Ed25519 signatures.
Layer 1: Content Hashing (SHA-256)
Every influence and decision is hashed:
// Hash every influence const contentHash = SHA256(influence.content); // Hash the decision const decisionHash = SHA256(decision); // Any modification breaks verification if (computedHash !== storedHash) { throw ProvenanceError('HASH_MISMATCH'); }
Layer 2: Hash Chain Linking
Each record links to the previous via its hash:
const recordHash = SHA256( recordId || agentId || decision || decisionHash || timestamp || influences.map(i => i.contentHash).sort().join() || previousHash ); record[N].previousHash = record[N-1].recordHash; // Any insertion/deletion/reordering breaks the chain
Layer 3: Ed25519 Signatures
Each record is signed by the agent:
// Agent signs the record hash const signature = await Ed25519.sign(recordHash, privateKey); // Verifier checks signature const isValid = await Ed25519.verify( recordHash, signature, publicKey ); // Only the agent with the private key could create this record
Verification Process
Chain verification checks four properties:
- Hash integrity: Each record's hash matches its computed hash
- Chain continuity: Each record's previousHash points to actual previous record
- Content integrity: All influence contentHashes match computed hashes
- Signature validity: All signatures verify with agent's public key
Compliance Mapping
xEcho satisfies audit trail requirements across four major regulatory frameworks.
| Framework | Control | How xEcho Satisfies |
|---|---|---|
| SOC 2 | CC6.1 (Monitoring) | Complete audit trail of all AI decisions with cryptographic integrity |
| ISO 27001 | A.12.4.1 (Event logging) | Tamper-evident logs with hash chain linking |
| FDA 21 CFR Part 11 | 11.10(d) Electronic signatures | Ed25519 signatures on every provenance record |
| GDPR | Article 22 (Automated decision-making) | Right to explanation via full influence chain |
SOC 2 Type II Example
Auditor asks: "How do you monitor AI decisions?"
// Query all fraud detection decisions in audit period const records = await queryProvenance({ agentId: 'fraud-detector', startTime: new Date('2024-01-01'), endTime: new Date('2024-12-31'), }); // Verify chain integrity const chain = await verifyChain('fraud-detection-2024'); // Export for auditor const auditExport = await exportForAudit(chainId, exportKey); // auditExport.metadata.recordCount: 147,293 // auditExport.chain.isValid: true
FDA 21 CFR Part 11 Example
Diagnostic AI treatment recommendation with electronic signature:
await recordProvenance( 'Recommend azithromycin (AVOID penicillin - allergy)', [ { type: 'user_input', content: 'Patient symptoms' }, { type: 'retrieval', content: 'Medical history + allergies' }, { type: 'system_prompt', content: 'Clinical guidelines' }, { type: 'model_output', content: 'Diagnostic model result' }, ], { requiresPhysicianApproval: true, allergyConsidered: 'penicillin' } ); // Ed25519 signature = electronic signature per 21 CFR 11.10(d)
Use Cases
Finance: Fraud Detection Audit Trail
Track every influence that contributed to fraud decisions:
await recordProvenance( 'Transaction flagged as fraud - BLOCKED', [ { type: 'external_api', content: JSON.stringify({ transactionId: 'TXN-001', amount: 50000, location: 'Nigeria' }) }, { type: 'retrieval', content: JSON.stringify({ averageTransaction: 500, typicalLocations: ['USA', 'Canada'] }) }, { type: 'model_output', content: JSON.stringify({ fraudScore: 0.87, factors: ['100x average', 'Unusual location'] }) } ], { action: 'BLOCK' } );
Healthcare: Treatment Recommendation Audit
HIPAA-compliant audit trail for diagnostic AI:
await recordProvenance( 'Recommend antibiotic treatment (avoid penicillin)', [ { type: 'user_input', content: 'Persistent cough, fever 101°F' }, { type: 'retrieval', content: 'Medical history: penicillin allergy' }, { type: 'system_prompt', content: 'Clinical guideline: CAP protocol' }, { type: 'model_output', content: 'Diagnosis: pneumonia (conf: 0.82)' } ] );
Autonomous Systems: Black-Box Recorder
GDPR Article 22 compliance for autonomous decision-making:
await recordProvenance( 'EMERGENCY BRAKE ACTIVATED', [ { type: 'external_api', content: JSON.stringify({ sensor: 'lidar', obstacleDistance: 15, speed: 60 }) }, { type: 'external_api', content: JSON.stringify({ sensor: 'camera', objectType: 'pedestrian', confidence: 0.94 }) }, { type: 'model_output', content: JSON.stringify({ action: 'EMERGENCY_BRAKE', collisionProbability: 0.89, decisionTime: '47ms' }) } ] );
Integration Guide
Quick Start
npm install @private.me/xecho
import { initializeProvenance, recordProvenance, generateKeypair, SQLiteProvenanceStore, } from '@private.me/xecho'; // Initialize const keypair = await generateKeypair(); const store = new SQLiteProvenanceStore('./provenance.db'); await initializeProvenance({ store, agentId: 'my-agent', privateKey: keypair.privateKey, publicKey: keypair.publicKey, }); // Record decision await recordProvenance( 'Decision made', [{ type: 'user_input', content: 'User request' }] );
LangChain Integration
import { ProvenanceCallbackHandler } from '@private.me/xecho'; const handler = new ProvenanceCallbackHandler(); const chain = new LLMChain({ llm: new OpenAI(), callbacks: [handler], }); // All LLM calls automatically tracked await chain.call({ input: 'Analyze this transaction' });
Agent SDK Integration
import { wrapWithProvenance } from '@private.me/xecho'; import { connect } from '@private.me/xlink'; const agent = await connect('my-agent'); const tracked = wrapWithProvenance(agent, 'agent-id'); // All send/receive operations tracked await tracked.send({ to: 'other-agent', payload: data });
API Reference
Simple, Transparent Pricing
All Private.Me ACIs follow the same pricing structure: 3-month trial, then $5/$10/$15 per month.
| Tier | Features | Price |
|---|---|---|
| Basic | Up to 10K records/month, SQLite storage, email support | $5/month |
| Middle | Up to 100K records/month, PostgreSQL storage, priority support | $10/month |
| Enterprise | Unlimited records, HA storage, dedicated support, SLA | $15/month |