@inviolet/agent-sdk-core is the canonical Node client. It exposes one
Inviolet object that wraps the gateway’s mandate + decision endpoints, so you
mint a mandate once and guard every tool call against it.
Framework wrappers (Anthropic, OpenAI,
LangChain, LlamaIndex,
fetch, MCP client) all delegate to this
package and expose the same Inviolet client.
Install
Construct the client
Mint a mandate
mintMandate() wraps POST /v1/mandate/dispense. The requested scope must be a
subset of the intent card’s allowed scope, or the gateway refuses with a
suggested narrower scope.
Guard a tool call
guard() runs the decision engine against the mandate + the action and returns
a normalized verdict.
verdict.action is one of 'proceed' | 'request_approval' | 'step_up' | 'reroute' | 'block'. Prefer inviolet.assert(...) if you’d rather throw on
deny and skip the branch.
Config options
Verifying mandates yourself
Downstream services can verify a mandate against the gateway’s published JWKS without calling back:Read next
- Mandates — the JWT format and lifecycle
- Python / REST — the language-agnostic HTTP flow
- Quickstart — the full end-to-end walkthrough