Skip to content

About

AI governance SDK — intercept, audit, and add human approval to any AI agent tool call. Works with OpenAI, MCP, LangChain, CrewAI. EU AI Act compliance and other mandates.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

Repository files navigation

navige

AI governance SDK for Node.js — add human-in-the-loop approval, kill switches, and a tamper-evident audit trail to any AI agent in minutes.

npm version npm downloads License: MIT


v3.0.0 — upgrading from 2.x

This version repoints the SDK at Navige's current platform (the earlier 2.x releases called an API surface retired in a backend rebuild and would fail against the real service). intercept() keeps the same return shape and call pattern — most code needs no changes. What did change:

  • The OpenAI-proxy option is gone. There is no /v1 passthrough on the current platform — Navige.openai() now throws. Govern the tool call itself with intercept() instead (see below).
  • agentName and reason on intercept()'s options are now ignored (an API key identifies exactly one agent already; there's no separate reason field on the current platform).
  • forwardTo is removed — Navige never executes an action on your behalf. Check result.allowed and call your own tool/API yourself.
  • getLogs, exportLogs, getStats, getRules, createRule, deleteRule, getBlockedTools, blockTool, unblockTool, getPendingApprovals, decide, getNotifications, updateNotifications now throw NavigeError — this whole surface moved into the dashboard at app.navige.ai and isn't available over an API key.
  • Navige.mcpUrl() now returns a /mcp URL (Streamable HTTP), not the retired /sse endpoint.
  • New: pass { wait: false } to intercept() for a non-blocking approval flow, and poll getApprovalStatus(approvalId) yourself instead of waiting up to 5 minutes synchronously.

What is Navige?

When an AI agent calls a tool — sends an email, writes to a database, approves a wire transfer — Navige intercepts that action before it executes, evaluates it against your governance rules, and either:

  • Allows it (logs to audit trail)
  • Blocks it (kill switch or rule match)
  • Holds it for human approval (notifies via email, Slack, or a generic webhook to Teams/Discord/PagerDuty/etc.)

Works with MCP (Model Context Protocol), LangChain, CrewAI, and any agent framework that can make an authenticated HTTPS call.


Installation

npm install navige

Requires Node.js 18+. No dependencies.


Quick Start

Manual intercept

Check each tool call explicitly before running it:

import Navige from 'navige';

const tl = new Navige({ apiKey: 'nv_your-key' });

async function runTool(toolName, args) {
  const check = await tl.intercept(toolName, args);

  if (check.allowed) {
    return await yourToolImplementation(toolName, args);
  }

  if (check.decision === 'PENDING') {
    return `Awaiting human approval (ID: ${check.approval_id})`;
  }

  throw new Error(`Blocked by Navige: ${check.message}`);
}

await runTool('send_email', { to: 'ceo@bank.com', subject: 'Wire Transfer' });

Get your Navige API key at navige.ai/signup — free, no credit card.

Grouping tools under a system, and overriding classification

const check = await tl.intercept(
  'transfer_funds',
  { to_account: 'GB29NWBK60161331926819', amount: 5000 },
  { system: 'Banking API', classification: 'financial' }
);

Non-blocking approvals

By default, intercept() blocks (up to 5 minutes) while a required approval is pending. For callers with a short timeout of their own, pass { wait: false } for an immediate PENDING result, and poll for the outcome yourself:

const check = await tl.intercept('transfer_funds', { amount: 50000 }, { wait: false });
if (check.decision === 'PENDING') {
  // ... later, e.g. on a retry or a scheduled check ...
  const outcome = await tl.getApprovalStatus(check.approval_id);
}

MCP (Claude Desktop, Cline)

Add Navige to your Claude Desktop config:

{
  "mcpServers": {
    "navige": {
      "url": "https://api.navige.ai/mcp?api_key=nv_your-key"
    }
  }
}

Or use the helper:

import Navige from 'navige';
console.log(Navige.mcpUrl('nv_your-key'));
// https://api.navige.ai/mcp?api_key=nv_your-key

Policies, kill switch, audit log, approvals

These are managed from the dashboard — Policies, Kill Switch, Audit Log, and Approvals pages — not over the API key. tl.createRule(), tl.blockTool(), tl.getLogs(), tl.getPendingApprovals(), and similar methods from earlier SDK versions now throw NavigeError with a pointer to the right dashboard page, so a leftover call fails loudly instead of silently doing nothing.


Error Handling

import Navige, { NavigeError } from 'navige';

try {
  const result = await tl.intercept('send_email', { to: '...' });
} catch (err) {
  if (err instanceof NavigeError) {
    console.error(`Navige API error: ${err.message}`);
  }
}

TypeScript

Full TypeScript support included — no @types package needed.

import Navige, { InterceptResult } from 'navige';

const tl = new Navige({ apiKey: 'nv_your-key' });
const result: InterceptResult = await tl.intercept('my_tool', { param: 'value' });

Why Navige?

LangSmith / Arize Navige
What it monitors LLM API layer (what the model said) Tool execution layer (what the agent did)
Kill switch No Yes
Human approval workflow No Yes
Blockchain audit trail No Yes
Works with any agent framework No Yes

Links


License

MIT © Navige

About

AI governance SDK — intercept, audit, and add human approval to any AI agent tool call. Works with OpenAI, MCP, LangChain, CrewAI. EU AI Act compliance and other mandates.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages