Skip to main content

Approvals

The Approvals packages put an agent's tool calls under your organisation's policy. Each call goes through the same four steps:

  1. Decide. Before the agent runs a tool, it asks whether the call is allowed. The answer is allow, deny or step_up.
  2. Pause for a person. A step_up opens an approval, and the call waits until a person approves or rejects it.
  3. 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.
  4. 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​

PackageWhat it does
@noblecloak/specThe API contract: the OpenAPI document, the mock server (nc-mock) and a conformance suite (nc-conform).
@noblecloak/clientA typed client for the API, including the helpers that digest arguments and verify an approval before it is used.
@noblecloak/reactReact 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/langgraphAn 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/cliThe noblecloak command line, for creating, rotating and revoking your organisation's service principals and writing the credential file an agent loads.
@noblecloak/policy-formatsConverts 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​