Open-Source Article 12 Logging Library for EU AI Act Compliance

What This Is
An open-source TypeScript library that provides Article 12-compliant logging infrastructure for AI systems affected by the EU AI Act. It's specifically designed for Node.js applications using the Vercel AI SDK.
Key Details
The library addresses the EU AI Act's Article 12 requirements, which take effect in August 2024 and mandate automatic event recording with six-month retention for high-risk AI systems. Legal commentators have interpreted this as requiring append-only ledger functionality rather than standard application logging.
The implementation includes:
- Middleware that wraps AI models to capture every inference call
- Structured JSONL logging to your own S3 bucket or local filesystem
- SHA-256 hash chaining between entries for tamper detection
- Automatic enforcement of 180-day retention minimum
- CLI tool to reconstruct specific decisions and verify log integrity
- Coverage command that identifies potential logging gaps (omissions are noted as a bigger practical risk than edits)
The library is deliberately simple in design: TypeScript-based, targeting Vercel AI SDK middleware, supporting S3 or local filesystem storage, and using linear hash chaining. It also works with the Mastra agentic framework, and the maintainer welcomes PRs to expand integrations.
As noted in the HN discussion, the library provides tamper-evident logging rather than tamper-proof protection. It detects modification but doesn't prevent wholesale chain reconstruction by someone with storage access. The design assumes defense-in-depth with S3 Object Lock (Compliance mode) at the infrastructure layer and hash chain verification at the application layer. External timestamping (like OpenTimestamps or RFC 3161) could be added as an optional feature for independent temporal anchoring.
According to the developer's regulatory interpretation, Article 12 requires "automatic recording" that enables monitoring and reconstruction, with current guidance not mandating tamper-proof storage—only trustworthy, auditable records.
📖 Read the full source: HN LLM Tools
👀 See Also

Open-Foundry: A Framework for Multi-Agent Debates with Claude Code
Open-foundry is a Python framework that assembles multiple Claude Code agents into a panel to debate complex questions, producing fully inspectable reasoning trails with transcripts, orchestrator logs, and per-agent working notes.

MCP Server for Italian Train Data: Real-Time Delays, Departures, and Schedules in Claude
A developer built an unofficial MCP server for Trenitalia that provides five tools for querying Italian train data through Claude, including real-time departure/arrival boards, train tracking, and schedules with live delay enrichment.

Time Complexity MCP: Static Analysis Tool Feeds Big-O Complexity to AI Coding Agents
Time Complexity MCP is an open-source MCP server that performs static code analysis to detect Big-O complexity, feeding the results directly to AI coding agents like Claude Code or Copilot without token consumption. It supports JavaScript, TypeScript, Python, Java, Kotlin, and Dart.

Windows System Tray Monitor for Claude Code Quota
A Windows system tray application that monitors Claude Code usage with a color-coded icon, auto-refreshes quota data every 5 minutes via Anthropic's OAuth API, and provides detailed dashboards showing hourly, daily, weekly, and monthly usage patterns.