Skip to content

jev-tool-permissions

Vercel AI SDK layer that uses Jev to auto-approve, ask a human or block each tool call, and to prune irrelevant tools before a turn.

Librarybeta

Overview

jev-tool-permissions adds two jobs to agents built on the Vercel AI SDK, using Jev through the Vercel AI Gateway. The pre-flight approval gate decides auto-approve, ask-human or block before a tool call executes; when no deterministic allow or deny rule decides first, it asks Jev three questions in one round trip: is the call reversible, is it in scope (both booleans), and how risky is it on a five-level score. Risk at or above the block threshold blocks; a combined safety score above the auto-approve threshold (default 0.95) passes; everything in between asks a human.

Tool-list pruning asks one relevance yes/no per tool not decided by a rule and drops those below a deliberately low keep threshold of 0.2, saving context when agents carry 50 to 200 MCP tool definitions. Both are fail-closed: on error or timeout the gate defaults to ask-human. The README argues an LLM judge is too slow and costly for the hot path of every tool call. The package has no runtime dependencies beyond the ai peer dependency.

What the decision model decides

TypeQuestionAnswers
Yes / noIs this tool call reversible?—
Yes / noIs this tool call in scope for the task?—
ScoreHow risky is this tool call (5 levels)?—
Yes / noIs this tool relevant to the current task?—

How it works

  1. Deterministic allow/deny rules run first without the model
  2. Remaining calls get three Jev questions in one evaluate() call
  3. Block if risk >= threshold; auto-approve if safety >= 0.95; otherwise ask a human
  4. Separately, prune tools with relevance below 0.2 before each turn

Strengths

  • Fail-closed: errors default to ask-human
  • Asymmetric thresholds tuned to the cost of each mistake
  • Prunes unused tool definitions to save context
  • No extra runtime dependencies

Caveats

  • Depends on the AI SDK's experimental evaluate API and Vercel AI Gateway
  • Thresholds need per-application tuning

Getting started

npm install jev-tool-permissions ai

At a glance

Type
Library
Status
beta
Language
TypeScript
Runtime
Node (Vercel AI SDK)
Has code
yes

Use cases and integrations

How curated lists describe it

Frequently asked questions

What happens if Jev fails?

The approval gate defaults to ask-human, never auto-approve.

Why not use an LLM judge?

The README argues it is too slow and expensive for a check that runs on every tool call.

How does pruning save tokens?

It drops tool definitions judged irrelevant to the task before each turn.

Related projects

  • Two stdlib-only Hermes Agent plugins: a Jev pre-tool gate with a jev_ask tool, and a skill router that names one skill per turn.

    Agent skillbetaPython
  • Claude Code kit wiring Jev into a tool-call guard, sub-agent sizing, file search, a browser agent, review, belay and compaction.

    ProjectbetaPython
  • Discontinued DeepSeek Harness decision layer whose policies let Jev only narrow permissions and fail closed; successor is jevcore.

    ProjectprototypeTypeScript
  • Composio agent SDK with an optional TypeSafe provider that uses Jev to shortlist and pick tools and closed-set arguments.

    ProjectproductionTypeScript
  • DeepSeek Harness plugin with 12 opt-in Jev or Luna Decisions judgments: skill and file selection, supervision, filtering and approval help.

    PluginbetaTypeScript
  • Claude Code hook that decides which agent or skill should handle a request using YAML rulebooks plus one Jev Choice with confidence bands.

    HookbetaPython