Approvals
The Approvals packages put an agent's tool calls under your organisation's policy. Each call goes through the same four steps:
- Decide. Before the agent runs a tool, it asks whether the call is allowed. The answer is
allow,denyorstep_up. - Pause for a person. A
step_upopens an approval, and the call waits until a person approves or rejects it. - Consume once. When the approval is approved, the agent verifies that it covers exactly the call it is about to make, then spends it. An approval is used once and cannot be replayed.
- Record. The agent records the outcome of the call, which closes the loop.
You can try all of it against a mock server that needs no account and no credentials, then point the same code at a real deployment.
The packages
| Package | What it does |
|---|---|
@noblecloak/spec | The API contract: the OpenAPI document, the mock server (nc-mock) and a conformance suite (nc-conform). |
@noblecloak/client | A typed client for the API, including the helpers that digest arguments and verify an approval before it is used. |
@noblecloak/react | React modules for the screens people use: approvals (@noblecloak/react/approvals), permissions (@noblecloak/react/permissions), connections (@noblecloak/react/connections) and more. It brings @noblecloak/theme, the design tokens the modules use. |
@noblecloak/langgraph | An adapter that runs the whole loop for a LangGraph JS agent: it pauses the run on an approval, verifies it, consumes it and runs the tool once. |
@noblecloak/cli | The noblecloak command line, for creating, rotating and revoking your organisation's service principals and writing the credential file an agent loads. |
@noblecloak/policy-formats | Converts tool policies to and from Cedar and AGT manifests, with a report of anything a format cannot carry. |
All of them are on the public npm registry. Install the ones you need in your own project with npm or Bun:
npm i @noblecloak/client
# or
bun add @noblecloak/client
The packages alone are enough for your own code, but not for the two guides that run code, Your first
governed tool and Govern a LangGraph agent. Those run from a clone of their source repository: "from the
repository root" in either guide means the root of that clone, and each code block the guides call a snippet
is a file in the clone's docs/snippets directory.
# Your first governed tool
git clone https://github.com/NobleCloak/noblecloak-ts.git
# Govern a LangGraph agent
git clone https://github.com/NobleCloak/noblecloak-langgraph-ts.git
The source is public in those two repositories: NobleCloak/noblecloak-ts (the contract, the client, the React modules, the CLI and the policy converter, among others) and NobleCloak/noblecloak-langgraph-ts (the LangGraph adapter).
The guides
- Your first governed tool: one tool call, from ungoverned to governed, with a human approval in the middle, against the mock, from a clone of noblecloak-ts. Start here.
- What an approval covers: what a person agrees to when they approve a call, and what they do not.
- The ladder: the five modes of a tool policy, and when a call needs an approval at all.
- Propose a policy set: register an agent's tools, bind its service principal and set its policies in one approval.
- Connections: registering tool servers, and linking your own credential to one.
- Importing and exporting policies: tool policies as Cedar or AGT files.
- Govern a LangGraph agent: the same loop, run for you by the LangGraph adapter.