compliancegovernance
EU AI Act: what the August 2 deadline means for TypeScript devs
Article 9 (risk management), 13 (transparency), 14 (human oversight), 15 (accuracy), 17 (quality management), and 61 (post-market monitoring) — these six articles apply to high-risk AI systems. Here's what each requires in code.
2026-02-28 · 10 min
Read →securitysdkpatterns
Building tamper-evident audit trails with HMAC-SHA256 chains
Append-only logs aren't tamper-evident — they can be deleted or rewritten. An HMAC chain is: each event includes the hash of the previous one, so any modification breaks the entire chain. Here's how governance-sdk implements it.
governancesdk
The 7-dimension governance scoring model for AI agents
Governance score = f(auth, guardrails, observability, audit, human_oversight, compliance, identity). Each dimension 0–15 points. L0–L4 levels. Here's the full model, why we chose these dimensions, and how to move your agents from L2 to L4.
enterprisepatterns
Multi-tenant governance: isolating policies across customers
When you ship AI features to 500 customers, each one needs isolated policies, separate audit logs, and scoped analytics. The governance-sdk enterprise module provides namespace isolation with zero cross-tenant contamination.
governancepatternssdk
Designing a reliable AI agent kill switch
A kill switch sounds simple: turn off the agent. But in a distributed fleet, 'turned off' means different things to different agents. Priority 999. SIGKILL semantics. Revive without memory corruption. Here's the design.
sdkpatterns
Adding governance middleware to every Mastra agent in one line
createGovernanceMiddleware() wraps every tool call in your Mastra agent with policy enforcement, injection detection, and audit logging. Before each call. After each call. Zero code changes to your existing tools.