What is Truslay?
Truslay is not a payment gateway (it is not "Trustly") and it is not a probabilistic text filter. It is a local-first, 8-layer deterministic pipeline that decides what an autonomous AI agent is allowed to do before the tool call runs, blocks the call when the answer is no, and signs the decision so it can be proven afterwards.
Most guardrails inspect a prompt and hope the model behaves. Truslay removes the decision from the model's hands.
Truslay is an independent deterministic execution and audit layer for AI agents. It is not affiliated with Trustly (payments) or TrustLayer (insurance verification). Any similarity in name is coincidental.
What it is, and what it is not
| Truslay is | Truslay is not |
|---|---|
| A deterministic policy engine evaluated before execution | A prompt filter that scores text and hopes |
| Fail-closed: no decision means no execution | A fail-open suggestion to the model |
| A local-first runtime with no network dependency for layers 1–6 | A proxy that needs the cloud to protect an agent |
| A signed, append-only record of every verdict | A mutable log table someone can edit |
| Two halves: Sovereign Edge (SDK) + Trust Core (Firewall) | A wrapper around a model provider |
The 8-layer deterministic pipeline
| # | Layer | What it does | Runs in |
|---|---|---|---|
| 01 | Signal | Intercepts the agent's intent before any tool is called; normalizes action, actor and payload. | SDK |
| 02 | Lattice | Evaluates the intent against the policy graph: limits, whitelists, roles, dual approval. | SDK |
| 03 | Shield | Applies domain rules (finance, HR, health-PII, legal, cyber, DevOps, commerce, support, booking). | SDK |
| 04 | Gate | Enforces the verdict at system level: the tool call is blocked, not "advised against". | SDK |
| 05 | Seal | Signs the decision locally with a cryptographic signature so the verdict cannot be altered later. | SDK |
| 06 | Ledger | Records the sealed decision in the local append-only ledger, available offline. | SDK |
| 07 | Anchor | Anchors ledger roots on a decentralized network for immutable, third-party-verifiable audit. | Firewall |
| 08 | Prism | Fleet observability: dashboards, policy analytics, human audit and evidence export. | Firewall |
Layers 1 to 6 are the sovereign edge: they run inside your process and never wait for a network round trip. Layers 7 and 8 are the trust core: they turn local decisions into fleet-wide, immutable evidence.
Read the full breakdown in The 8 layers.
Why deterministic matters
An LLM-based guardrail is a second model guessing about the first one. It is probabilistic, prompt-injectable, and it fails open when it is unsure. Truslay evaluates the intent against a policy graph instead:
- The same intent, actor and payload against the same policy graph produce the same verdict, every time.
- The decision carries a reason code (
policy_denied,self_grading_detected,firewall_unavailable, …) instead of a similarity score. - If the engine cannot decide, the Gate blocks. Availability never widens permissions.
SDK (Sovereign Edge) vs Firewall (Trust Core)
Truslay ships as two complementary halves.
The SDK — @truslay/sdk — is the Sovereign Edge. It is a local library
that lives in your code, intercepts the agent's actions, evaluates policies and
blocks execution fail-closed. It covers layers 1 to 6 in under a millisecond
and needs no internet to protect the agent.
The Firewall is the Trust Core. It receives the hashes signed by the SDK, chains them into an immutable ledger, anchors the root on a decentralized network and exposes the Prism dashboard for human oversight. It governs and notarizes; it does not sit in the hot path of every tool call.
| SDK — Sovereign Edge | Firewall — Trust Core | |
|---|---|---|
| Runs where | Inside your process | Your control plane + decentralized ledger |
| Layers | 1–6 | 7–8 |
| Latency | Under 1 ms, offline | Asynchronous anchoring and reporting |
| Blocks execution | Yes, physically | No, it governs and observes |
| Owns | Enforcement, local signature | Fleet policy, immutable audit, dashboards |
Continue with SDK vs Firewall, or jump straight to the quick start.