
Shipped runtime contracts + a versioned audit registry for n8n workflow governance - no contract.yaml required anymore
Been building agent-contracts - a governance layer for n8n workflows - for a while. Just shipped two things worth sharing here since a few people asked about the n8n implementation last time.
What shipped :
- Runtime declarations - no contract.yaml file required
Previously every n8n workflow needed a hand-written contract.yaml. That falls apart for dynamic workflows or third-party integrations. Now you can declare governance at runtime:
enforcer = ContractEnforcer.from_declaration({
"node_id": "email-sender-v1",
"permissions": ["email.read", "email.draft"],
"side_effects": ["email.send"],
"approval_points": ["email.send"],
"lifecycle": "triggered"
})
Same enforcement. Same audit log. Same gate behavior. No file needed. Any agent without a declaration defaults to read-only with explicit approval required on every action.
- Contract Registry - versioned, permanent, queryable
Every contract that loads registers into an append-only versioned store.
registry = ContractRegistry()
enforcer.register(registry)
# Query exactly which contract version was active at any timestamp
entry = registry.get_at_time(
"email-sender-v1",
"2026-09-10T14:30:00Z"
)
Old versions are never deleted. The audit trail is always complete.
- Cryptographic sealing
Every contract is hashed on load. If the contract.yaml gets edited after the workflow starts, ContractTamperError fires and the workflow stops rather than silently running under modified rules.
What's in the repo
Three n8n implementations: duplicate issue detector, competitor changelog watcher, job application rejection detector - all with contract.yaml files, scyvera enforcement, and the gateway layer wired in. 128 tests passing. MIT licensed. (22 ⭐ | 6 Forks )
GitHub: github.com/Skull-boy/agent-contracts - pip install scyvera
Happy to answer questions about wiring this into existing n8n workflows or adapting the contract schema for specific use cases.