{"slug": "how-i-built-tamper-proof-audit-trails-for-ai-decisions-in-net", "title": "How I built tamper-proof audit trails for AI decisions in .NET", "summary": "A developer has released AiTrace.NET, an open-source .NET library that creates tamper-proof audit trails for AI decisions by hashing each record and chaining it to the previous one. The library, available as a NuGet package, targets teams in regulated industries needing cryptographic proof of AI outputs. Future Pro features include RSA-SHA256 signatures and compliance reports.", "body_md": "Every time your app calls an LLM, a question hangs in the air: if something goes wrong, can you prove exactly what happened?\n\nNot a log file. Not a database record someone could edit. Actual cryptographic proof.\n\nThat is the problem I built AiTrace.NET to solve.\n\nThe problem with regular logging\n\nApplication logs are great until they become evidence. A log file can be edited, deleted, or backdated. When a client disputes an AI-generated output, a timestamp in a database means nothing without proof of integrity.\n\nWhat AiTrace does differently\n\nEach decision record gets SHA-256 hashed. The hash of the previous record is embedded in the next one, creating a chain. Break the chain by modifying or removing any record, and verification fails immediately.\n\n``` js\n// 1. Register in ASP.NET Core\nbuilder.Services.AddAiTrace(o =>\n{\n    o.StoreContent = true;\n    o.BasicRedaction = true;\n});\n\n// 2. Inject and log a decision\npublic class DecisionService(IAuditStore store)\n{\n    public async Task LogAsync()\n    {\n        await store.LogDecisionAsync(new AiDecision\n        {\n            Prompt = \"Summarize the contract.\",\n            Output = \"The contract covers...\",\n            Model = \"gpt-4o\",\n            UserId = \"user-42\"\n        });\n    }\n}\n```\n\nOne NuGet package. No external service. No database required. Records are plain JSON files in a local folder you control.\n\n`dotnet add package AiTrace --prerelease`\n\nWho this is for\n\nAny .NET team using LLMs in a context where auditability matters: legal tech, fintech, healthcare, insurance, or any regulated space where \"the AI said so\" is not an acceptable answer.\n\nWhat is next\n\nThe Pro tier adds RSA-SHA256 signatures per record, compliance reports, and sealed evidence bundles ready for legal review.\n\nThe core package is MIT, open source, and free forever.\n\nGitHub: [https://github.com/aitrace-dotnet/AiTrace.NET](https://github.com/aitrace-dotnet/AiTrace.NET)\n\nNuGet: [https://www.nuget.org/packages/AiTrace/0.1.0-preview.10](https://www.nuget.org/packages/AiTrace/0.1.0-preview.10)\n\nDocs: [https://aitrace-dotnet.github.io/AiTrace.NET/](https://aitrace-dotnet.github.io/AiTrace.NET/)", "url": "https://wpnews.pro/news/how-i-built-tamper-proof-audit-trails-for-ai-decisions-in-net", "canonical_source": "https://dev.to/aitracedev_21/how-i-built-tamper-proof-audit-trails-for-ai-decisions-in-net-429i", "published_at": "2026-08-13 14:31:32+00:00", "updated_at": "2026-08-13 14:49:33.527779+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "artificial-intelligence"], "entities": ["AiTrace.NET", "NuGet", "GitHub", "ASP.NET Core", "SHA-256", "RSA-SHA256"], "alternates": {"html": "https://wpnews.pro/news/how-i-built-tamper-proof-audit-trails-for-ai-decisions-in-net", "markdown": "https://wpnews.pro/news/how-i-built-tamper-proof-audit-trails-for-ai-decisions-in-net.md", "text": "https://wpnews.pro/news/how-i-built-tamper-proof-audit-trails-for-ai-decisions-in-net.txt", "jsonld": "https://wpnews.pro/news/how-i-built-tamper-proof-audit-trails-for-ai-decisions-in-net.jsonld"}}